Skip to content

Commit

Permalink
Fixed none kits related plugins issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigerpanzer_02 committed Jan 2, 2024
1 parent 944b687 commit 1bd3fbb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<StatisticType, Integer> stats = new HashMap<>();
private final Map<String, Double> cooldowns = new HashMap<>();

Expand Down

0 comments on commit 1bd3fbb

Please sign in to comment.