mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 19:34:09 +01:00
Add maximum repair cost API to AnvilInventory
By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
parent
6fb32733f2
commit
37945d9ca3
1 changed files with 20 additions and 0 deletions
|
@ -26,4 +26,24 @@ public interface AnvilInventory extends Inventory {
|
||||||
* @param levels the experience cost
|
* @param levels the experience cost
|
||||||
*/
|
*/
|
||||||
void setRepairCost(int levels);
|
void setRepairCost(int levels);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the maximum experience cost (in levels) to be allowed by the current
|
||||||
|
* repair. If the result of {@link #getRepairCost()} exceeds the returned
|
||||||
|
* value, the repair result will be air to due being "too expensive".
|
||||||
|
* <p>
|
||||||
|
* By default, this level is set to 40. Players in creative mode ignore the
|
||||||
|
* maximum repair cost.
|
||||||
|
*
|
||||||
|
* @return the maximum experience cost
|
||||||
|
*/
|
||||||
|
int getMaximumRepairCost();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the maximum experience cost (in levels) to be allowed by the current
|
||||||
|
* repair. The default value set by vanilla Minecraft is 40.
|
||||||
|
*
|
||||||
|
* @param levels the maximum experience cost
|
||||||
|
*/
|
||||||
|
void setMaximumRepairCost(int levels);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue