diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index ff42388a..9ac1f15f 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -1,6 +1,6 @@ -### 1.3.4 ### 1.3.5 Release (03.01.2024) * Fixed GameProfile API 1.20 change +* Fixed none kits related plugins issues ### 1.3.4 Release (31.12.2023) * Moved kits.yml into kits folder, separate file per kit diff --git a/MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/arena/PluginArenaManager.java b/MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/arena/PluginArenaManager.java index 0aa4e5dd..70c572a2 100644 --- a/MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/arena/PluginArenaManager.java +++ b/MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/arena/PluginArenaManager.java @@ -96,7 +96,10 @@ public void joinAttempt(@NotNull Player player, @NotNull PluginArena arena) { new MessageBuilder(MessageBuilder.ActionType.JOIN).arena(arena).player(player).sendArena(); new TitleBuilder("IN_GAME_JOIN_TITLE").asKey().arena(arena).player(player).sendPlayer(); - plugin.getUserManager().getUser(player).setKit(plugin.getKitRegistry().getDefaultKit()); + if(plugin.getConfigPreferences().getOption("KITS")) { + plugin.getUserManager().getUser(player).setKit(plugin.getKitRegistry().getDefaultKit()); + return; + } plugin.getSpecialItemManager().addSpecialItemsOfStage(player, SpecialItem.DisplayStage.LOBBY); if(arena.getArenaState() == ArenaState.WAITING_FOR_PLAYERS) { plugin.getSpecialItemManager().addSpecialItemsOfStage(player, SpecialItem.DisplayStage.WAITING_FOR_PLAYERS); diff --git a/MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/arena/states/PluginStartingState.java b/MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/arena/states/PluginStartingState.java index f5564287..f6c8d222 100644 --- a/MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/arena/states/PluginStartingState.java +++ b/MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/arena/states/PluginStartingState.java @@ -103,7 +103,10 @@ public void handleCall(PluginArena arena) { player.getInventory().clear(); player.setGameMode(GameMode.SURVIVAL); User user = plugin.getUserManager().getUser(player); - user.getKit().giveKitItems(player); + if(plugin.getConfigPreferences().getOption("KITS")) { + user.getKit().giveKitItems(player); + return; + } player.updateInventory(); plugin.getUserManager().addExperience(player, 10); new MessageBuilder("IN_GAME_MESSAGES_LOBBY_GAME_START").asKey().arena(arena).player(player).sendPlayer(); diff --git a/MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/user/User.java b/MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/user/User.java index 01e52beb..e97d721e 100644 --- a/MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/user/User.java +++ b/MiniGamesBox Classic/src/main/java/plugily/projects/minigamesbox/classic/user/User.java @@ -43,7 +43,7 @@ public class User { private final UUID uuid; private boolean spectator = false; private boolean permanentSpectator = false; - private Kit kit = plugin.getKitRegistry().getDefaultKit(); + private Kit kit; private final Map stats = new HashMap<>(); private final Map cooldowns = new HashMap<>();