mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Fixed some overlooked returns from dce08b4e88
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user