@@ -5,40 +5,88 @@ Subject: [PATCH] Anvil API
5
5
6
6
7
7
diff --git a/src/main/java/org/bukkit/inventory/AnvilInventory.java b/src/main/java/org/bukkit/inventory/AnvilInventory.java
8
- index f1f97a85ec713c05c882d7588f4a3e4a017f4795..468d8b336c8060da346e2dfe60900868148376f6 100644
8
+ index f1f97a85ec713c05c882d7588f4a3e4a017f4795..813f6cd253322538bdf96eb323dd23a7809a1c1e 100644
9
9
--- a/src/main/java/org/bukkit/inventory/AnvilInventory.java
10
10
+++ b/src/main/java/org/bukkit/inventory/AnvilInventory.java
11
- @@ -138,4 +138,14 @@ public interface AnvilInventory extends Inventory {
11
+ @@ -138,4 +138,42 @@ public interface AnvilInventory extends Inventory {
12
12
setItem(2, result);
13
13
}
14
14
// Paper end
15
15
+
16
16
+ // Purpur start
17
+ + /**
18
+ + * Gets if the player viewing the anvil inventory can bypass experience cost
19
+ + *
20
+ + * @return whether the player viewing the anvil inventory can bypass the experience cost
21
+ + * @deprecated use {@link AnvilView#canBypassCost()}.
22
+ + */
23
+ + @Deprecated(forRemoval = true, since = "1.21")
17
24
+ boolean canBypassCost();
18
25
+
26
+ + /**
27
+ + * Set if the player viewing the anvil inventory can bypass the experience cost
28
+ + *
29
+ + * @param bypassCost whether the player viewing the anvil inventory can bypass the experience cost
30
+ + * @deprecated use {@link AnvilView#setBypassCost(boolean)}.
31
+ + */
32
+ + @Deprecated(forRemoval = true, since = "1.21")
19
33
+ void setBypassCost(boolean bypassCost);
20
34
+
35
+ + /**
36
+ + * Gets if the player viewing the anvil inventory can do unsafe enchants
37
+ + *
38
+ + * @return whether the player viewing the anvil inventory can do unsafe enchants
39
+ + * @deprecated use {@link AnvilView#canDoUnsafeEnchants()}.
40
+ + */
41
+ + @Deprecated(forRemoval = true, since = "1.21")
21
42
+ boolean canDoUnsafeEnchants();
22
43
+
44
+ + /**
45
+ + * Set if the player viewing the anvil inventory can do unsafe enchants
46
+ + *
47
+ + * @param canDoUnsafeEnchants whether the player viewing the anvil inventory can do unsafe enchants
48
+ + * @deprecated use {@link AnvilView#setDoUnsafeEnchants(boolean)}.
49
+ + */
50
+ + @Deprecated(forRemoval = true, since = "1.21")
23
51
+ void setDoUnsafeEnchants(boolean canDoUnsafeEnchants);
24
52
+ // Purpur end
25
53
}
26
54
diff --git a/src/main/java/org/bukkit/inventory/view/AnvilView.java b/src/main/java/org/bukkit/inventory/view/AnvilView.java
27
- index 0344b3db789baf1da0b59f2d2cd66154b69b38a9..c824a94f81925abc91eff7424c8021da10980bad 100644
55
+ index 0344b3db789baf1da0b59f2d2cd66154b69b38a9..4b130327c84b05938d21d563f78361f9483a6a4e 100644
28
56
--- a/src/main/java/org/bukkit/inventory/view/AnvilView.java
29
57
+++ b/src/main/java/org/bukkit/inventory/view/AnvilView.java
30
- @@ -59,4 +59,14 @@ public interface AnvilView extends InventoryView {
58
+ @@ -59,4 +59,34 @@ public interface AnvilView extends InventoryView {
31
59
* @param levels the levels to set
32
60
*/
33
61
void setMaximumRepairCost(int levels);
34
62
+
35
63
+ // Purpur start
64
+ + /**
65
+ + * Gets if the player viewing the anvil inventory can bypass experience cost
66
+ + *
67
+ + * @return whether the player viewing the anvil inventory can bypass the experience cost
68
+ + */
36
69
+ boolean canBypassCost();
37
70
+
71
+ + /**
72
+ + * Set if the player viewing the anvil inventory can bypass the experience cost
73
+ + *
74
+ + * @param bypassCost whether the player viewing the anvil inventory can bypass the experience cost
75
+ + */
38
76
+ void setBypassCost(boolean bypassCost);
39
77
+
78
+ + /**
79
+ + * Gets if the player viewing the anvil inventory can do unsafe enchants
80
+ + *
81
+ + * @return whether the player viewing the anvil inventory can do unsafe enchants
82
+ + */
40
83
+ boolean canDoUnsafeEnchants();
41
84
+
85
+ + /**
86
+ + * Set if the player viewing the anvil inventory can do unsafe enchants
87
+ + *
88
+ + * @param canDoUnsafeEnchants whether the player viewing the anvil inventory can do unsafe enchants
89
+ + */
42
90
+ void setDoUnsafeEnchants(boolean canDoUnsafeEnchants);
43
91
+ // Purpur end
44
92
}
0 commit comments