diff --git a/src/main/java/dev/tylerm/khs/game/PlayerLoader.java b/src/main/java/dev/tylerm/khs/game/PlayerLoader.java index 7fd92cd..28d086c 100644 --- a/src/main/java/dev/tylerm/khs/game/PlayerLoader.java +++ b/src/main/java/dev/tylerm/khs/game/PlayerLoader.java @@ -90,7 +90,7 @@ public static void resetPlayer(Player player, Board board) { loadPlayer(player); if (board.isSeeker(player)) { if (pvpEnabled) { - for (int i = 0; i < 9; i++) { + for (int i = 0; i < Math.min(9, SEEKER_ITEMS.size()-1); i++) { if (SEEKER_ITEMS.get(i) == null) continue; player.getInventory().setItem(i, SEEKER_ITEMS.get(i)); } @@ -107,7 +107,7 @@ public static void resetPlayer(Player player, Board board) { player.addPotionEffect(effect); } else if (board.isHider(player)) { if (pvpEnabled) { - for (int i = 0; i < 9; i++) { + for (int i = 0; i < Math.min(9, HIDER_ITEMS.size()-1); i++) { if (HIDER_ITEMS.get(i) == null) continue; player.getInventory().setItem(i, HIDER_ITEMS.get(i)); }