diff --git a/src/main/java/me/metallicgoat/MBedwarsTweaks/advancedswords/DowngradeTools.java b/src/main/java/me/metallicgoat/MBedwarsTweaks/advancedswords/DowngradeTools.java index 87d35a3..f3f491b 100644 --- a/src/main/java/me/metallicgoat/MBedwarsTweaks/advancedswords/DowngradeTools.java +++ b/src/main/java/me/metallicgoat/MBedwarsTweaks/advancedswords/DowngradeTools.java @@ -6,6 +6,7 @@ import de.marcely.bedwars.api.game.shop.ShopItem; import me.metallicgoat.MBedwarsTweaks.Main; import me.metallicgoat.MBedwarsTweaks.utils.ServerManager; +import me.metallicgoat.MBedwarsTweaks.utils.XSeries.XEnchantment; import me.metallicgoat.MBedwarsTweaks.utils.XSeries.XMaterial; import org.bukkit.Bukkit; import org.bukkit.enchantments.Enchantment; @@ -99,13 +100,15 @@ public void onRespawn(PlayerIngameRespawnEvent e) { if (!pickaxe.equals("AIR")) { Optional material = XMaterial.matchXMaterial(pickaxe + "_PICKAXE"); if(material.isPresent()){ + /* + ItemStack itemStack = new ItemStack(Objects.requireNonNull(material.get().parseItem())); ItemMeta itemMeta = itemStack.getItemMeta(); assert itemMeta != null; itemMeta.setUnbreakable(true); - itemStack.setItemMeta(itemMeta); + Enchantment enchantment = XEnchantment.DIG_SPEED.parseEnchantment(); @@ -117,6 +120,7 @@ public void onRespawn(PlayerIngameRespawnEvent e) { case 4: itemMeta.addEnchant(enchantment, 2, true); break; case 5: itemMeta.addEnchant(enchantment, 3, true); break; } + itemStack.setItemMeta(itemMeta); */ @@ -149,6 +153,7 @@ public void onRespawn(PlayerIngameRespawnEvent e) { */ + player.getInventory().addItem(material.get().parseItem()); } }