mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Player: Clean up item frame drop-item hack
This is now re-routed through a newly-created attack-block handler. Closes #339
This commit is contained in:
@ -380,6 +380,20 @@ class Block extends Position implements BlockIds, Metadatable{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when this block is attacked (left-clicked). This is called when a player left-clicks the block to try and
|
||||
* start to break it in survival mode.
|
||||
*
|
||||
* @param Item $item
|
||||
* @param int $face
|
||||
* @param Player|null $player
|
||||
*
|
||||
* @return bool if an action took place, prevents starting to break the block if true.
|
||||
*/
|
||||
public function onAttack(Item $item, int $face, ?Player $player = null) : bool{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a base value used to compute block break times.
|
||||
* @return float
|
||||
|
Reference in New Issue
Block a user