diff --git a/src/main/java/com/songoda/ultimatekits/tasks/CrateAnimateTask.java b/src/main/java/com/songoda/ultimatekits/tasks/CrateAnimateTask.java index 729ac2e..20b4e0b 100644 --- a/src/main/java/com/songoda/ultimatekits/tasks/CrateAnimateTask.java +++ b/src/main/java/com/songoda/ultimatekits/tasks/CrateAnimateTask.java @@ -83,7 +83,7 @@ public class CrateAnimateTask extends BukkitRunnable { num = slow ? 1 : 0; for (int i = 0; i < 27; i++) { - inventory.setItem(i, Methods.toGlass(true, 0)); + inventory.setItem(i, Methods.getGlass(true, 0)); } for (int i = 9; i < 18; i++) { diff --git a/src/main/java/com/songoda/ultimatekits/utils/Methods.java b/src/main/java/com/songoda/ultimatekits/utils/Methods.java index 96484b5..06aaf07 100644 --- a/src/main/java/com/songoda/ultimatekits/utils/Methods.java +++ b/src/main/java/com/songoda/ultimatekits/utils/Methods.java @@ -37,7 +37,14 @@ public class Methods { return getGlass(false, instance.getConfig().getInt("Interfaces.Glass Type 3")); } - private static ItemStack getGlass(Boolean rainbow, int type) { + /** + * Creates a glass itemstack + * + * @param rainbow Whether or not to assign a random color to the glass. + * @param type If rainbow is false, the glass color. + * @return A glass itemstack conforming to the params. + */ + public static ItemStack getGlass(boolean rainbow, int type) { int randomNum = 1 + (int) (Math.random() * 6); ItemStack glass; if (rainbow) { @@ -53,7 +60,6 @@ public class Methods { return glass; } - public static boolean canGiveKit(Player player) { try { if (player.hasPermission("ultimatekits.cangive")) return true; @@ -303,25 +309,5 @@ public class Methods { item.setItemMeta(meta); return item; } - /** - * Creates a glass itemstack - * - * @param rainbow Whether or not to assign a random color to the glass. - * @param type If rainbow is false, the glass color. - * @return A glass itemstack conforming to the params. - */ - public static ItemStack toGlass(Boolean rainbow, int type) { - int randomNum = 1 + (int) (Math.random() * 6); - ItemStack glass; - if (rainbow) { - glass = new ItemStack(Material.LEGACY_STAINED_GLASS_PANE, 1, (short) randomNum); - } else { - glass = new ItemStack(Material.LEGACY_STAINED_GLASS_PANE, 1, (short) type); - } - ItemMeta glassMeta = glass.getItemMeta(); - glassMeta.setDisplayName("§l"); - glass.setItemMeta(glassMeta); - return glass; - } } \ No newline at end of file