mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Add enchantment target for bows and crossbows
This commit is contained in:
committed by
granny
parent
b6e5996870
commit
2f83d9f9d6
@@ -0,0 +1,21 @@
|
||||
--- a/src/main/java/org/bukkit/enchantments/EnchantmentTarget.java
|
||||
+++ b/src/main/java/org/bukkit/enchantments/EnchantmentTarget.java
|
||||
@@ -227,6 +_,18 @@
|
||||
public boolean includes(@NotNull Material item) {
|
||||
return BREAKABLE.includes(item) || (WEARABLE.includes(item) && !item.equals(Material.ELYTRA)) || item.equals(Material.COMPASS);
|
||||
}
|
||||
+ // Purpur start - Add enchantment target for bows and crossbows
|
||||
+ },
|
||||
+
|
||||
+ /**
|
||||
+ * Allow the Enchantment to be placed on bows and crossbows.
|
||||
+ */
|
||||
+ BOW_AND_CROSSBOW {
|
||||
+ @Override
|
||||
+ public boolean includes(@NotNull Material item) {
|
||||
+ return item.equals(Material.BOW) || item.equals(Material.CROSSBOW);
|
||||
+ }
|
||||
+ // Purpur end - Add enchantment target for bows and crossbows
|
||||
};
|
||||
|
||||
/**
|
||||
Reference in New Issue
Block a user