diff --git a/src/main/java/me/sat7/dynamicshop/DynaShopAPI.java b/src/main/java/me/sat7/dynamicshop/DynaShopAPI.java index def7bc9..30fed58 100644 --- a/src/main/java/me/sat7/dynamicshop/DynaShopAPI.java +++ b/src/main/java/me/sat7/dynamicshop/DynaShopAPI.java @@ -257,7 +257,6 @@ public static ArrayList getShopItems(@NonNull String shopName) continue; // 장식용임 } - Material m; String itemName = data.get().getString(s + ".mat"); // 메테리얼 try { diff --git a/src/main/java/me/sat7/dynamicshop/commands/shop/Command.java b/src/main/java/me/sat7/dynamicshop/commands/shop/Command.java index 82e7851..7396ad3 100644 --- a/src/main/java/me/sat7/dynamicshop/commands/shop/Command.java +++ b/src/main/java/me/sat7/dynamicshop/commands/shop/Command.java @@ -113,7 +113,7 @@ private void subCmd(CommandSender sender, String[] args, CustomConfig shopData, { if(args[4].equalsIgnoreCase("delete") && args.length == 6) { - int idx = 0; + int idx; try { idx = Integer.parseInt(args[5]); @@ -129,7 +129,7 @@ private void subCmd(CommandSender sender, String[] args, CustomConfig shopData, } else if(args[4].equalsIgnoreCase("add") && args.length >= 7) { - int idx = 0; + int idx; try { idx = Integer.parseInt(args[5]); diff --git a/src/main/java/me/sat7/dynamicshop/events/OnChat.java b/src/main/java/me/sat7/dynamicshop/events/OnChat.java index b850e1d..fb18a8c 100644 --- a/src/main/java/me/sat7/dynamicshop/events/OnChat.java +++ b/src/main/java/me/sat7/dynamicshop/events/OnChat.java @@ -142,7 +142,7 @@ public void onPlayerChat(AsyncPlayerChatEvent e) String[] input = e.getMessage().split("/"); if(input.length == 2) { - int idx = 0; + int idx; try { idx = Integer.parseInt(input[0]); diff --git a/src/main/java/me/sat7/dynamicshop/guis/ItemPalette.java b/src/main/java/me/sat7/dynamicshop/guis/ItemPalette.java index 9d058bd..be2f42b 100644 --- a/src/main/java/me/sat7/dynamicshop/guis/ItemPalette.java +++ b/src/main/java/me/sat7/dynamicshop/guis/ItemPalette.java @@ -56,7 +56,7 @@ public Inventory getGui(Player player, int uiSubType, String shopName, int targe this.shopSlotIndex = targetSlot; this.search = search; - String title = ""; + String title; if (uiSubType == 0) { title = t(player, "PALETTE_TITLE") + "§7 | §8" + shopName; @@ -231,9 +231,8 @@ private void SortAllItems() } Material[] potionMat = {Material.POTION, Material.LINGERING_POTION, Material.SPLASH_POTION}; - for (int i = 0; i < potionMat.length; i++) + for (Material mat : potionMat) { - Material mat = potionMat[i]; for (PotionType pt : PotionType.values()) { if (pt.isExtendable() && pt.isUpgradeable()) diff --git a/src/main/java/me/sat7/dynamicshop/guis/PageEditor.java b/src/main/java/me/sat7/dynamicshop/guis/PageEditor.java index 766eee5..6f672be 100644 --- a/src/main/java/me/sat7/dynamicshop/guis/PageEditor.java +++ b/src/main/java/me/sat7/dynamicshop/guis/PageEditor.java @@ -5,7 +5,6 @@ import me.sat7.dynamicshop.constants.Constants; import me.sat7.dynamicshop.events.OnChat; import me.sat7.dynamicshop.files.CustomConfig; -import me.sat7.dynamicshop.transactions.Calc; import me.sat7.dynamicshop.utilities.ShopUtil; import org.bukkit.Bukkit; import org.bukkit.Material; @@ -20,7 +19,6 @@ import java.util.Collections; import static me.sat7.dynamicshop.constants.Constants.P_ADMIN_SHOP_EDIT; -import static me.sat7.dynamicshop.utilities.LangUtil.n; import static me.sat7.dynamicshop.utilities.LangUtil.t; import static me.sat7.dynamicshop.utilities.MathUtil.Clamp; import static me.sat7.dynamicshop.utilities.ShopUtil.GetShopMaxPage; diff --git a/src/main/java/me/sat7/dynamicshop/guis/StartPage.java b/src/main/java/me/sat7/dynamicshop/guis/StartPage.java index b1f2bf8..6c58284 100644 --- a/src/main/java/me/sat7/dynamicshop/guis/StartPage.java +++ b/src/main/java/me/sat7/dynamicshop/guis/StartPage.java @@ -96,7 +96,7 @@ public Inventory getGui(Player player) } ItemStack btn = new ItemStack(Material.getMaterial(cs.getConfigurationSection(s).getString("icon"))); - ItemMeta meta = null; + ItemMeta meta; if (cs.contains(s + ".itemStack")) { diff --git a/src/main/java/me/sat7/dynamicshop/transactions/Buy.java b/src/main/java/me/sat7/dynamicshop/transactions/Buy.java index 9eeac1b..7f691f6 100644 --- a/src/main/java/me/sat7/dynamicshop/transactions/Buy.java +++ b/src/main/java/me/sat7/dynamicshop/transactions/Buy.java @@ -12,7 +12,6 @@ import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.ItemMeta; import me.sat7.dynamicshop.DynaShopAPI; import me.sat7.dynamicshop.DynamicShop;