diff --git a/src/com/dre/brewery/recipe/BCauldronRecipe.java b/src/com/dre/brewery/recipe/BCauldronRecipe.java index 52a8994..672bb10 100644 --- a/src/com/dre/brewery/recipe/BCauldronRecipe.java +++ b/src/com/dre/brewery/recipe/BCauldronRecipe.java @@ -20,8 +20,8 @@ public class BCauldronRecipe { public static List recipes = new ArrayList<>(); public static int numConfigRecipes; public static List acceptedCustom = new ArrayList<>(); // All accepted custom and other items - public static Set acceptedSimple = EnumSet.noneOf(Material.class); // All accepted simple items - public static Set acceptedMaterials = EnumSet.noneOf(Material.class); // Fast cache for all accepted Materials + public static Set acceptedSimple = new HashSet<>(); // All accepted simple items + public static Set acceptedMaterials = new HashSet<>(); // Fast cache for all accepted Materials private String name; private List ingredients; diff --git a/src/com/dre/brewery/utility/LegacyUtil.java b/src/com/dre/brewery/utility/LegacyUtil.java index 2ca3c9c..d5cdecf 100644 --- a/src/com/dre/brewery/utility/LegacyUtil.java +++ b/src/com/dre/brewery/utility/LegacyUtil.java @@ -13,7 +13,7 @@ import org.bukkit.material.Wood; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.util.EnumSet; +import java.util.HashSet; import java.util.Set; import static com.dre.brewery.BCauldron.EMPTY; @@ -42,7 +42,9 @@ public class LegacyUtil { } catch (ClassNotFoundException | NoSuchMethodException | SecurityException ignored) { } - Set planks = EnumSet.noneOf(Material.class); + // EnumSet not supposed to be used anymore + // See https://www.spigotmc.org/threads/spigot-bungeecord-1-19.559742/ + Set planks = new HashSet<>(); for (Material m : Material.values()) { if (m.name().endsWith("PLANKS")) { planks.add(m); @@ -50,7 +52,7 @@ public class LegacyUtil { } PLANKS = planks; - Set woodStairs = EnumSet.noneOf(Material.class); + Set woodStairs = new HashSet<>(); Material[] gotStairs = { get("OAK_STAIRS", "WOOD_STAIRS"), get("SPRUCE_STAIRS", "SPRUCE_WOOD_STAIRS"), @@ -70,7 +72,7 @@ public class LegacyUtil { WOOD_STAIRS = woodStairs; - Set fences = EnumSet.noneOf(Material.class); + Set fences = new HashSet<>(); for (Material m : Material.values()) { if (m.name().endsWith("FENCE")) { fences.add(m);