mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
Removed damage-table mess and added API methods Item->getAttackPoints() and Item->getDefensePoints()
This commit is contained in:
@ -746,6 +746,22 @@ class Item implements ItemIds, \JsonSerializable{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns how many points of damage this item will deal to an entity when used as a weapon.
|
||||
* @return int
|
||||
*/
|
||||
public function getAttackPoints() : int{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns how many armor points can be gained by wearing this item.
|
||||
* @return int
|
||||
*/
|
||||
public function getDefensePoints() : int{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Entity|Block $object
|
||||
*
|
||||
|
Reference in New Issue
Block a user