summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemPotion.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-08-30 12:46:26 +0200
committerHowaner <franzi.moos@googlemail.com>2014-08-30 12:46:26 +0200
commit0fdb1772083d7b4b8dd71c6f084acd9d2e001eec (patch)
tree4cd6964a056a4cbe92e93eb58d4e9a937d109522 /src/Items/ItemPotion.h
parentAdded slowness effect and added entity support. (diff)
downloadcuberite-0fdb1772083d7b4b8dd71c6f084acd9d2e001eec.tar
cuberite-0fdb1772083d7b4b8dd71c6f084acd9d2e001eec.tar.gz
cuberite-0fdb1772083d7b4b8dd71c6f084acd9d2e001eec.tar.bz2
cuberite-0fdb1772083d7b4b8dd71c6f084acd9d2e001eec.tar.lz
cuberite-0fdb1772083d7b4b8dd71c6f084acd9d2e001eec.tar.xz
cuberite-0fdb1772083d7b4b8dd71c6f084acd9d2e001eec.tar.zst
cuberite-0fdb1772083d7b4b8dd71c6f084acd9d2e001eec.zip
Diffstat (limited to 'src/Items/ItemPotion.h')
-rw-r--r--src/Items/ItemPotion.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Items/ItemPotion.h b/src/Items/ItemPotion.h
index 24614cd8a..398ef6805 100644
--- a/src/Items/ItemPotion.h
+++ b/src/Items/ItemPotion.h
@@ -68,8 +68,12 @@ public:
cEntityEffect::GetPotionEffectDuration(PotionDamage),
cEntityEffect::GetPotionEffectIntensity(PotionDamage)
);
- a_Player->GetInventory().RemoveOneEquippedItem();
- a_Player->GetInventory().AddItem(E_ITEM_GLASS_BOTTLE);
+
+ if (!a_Player->IsGameModeCreative())
+ {
+ a_Player->GetInventory().RemoveOneEquippedItem();
+ a_Player->GetInventory().AddItem(E_ITEM_GLASS_BOTTLE);
+ }
return true;
}
};