mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Item: Moved getMaxDurability() to Durable class only, and make it abstract
It's only now used in the Durable class, so it does not make sense to keep it in Item anymore. This is a leftover from the days where Durable did not exist.
This commit is contained in:
@ -82,6 +82,14 @@ abstract class Durable extends Item{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the maximum amount of damage this item can take before it breaks.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
abstract public function getMaxDurability() : int;
|
||||
|
||||
/**
|
||||
* Returns whether the item is broken.
|
||||
* @return bool
|
||||
|
Reference in New Issue
Block a user