mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-11 05:55:33 +00:00
Fixed some overlooked returns from dce08b4e88bea4065149d6843d64344f7a25872a
This commit is contained in:
parent
22a21ecfd6
commit
84cf7c11e6
@ -68,7 +68,7 @@ class PaintingItem extends Item{
|
||||
}
|
||||
|
||||
if(empty($motives)){ //No space available
|
||||
return false;
|
||||
return ItemUseResult::none();
|
||||
}
|
||||
|
||||
/** @var PaintingMotive $motive */
|
||||
@ -83,7 +83,7 @@ class PaintingItem extends Item{
|
||||
|
||||
$direction = $directions[$face] ?? -1;
|
||||
if($direction === -1){
|
||||
return false;
|
||||
return ItemUseResult::none();
|
||||
}
|
||||
|
||||
$nbt = EntityFactory::createBaseNBT($blockReplace, null, $direction * 90, 0);
|
||||
@ -99,6 +99,6 @@ class PaintingItem extends Item{
|
||||
$entity->spawnToAll();
|
||||
|
||||
$player->getLevel()->broadcastLevelEvent($blockReplace->add(0.5, 0.5, 0.5), LevelEventPacket::EVENT_SOUND_ITEMFRAME_PLACE); //item frame and painting have the same sound
|
||||
return true;
|
||||
return ItemUseResult::success();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user