From 72ca629cf17f5751d864bb3d51e5995ce3847e73 Mon Sep 17 00:00:00 2001 From: JRoy Date: Wed, 8 May 2019 21:02:21 -0400 Subject: [PATCH] Add 1.14 Enchantments --- .../com/earth2me/essentials/Enchantments.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Essentials/src/com/earth2me/essentials/Enchantments.java b/Essentials/src/com/earth2me/essentials/Enchantments.java index 05990f152..3586c6f16 100644 --- a/Essentials/src/com/earth2me/essentials/Enchantments.java +++ b/Essentials/src/com/earth2me/essentials/Enchantments.java @@ -231,6 +231,26 @@ public class Enchantments { } } catch (IllegalArgumentException ignored) {} + + try { // 1.14 + Enchantment multishot = Enchantment.getByName("MULTISHOT"); + if (multishot != null) { + ENCHANTMENTS.put("multishot", multishot); + ALIASENCHANTMENTS.put("tripleshot", multishot); + } + Enchantment quickCharge = Enchantment.getByName("QUICK_CHARGE"); + if (quickCharge != null) { + ENCHANTMENTS.put("quickcharge", quickCharge); + ALIASENCHANTMENTS.put("quickdraw", quickCharge); + ALIASENCHANTMENTS.put("fastcharge", quickCharge); + ALIASENCHANTMENTS.put("fastdraw", quickCharge); + } + Enchantment piercing = Enchantment.getByName("PIERCING"); + if (piercing != null) { + ENCHANTMENTS.put("piercing", piercing); + } + } catch (IllegalArgumentException ignored) {} + try { Class namespacedKeyClass = Class.forName("org.bukkit.NamespacedKey"); Class enchantmentClass = Class.forName("org.bukkit.enchantments.Enchantment");