Commits

Parker Hawke authored and md_5 committed ee12ca7b712
Add maximum repair cost API to AnvilInventory
No tags

src/main/java/org/bukkit/inventory/AnvilInventory.java

Modified
19 19 * @return the experience cost
20 20 */
21 21 int getRepairCost();
22 22
23 23 /**
24 24 * Set the experience cost (in levels) to complete the current repair.
25 25 *
26 26 * @param levels the experience cost
27 27 */
28 28 void setRepairCost(int levels);
29 +
30 + /**
31 + * Get the maximum experience cost (in levels) to be allowed by the current
32 + * repair. If the result of {@link #getRepairCost()} exceeds the returned
33 + * value, the repair result will be air to due being "too expensive".
34 + * <p>
35 + * By default, this level is set to 40. Players in creative mode ignore the
36 + * maximum repair cost.
37 + *
38 + * @return the maximum experience cost
39 + */
40 + int getMaximumRepairCost();
41 +
42 + /**
43 + * Set the maximum experience cost (in levels) to be allowed by the current
44 + * repair. The default value set by vanilla Minecraft is 40.
45 + *
46 + * @param levels the maximum experience cost
47 + */
48 + void setMaximumRepairCost(int levels);
29 49 }

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut