From e7c1e844fdd53ac6bf0565816043d88fcf5ed096 Mon Sep 17 00:00:00 2001 From: Luca Acquafredda Date: Thu, 6 Jun 2024 01:23:36 +0200 Subject: [PATCH] Corrected player give class --- .../java/lar/minecraft/hg/managers/PlayerClassManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/lar/minecraft/hg/managers/PlayerClassManager.java b/src/main/java/lar/minecraft/hg/managers/PlayerClassManager.java index 6e5aa38..a04834e 100644 --- a/src/main/java/lar/minecraft/hg/managers/PlayerClassManager.java +++ b/src/main/java/lar/minecraft/hg/managers/PlayerClassManager.java @@ -17,12 +17,12 @@ public static void giveClasses() { PlayerExtra playerExtra = PlayerManager.playerExtras.getOrDefault(player.getUniqueId(), null); if (playerExtra != null) { PlayerClass playerClass = playerExtra.getPlayerClass(); - if (playerClass != null) { - playerClass.getAction().perform(player); // Give class items to players who chosen a class - } if(playerClass == null || playerClass != PlayerClass.hardcore) { playerInventory.addItem(new ItemStack(Material.COMPASS)); // Give a compass to all players } + if (playerClass != null) { + playerClass.getAction().perform(player); // Give class items to players who chosen a class + } } player.updateInventory(); }