Add even more Enchantment API (#11115)
This commit is contained in:
@@ -57,10 +57,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
|
||||
* @return the name of the enchantment with {@code level} applied
|
||||
*/
|
||||
public abstract net.kyori.adventure.text.@NotNull Component displayName(int level);
|
||||
+
|
||||
// Paper end
|
||||
|
||||
+ // Paper start - more Enchantment API
|
||||
+ /**
|
||||
+ * Checks if this enchantment can be found in villager trades.
|
||||
+ *
|
||||
@@ -129,7 +129,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @return the damage increase
|
||||
+ * @deprecated Enchantments now have a complex effect systems that cannot be reduced to a simple damage increase.
|
||||
+ */
|
||||
+ @Contract("-> fail")
|
||||
+ @Contract("_, _ -> fail")
|
||||
+ @Deprecated(forRemoval = true, since = "1.20.5")
|
||||
+ public abstract float getDamageIncrease(int level, @NotNull org.bukkit.entity.EntityCategory entityCategory);
|
||||
+
|
||||
@@ -141,7 +141,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @return the damage increase
|
||||
+ * @deprecated Enchantments now have a complex effect systems that cannot be reduced to a simple damage increase.
|
||||
+ */
|
||||
+ @Contract("-> fail")
|
||||
+ @Contract("_, _ -> fail")
|
||||
+ @Deprecated(forRemoval = true, since = "1.21")
|
||||
+ public abstract float getDamageIncrease(int level, @NotNull org.bukkit.entity.EntityType entityType);
|
||||
+
|
||||
@@ -170,9 +170,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public abstract java.util.Set<org.bukkit.inventory.EquipmentSlotGroup> getActiveSlotGroups();
|
||||
// Paper end
|
||||
|
||||
+ // Paper end - more Enchantment API
|
||||
+
|
||||
// Paper start - mark translation key as deprecated
|
||||
/**
|
||||
* @deprecated this method assumes that the enchantments description
|
||||
diff --git a/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java b/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java
|
||||
|
||||
Reference in New Issue
Block a user