From 037577162bde7c5e362957c05c577f572b2671b1 Mon Sep 17 00:00:00 2001 From: pop4959 Date: Sun, 31 Jul 2022 12:03:31 -0700 Subject: [PATCH] Add swift sneak enchantment (#5026) Closes #5024. --- .../main/java/com/earth2me/essentials/Enchantments.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Essentials/src/main/java/com/earth2me/essentials/Enchantments.java b/Essentials/src/main/java/com/earth2me/essentials/Enchantments.java index f44a8f4ed..542dca311 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/Enchantments.java +++ b/Essentials/src/main/java/com/earth2me/essentials/Enchantments.java @@ -263,6 +263,14 @@ public final class Enchantments { } catch (final IllegalArgumentException ignored) { } + try { // 1.19 + final Enchantment swiftSneak = Enchantment.getByName("SWIFT_SNEAK"); + if (swiftSneak != null) { + ENCHANTMENTS.put("swiftsneak", swiftSneak); + } + } catch (final IllegalArgumentException ignored) { + } + try { final Class namespacedKeyClass = Class.forName("org.bukkit.NamespacedKey"); final Class enchantmentClass = Class.forName("org.bukkit.enchantments.Enchantment");