Skip to content

Commit

Permalink
Fix a bug in setting player slots
Browse files Browse the repository at this point in the history
  • Loading branch information
iceBear67 committed Oct 16, 2024
1 parent cad1657 commit 7061f01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/dev/tylerm/khs/game/PlayerLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -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()); i++) {
if (SEEKER_ITEMS.get(i) == null) continue;
player.getInventory().setItem(i, SEEKER_ITEMS.get(i));
}
Expand All @@ -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, SEEKER_ITEMS.size()); i++) {
if (HIDER_ITEMS.get(i) == null) continue;
player.getInventory().setItem(i, HIDER_ITEMS.get(i));
}
Expand Down

0 comments on commit 7061f01

Please sign in to comment.