mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 01:51:51 +00:00
Ice: don't create water for creative players, fixes #2622
This commit is contained in:
parent
5dfceeea98
commit
254281cd5e
@ -56,7 +56,7 @@ class Ice extends Transparent{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function onBreak(Item $item, Player $player = null) : bool{
|
public function onBreak(Item $item, Player $player = null) : bool{
|
||||||
if(!$item->hasEnchantment(Enchantment::SILK_TOUCH)){
|
if(($player === null or $player->isSurvival()) and !$item->hasEnchantment(Enchantment::SILK_TOUCH)){
|
||||||
return $this->getLevel()->setBlock($this, BlockFactory::get(Block::WATER), true);
|
return $this->getLevel()->setBlock($this, BlockFactory::get(Block::WATER), true);
|
||||||
}
|
}
|
||||||
return parent::onBreak($item, $player);
|
return parent::onBreak($item, $player);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user