mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 17:18:37 +01:00
Add support for 1.21 enchantments
This commit is contained in:
parent
6624e6688c
commit
1ea080effa
@ -303,6 +303,24 @@ public final class Enchantments {
|
||||
} catch (final IllegalArgumentException ignored) {
|
||||
}
|
||||
|
||||
try { // 1.21
|
||||
final Enchantment breach = Enchantment.getByName("BREACH");
|
||||
if (breach != null) {
|
||||
ENCHANTMENTS.put("breach", breach);
|
||||
}
|
||||
final Enchantment density = Enchantment.getByName("DENSITY");
|
||||
if (density != null) {
|
||||
ENCHANTMENTS.put("density", density);
|
||||
}
|
||||
final Enchantment windBurst = Enchantment.getByName("WIND_BURST");
|
||||
if (breach != null) {
|
||||
ENCHANTMENTS.put("windburst", windBurst);
|
||||
ALIASENCHANTMENTS.put("wind", windBurst);
|
||||
ALIASENCHANTMENTS.put("burst", windBurst);
|
||||
}
|
||||
} catch (final IllegalArgumentException ignored) {
|
||||
}
|
||||
|
||||
try {
|
||||
final Class<?> namespacedKeyClass = Class.forName("org.bukkit.NamespacedKey");
|
||||
final Class<?> enchantmentClass = Class.forName("org.bukkit.enchantments.Enchantment");
|
||||
|
Loading…
Reference in New Issue
Block a user