fellkesz crystal kit
This commit is contained in:
@@ -142,11 +142,11 @@ public class EditKitCommand implements CommandExecutor, TabCompleter {
|
||||
|
||||
player.openInventory(gui);
|
||||
break;
|
||||
case "boxcart":
|
||||
case "cart":
|
||||
inv.clear();
|
||||
inv.setContents(kitManager.getBoxCartKit(player).getContents());
|
||||
inv.setContents(kitManager.getCartKit(player).getContents());
|
||||
|
||||
infoMeta.setDisplayName("§fBoxCart Kit");
|
||||
infoMeta.setDisplayName("§fCart Kit");
|
||||
infoItem.setItemMeta(infoMeta);
|
||||
gui.setItem(3, infoItem);
|
||||
gui.setItem(4, infoItem);
|
||||
@@ -227,7 +227,7 @@ public class EditKitCommand implements CommandExecutor, TabCompleter {
|
||||
@Override
|
||||
public @Nullable List<String> onTabComplete(@NotNull CommandSender cmds, @NotNull Command command, @NotNull String s, @NotNull String[] args) {
|
||||
if (args.length == 1) {
|
||||
return List.of("sword", "uhc", "boxcart", "mace", "axe", "diasmp");
|
||||
return List.of("sword", "uhc", "cart", "mace", "axe", "diasmp");
|
||||
}
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@@ -113,12 +113,12 @@ public class TpToFfaCommand implements CommandExecutor, TabCompleter {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "boxcart":
|
||||
case "cart":
|
||||
if (args.length > 1) {
|
||||
Player target = Bukkit.getPlayer(args[1]);
|
||||
if (target instanceof Player player) {
|
||||
player.getInventory().clear();
|
||||
player.getInventory().setContents(kitManager.getBoxCartKit(player).getContents());
|
||||
player.getInventory().setContents(kitManager.getCartKit(player).getContents());
|
||||
|
||||
World world = Bukkit.getWorld("world");
|
||||
double x = -1000.5;
|
||||
@@ -220,7 +220,7 @@ public class TpToFfaCommand implements CommandExecutor, TabCompleter {
|
||||
@Override
|
||||
public @Nullable List<String> onTabComplete(@NotNull CommandSender cmds, @NotNull Command command, @NotNull String s, @NotNull String[] args) {
|
||||
if (args.length == 1) {
|
||||
return List.of("sword", "uhc", "boxcart", "mace", "axe", "diamp");
|
||||
return List.of("sword", "uhc", "cart", "mace", "axe", "diamp");
|
||||
} else if (args.length == 2) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public class KitListener implements Listener {
|
||||
plugin.saveConfig();
|
||||
plugin.reloadConfig();
|
||||
}
|
||||
if (plugin.getConfig().getString("kits.boxcart." + player.getUniqueId()) == null) {
|
||||
if (plugin.getConfig().getString("kits.cart." + player.getUniqueId()) == null) {
|
||||
Map<String, Object> kit = new HashMap<>();
|
||||
int[] strength = new int[]{16, 25, 34};
|
||||
int[] speed = new int[]{17, 26, 35};
|
||||
@@ -83,7 +83,7 @@ public class KitListener implements Listener {
|
||||
kit.put("shulker", 27);
|
||||
kit.put("flintandsteel", 28);
|
||||
kit.put("totem", 40);
|
||||
plugin.getConfig().set("kits.boxcart." + player.getUniqueId(), kit);
|
||||
plugin.getConfig().set("kits.cart." + player.getUniqueId(), kit);
|
||||
plugin.saveConfig();
|
||||
plugin.reloadConfig();
|
||||
}
|
||||
@@ -245,31 +245,31 @@ public class KitListener implements Listener {
|
||||
|
||||
if (item != null) {
|
||||
if (item.getType() == Material.NETHERITE_AXE) {
|
||||
plugin.getConfig().set("kits.boxcart." + player.getUniqueId() + ".axe", i);
|
||||
plugin.getConfig().set("kits.cart." + player.getUniqueId() + ".axe", i);
|
||||
} else if (item.getType() == Material.NETHERITE_SWORD) {
|
||||
plugin.getConfig().set("kits.boxcart." + player.getUniqueId() + ".sword", i);
|
||||
plugin.getConfig().set("kits.cart." + player.getUniqueId() + ".sword", i);
|
||||
} else if (item.getType() == Material.ENDER_PEARL) {
|
||||
boxcartenderpearlSlots.add(i);
|
||||
} else if (item.getType() == Material.RAIL) {
|
||||
plugin.getConfig().set("kits.boxcart." + player.getUniqueId() + ".rail", i);
|
||||
plugin.getConfig().set("kits.cart." + player.getUniqueId() + ".rail", i);
|
||||
} else if (item.getType() == Material.TNT_MINECART) {
|
||||
boxcartcartSlots.add(i);
|
||||
} else if (item.getType() == Material.GOLDEN_APPLE) {
|
||||
plugin.getConfig().set("kits.boxcart." + player.getUniqueId() + ".goldenapple", i);
|
||||
plugin.getConfig().set("kits.cart." + player.getUniqueId() + ".goldenapple", i);
|
||||
} else if (item.getType() == Material.COBWEB) {
|
||||
plugin.getConfig().set("kits.boxcart." + player.getUniqueId() + ".cobweb", i);
|
||||
plugin.getConfig().set("kits.cart." + player.getUniqueId() + ".cobweb", i);
|
||||
} else if (item.getType() == Material.SHIELD) {
|
||||
plugin.getConfig().set("kits.boxcart." + player.getUniqueId() + ".shield", i);
|
||||
plugin.getConfig().set("kits.cart." + player.getUniqueId() + ".shield", i);
|
||||
} else if (item.getType() == Material.BOW) {
|
||||
plugin.getConfig().set("kits.boxcart." + player.getUniqueId() + ".bow", i);
|
||||
plugin.getConfig().set("kits.cart." + player.getUniqueId() + ".bow", i);
|
||||
} else if (item.getType() == Material.ARROW) {
|
||||
plugin.getConfig().set("kits.boxcart." + player.getUniqueId() + ".arrow", i);
|
||||
plugin.getConfig().set("kits.cart." + player.getUniqueId() + ".arrow", i);
|
||||
} else if (item.getType() == Material.CHERRY_LOG) {
|
||||
plugin.getConfig().set("kits.boxcart." + player.getUniqueId() + ".cherrylog", i);
|
||||
plugin.getConfig().set("kits.cart." + player.getUniqueId() + ".cherrylog", i);
|
||||
} else if (item.getType() == Material.CROSSBOW) {
|
||||
plugin.getConfig().set("kits.boxcart." + player.getUniqueId() + ".crossbow", i);
|
||||
plugin.getConfig().set("kits.cart." + player.getUniqueId() + ".crossbow", i);
|
||||
} else if (item.getType() == Material.FLINT_AND_STEEL) {
|
||||
plugin.getConfig().set("kits.boxcart." + player.getUniqueId() + ".flintandsteel", i);
|
||||
plugin.getConfig().set("kits.cart." + player.getUniqueId() + ".flintandsteel", i);
|
||||
} else if (item.getType() == Material.SPLASH_POTION) {
|
||||
if (item.getItemMeta().getDisplayName().equals("§fSplash Potion of Strength")) {
|
||||
boxcartstrenghtSlots.add(i);
|
||||
@@ -279,17 +279,17 @@ public class KitListener implements Listener {
|
||||
boxcartfireresistanceSlots.add(i);
|
||||
}
|
||||
} else if (item.getType() == Material.RED_SHULKER_BOX) {
|
||||
plugin.getConfig().set("kits.boxcart." + player.getUniqueId() + ".shulker", i);
|
||||
plugin.getConfig().set("kits.cart." + player.getUniqueId() + ".shulker", i);
|
||||
} else if (item.getType() == Material.NETHERITE_PICKAXE) {
|
||||
plugin.getConfig().set("kits.boxcart." + player.getUniqueId() + ".pickaxe", i);
|
||||
plugin.getConfig().set("kits.cart." + player.getUniqueId() + ".pickaxe", i);
|
||||
}
|
||||
}
|
||||
}
|
||||
plugin.getConfig().set("kits.boxcart." + player.getUniqueId() + ".enderpearl", boxcartenderpearlSlots);
|
||||
plugin.getConfig().set("kits.boxcart." + player.getUniqueId() + ".cart", boxcartcartSlots);
|
||||
plugin.getConfig().set("kits.boxcart." + player.getUniqueId() + ".strength", boxcartstrenghtSlots);
|
||||
plugin.getConfig().set("kits.boxcart." + player.getUniqueId() + ".speed", boxcartspeedSlots);
|
||||
plugin.getConfig().set("kits.boxcart." + player.getUniqueId() + ".fireresistance", boxcartfireresistanceSlots);
|
||||
plugin.getConfig().set("kits.cart." + player.getUniqueId() + ".enderpearl", boxcartenderpearlSlots);
|
||||
plugin.getConfig().set("kits.cart." + player.getUniqueId() + ".cart", boxcartcartSlots);
|
||||
plugin.getConfig().set("kits.cart." + player.getUniqueId() + ".strength", boxcartstrenghtSlots);
|
||||
plugin.getConfig().set("kits.cart." + player.getUniqueId() + ".speed", boxcartspeedSlots);
|
||||
plugin.getConfig().set("kits.cart." + player.getUniqueId() + ".fireresistance", boxcartfireresistanceSlots);
|
||||
} else if (gui.getItem(13).getItemMeta().getDisplayName().equals("§fMace Kit")) {
|
||||
macetotemSlots = new ArrayList<>();
|
||||
maceenderpearlSlots = new ArrayList<>();
|
||||
|
||||
@@ -56,7 +56,7 @@ public class Kits {
|
||||
return Collections.singletonList(-1);
|
||||
}
|
||||
|
||||
public Inventory getSwordKit(Player player) {
|
||||
public PlayerInventory getSwordKit(Player player) {
|
||||
|
||||
PlayerInventory inv = player.getInventory();
|
||||
|
||||
@@ -70,7 +70,7 @@ public class Kits {
|
||||
chestplate.addEnchantment(Enchantment.PROTECTION, 3);
|
||||
leggings.addEnchantment(Enchantment.PROTECTION, 3);
|
||||
boots.addEnchantment(Enchantment.PROTECTION, 3);
|
||||
sword.addEnchantment(Enchantment.UNBREAKING, 3);
|
||||
sword.addEnchantment(Enchantment.SWEEPING_EDGE, 3);
|
||||
|
||||
inv.setArmorContents(new ItemStack[]{boots, leggings, chestplate, helmet});
|
||||
inv.setItem(getItemSlot("sword", "sword", player), sword);
|
||||
@@ -78,7 +78,7 @@ public class Kits {
|
||||
return inv;
|
||||
}
|
||||
|
||||
public Inventory getUhcKit(Player player) {
|
||||
public PlayerInventory getUhcKit(Player player) {
|
||||
|
||||
PlayerInventory inv = player.getInventory();
|
||||
|
||||
@@ -100,8 +100,8 @@ public class Kits {
|
||||
ItemStack planks = new ItemStack(Material.OAK_PLANKS, 64);
|
||||
ItemStack pickaxe = new ItemStack(Material.DIAMOND_PICKAXE);
|
||||
|
||||
helmet.addEnchantment(Enchantment.PROTECTION, 2);
|
||||
chestplate.addEnchantment(Enchantment.PROTECTION, 3);
|
||||
helmet.addEnchantment(Enchantment.PROTECTION, 3);
|
||||
chestplate.addEnchantment(Enchantment.PROTECTION, 2);
|
||||
leggings.addEnchantment(Enchantment.PROTECTION, 3);
|
||||
boots.addEnchantment(Enchantment.PROTECTION, 3);
|
||||
axe.addEnchantment(Enchantment.SHARPNESS, 1);
|
||||
@@ -136,7 +136,7 @@ public class Kits {
|
||||
return inv;
|
||||
}
|
||||
|
||||
public Inventory getBoxCartKit(Player player) {
|
||||
public PlayerInventory getCartKit(Player player) {
|
||||
|
||||
PlayerInventory inv = player.getInventory();
|
||||
|
||||
@@ -228,40 +228,40 @@ public class Kits {
|
||||
shulker.setItemMeta(shulkermeta);
|
||||
|
||||
inv.setArmorContents(new ItemStack[]{boots, leggings, chestplate, helmet});
|
||||
inv.setItem(getItemSlot("axe", "boxcart", player), axe);
|
||||
inv.setItem(getItemSlot("sword", "boxcart", player), sword);
|
||||
for (int slot : getItemSlotArray("enderpearl", "boxcart", player)) {
|
||||
inv.setItem(getItemSlot("axe", "cart", player), axe);
|
||||
inv.setItem(getItemSlot("sword", "cart", player), sword);
|
||||
for (int slot : getItemSlotArray("enderpearl", "cart", player)) {
|
||||
inv.setItem(slot, enderpearl);
|
||||
}
|
||||
inv.setItem(getItemSlot("rail", "boxcart", player), rail);
|
||||
for (int slot : getItemSlotArray("cart", "boxcart", player)) {
|
||||
inv.setItem(getItemSlot("rail", "cart", player), rail);
|
||||
for (int slot : getItemSlotArray("cart", "cart", player)) {
|
||||
inv.setItem(slot, cart);
|
||||
}
|
||||
inv.setItem(getItemSlot("goldenapple", "boxcart", player), goldenapple);
|
||||
inv.setItem(getItemSlot("cobweb", "boxcart", player), cobweb);
|
||||
inv.setItem(getItemSlot("shield", "boxcart", player), shield);
|
||||
inv.setItem(getItemSlot("bow", "boxcart", player), bow);
|
||||
inv.setItem(getItemSlot("arrow", "boxcart", player), arrow);
|
||||
for (int slot : getItemSlotArray("fireresistance", "boxcart", player)) {
|
||||
inv.setItem(getItemSlot("goldenapple", "cart", player), goldenapple);
|
||||
inv.setItem(getItemSlot("cobweb", "cart", player), cobweb);
|
||||
inv.setItem(getItemSlot("shield", "cart", player), shield);
|
||||
inv.setItem(getItemSlot("bow", "cart", player), bow);
|
||||
inv.setItem(getItemSlot("arrow", "cart", player), arrow);
|
||||
for (int slot : getItemSlotArray("fireresistance", "cart", player)) {
|
||||
inv.setItem(slot, fireresistance);
|
||||
}
|
||||
for (int slot : getItemSlotArray("strength", "boxcart", player)) {
|
||||
for (int slot : getItemSlotArray("strength", "cart", player)) {
|
||||
inv.setItem(slot, strength);
|
||||
}
|
||||
for (int slot : getItemSlotArray("speed", "boxcart", player)) {
|
||||
for (int slot : getItemSlotArray("speed", "cart", player)) {
|
||||
inv.setItem(slot, speed);
|
||||
}
|
||||
inv.setItem(getItemSlot("cherrylog", "boxcart", player), cherrylog);
|
||||
inv.setItem(getItemSlot("crossbow", "boxcart", player), crossbow);
|
||||
inv.setItem(getItemSlot("flintandsteel", "boxcart", player), flintandsteel);
|
||||
inv.setItem(getItemSlot("totem", "boxcart", player), totem);
|
||||
inv.setItem(getItemSlot("pickaxe", "boxcart", player), pickaxe);
|
||||
inv.setItem(getItemSlot("shulker", "boxcart", player), shulker);
|
||||
inv.setItem(getItemSlot("cherrylog", "cart", player), cherrylog);
|
||||
inv.setItem(getItemSlot("crossbow", "cart", player), crossbow);
|
||||
inv.setItem(getItemSlot("flintandsteel", "cart", player), flintandsteel);
|
||||
inv.setItem(getItemSlot("totem", "cart", player), totem);
|
||||
inv.setItem(getItemSlot("pickaxe", "cart", player), pickaxe);
|
||||
inv.setItem(getItemSlot("shulker", "cart", player), shulker);
|
||||
|
||||
return inv;
|
||||
}
|
||||
|
||||
public Inventory getMaceKit(Player player) {
|
||||
public PlayerInventory getMaceKit(Player player) {
|
||||
|
||||
PlayerInventory inv = player.getInventory();
|
||||
|
||||
@@ -355,7 +355,7 @@ public class Kits {
|
||||
return inv;
|
||||
}
|
||||
|
||||
public Inventory getAxeKit(Player player) {
|
||||
public PlayerInventory getAxeKit(Player player) {
|
||||
|
||||
PlayerInventory inv = player.getInventory();
|
||||
|
||||
@@ -376,7 +376,7 @@ public class Kits {
|
||||
return inv;
|
||||
}
|
||||
|
||||
public Inventory getDiamondSmpKit(Player player) {
|
||||
public PlayerInventory getDiamondSmpKit(Player player) {
|
||||
|
||||
PlayerInventory inv = player.getInventory();
|
||||
|
||||
@@ -471,4 +471,30 @@ public class Kits {
|
||||
|
||||
return inv;
|
||||
}
|
||||
|
||||
public PlayerInventory getCrystalKit(Player player) {
|
||||
|
||||
PlayerInventory inv = player.getInventory();
|
||||
|
||||
ItemStack helmet = new ItemStack(Material.NETHERITE_HELMET);
|
||||
ItemStack chestplate = new ItemStack(Material.NETHERITE_CHESTPLATE);
|
||||
ItemStack leggings = new ItemStack(Material.NETHERITE_LEGGINGS);
|
||||
ItemStack boots = new ItemStack(Material.NETHERITE_BOOTS);
|
||||
ItemStack anchor = new ItemStack(Material.RESPAWN_ANCHOR, 64);
|
||||
ItemStack glowstone = new ItemStack(Material.GLOWSTONE, 64);
|
||||
ItemStack enderpearl = new ItemStack(Material.ENDER_PEARL, 16);
|
||||
ItemStack shield = new ItemStack(Material.SHIELD);
|
||||
ItemStack goldenapple = new ItemStack(Material.GOLDEN_APPLE, 64);
|
||||
ItemStack obsidian = new ItemStack(Material.OBSIDIAN, 64);
|
||||
ItemStack crystal = new ItemStack(Material.END_CRYSTAL, 64);
|
||||
ItemStack sword = new ItemStack(Material.NETHERITE_SWORD);
|
||||
ItemStack totem = new ItemStack(Material.TOTEM_OF_UNDYING);
|
||||
ItemStack xp = new ItemStack(Material.EXPERIENCE_BOTTLE, 64);
|
||||
ItemStack arrow = new ItemStack(Material.TIPPED_ARROW, 64);
|
||||
ItemStack axe = new ItemStack(Material.NETHERITE_AXE);
|
||||
ItemStack crossbow = new ItemStack(Material.CROSSBOW);
|
||||
ItemStack pickaxe = new ItemStack(Material.NETHERITE_PICKAXE);
|
||||
|
||||
return inv;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user