summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorParker Hawke <hawkeboyz2@hotmail.com>2018-10-05 15:04:22 -0400
committermd_5 <git@md-5.net>2018-10-06 19:26:46 +1000
commitee12ca7b712793de5356eec6a9162073faae88f8 (patch)
tree6c512de76248ab94f970d7021b7c42f0e04c9c73 /src/main/java/org
parent66b9b8fdd86fe1ef2c7c02ca2316a4025cbfb099 (diff)
downloadbukkit-ee12ca7b712793de5356eec6a9162073faae88f8.tar
bukkit-ee12ca7b712793de5356eec6a9162073faae88f8.tar.gz
bukkit-ee12ca7b712793de5356eec6a9162073faae88f8.tar.lz
bukkit-ee12ca7b712793de5356eec6a9162073faae88f8.tar.xz
bukkit-ee12ca7b712793de5356eec6a9162073faae88f8.zip
Add maximum repair cost API to AnvilInventory
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/bukkit/inventory/AnvilInventory.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/inventory/AnvilInventory.java b/src/main/java/org/bukkit/inventory/AnvilInventory.java
index 289a630e..b2c6e215 100644
--- a/src/main/java/org/bukkit/inventory/AnvilInventory.java
+++ b/src/main/java/org/bukkit/inventory/AnvilInventory.java
@@ -26,4 +26,24 @@ public interface AnvilInventory extends Inventory {
* @param levels the experience cost
*/
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);
}