mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Remove redundant gamemode checks
The caller will check the player's gamemode, so there is no use for these checks.
This commit is contained in:
parent
7483f22e8b
commit
aa9fd1b4f9
@ -76,9 +76,8 @@ class Sapling extends Flowable{
|
||||
if($item->getId() === Item::DYE and $item->getDamage() === 0x0F){ //Bonemeal
|
||||
//TODO: change log type
|
||||
Tree::growTree($this->getLevel(), $this->x, $this->y, $this->z, new Random(mt_rand()), $this->meta & 0x07);
|
||||
if(($player->gamemode & 0x01) === 0){
|
||||
$item->count--;
|
||||
}
|
||||
|
||||
$item->count--;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -64,9 +64,8 @@ class Sugarcane extends Flowable{
|
||||
$this->meta = 0;
|
||||
$this->getLevel()->setBlock($this, $this, true);
|
||||
}
|
||||
if(($player->gamemode & 0x01) === 0){
|
||||
$item->count--;
|
||||
}
|
||||
|
||||
$item->count--;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user