This commit is contained in:
2025-02-24 16:36:10 +01:00
parent f678965238
commit 2fe2d3fa81

View File

@@ -27,16 +27,17 @@ public class KitListener implements Listener {
@EventHandler
public void onJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
if (!player.hasPlayedBefore()) {
Map <String, Object> swordkit = new HashMap<>();
swordkit.put("sword", 0);
plugin.getConfig().set("kits.sword." + player.getUniqueId(), swordkit);
if (plugin.getConfig().get("kits.sword." + player.getUniqueId()) == null) {
Map<String, Object> swordKit = new HashMap<>();
swordKit.put("sword", 0);
plugin.getConfig().set("kits.sword." + player.getUniqueId(), swordKit);
plugin.saveConfig();
plugin.reloadConfig();
Map <String, Object> uhcKit = new HashMap<>();
int[] uhcshield = new int[] {13, 40};
int[] uhcwater = new int[] {6, 22, 23, 24};
int[] uhclava = new int[] {2, 21};
}
if (plugin.getConfig().get("kits.uhc." + player.getUniqueId()) == null) {
Map<String, Object> uhcKit = new HashMap<>();
int[] uhcshield = new int[]{13, 40};
int[] uhcwater = new int[]{6, 22, 23, 24};
int[] uhclava = new int[]{2, 21};
uhcKit.put("axe", 0);
uhcKit.put("sword", 1);
uhcKit.put("lava", uhclava);
@@ -52,13 +53,14 @@ public class KitListener implements Listener {
uhcKit.put("shield", uhcshield);
plugin.getConfig().set("kits.uhc." + player.getUniqueId(), uhcKit);
plugin.saveConfig();
plugin.reloadConfig();
Map <String, Object> boxcartKit = new HashMap<>();
int[] boxcartstrenght = new int[] {16, 25, 34};
int[] boxcartspeed = new int[] {17, 26, 35};
int[] boxcartfireresistance = new int[] {18, 27};
int[] boxcartcart = new int[] {4, 12, 21, 30, 13, 22, 31, 14, 23, 32, 15, 24, 33};
int[] boxcartenderpearl = new int[] {2, 11, 20, 29};
}
if (plugin.getConfig().get("kits.boxcart." + player.getUniqueId()) == null) {
Map<String, Object> boxcartKit = new HashMap<>();
int[] boxcartstrenght = new int[]{16, 25, 34};
int[] boxcartspeed = new int[]{17, 26, 35};
int[] boxcartfireresistance = new int[]{18, 27};
int[] boxcartcart = new int[]{4, 12, 21, 30, 13, 22, 31, 14, 23, 32, 15, 24, 33};
int[] boxcartenderpearl = new int[]{2, 11, 20, 29};
boxcartKit.put("axe", 0);
boxcartKit.put("sword", 1);
boxcartKit.put("enderpearl", boxcartenderpearl);
@@ -78,8 +80,8 @@ public class KitListener implements Listener {
boxcartKit.put("totem", 40);
plugin.getConfig().set("kits.boxcart." + player.getUniqueId(), boxcartKit);
plugin.saveConfig();
plugin.reloadConfig();
}
}
@EventHandler