From 84695242bfd4035b9321940960bf595bd87dac84 Mon Sep 17 00:00:00 2001 From: Infinityy <120841985+Inf1nityy@users.noreply.github.com> Date: Tue, 5 Nov 2024 16:07:31 +0100 Subject: [PATCH] do the same with duels --- .../com/nexia/minigames/games/duels/DuelGameHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/nexia/minigames/games/duels/DuelGameHandler.java b/src/main/java/com/nexia/minigames/games/duels/DuelGameHandler.java index d0700307..a8d3ee92 100644 --- a/src/main/java/com/nexia/minigames/games/duels/DuelGameHandler.java +++ b/src/main/java/com/nexia/minigames/games/duels/DuelGameHandler.java @@ -13,7 +13,6 @@ import com.nexia.minigames.games.duels.team.TeamDuelsGame; import com.nexia.minigames.games.duels.util.player.DuelsPlayerData; import com.nexia.nexus.api.util.Identifier; -import io.github.blumbo.inventorymerger.InventoryMerger; import io.github.blumbo.inventorymerger.saving.SavableInventory; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.TextColor; @@ -94,7 +93,9 @@ public static void loadInventory(NexiaPlayer player, String gameMode) { } if(layout != null) { - player.unwrap().inventory.replaceWith(layout.asPlayerInventory()); + for (int i = 0; i < player.unwrap().inventory.getContainerSize(); i++) { + player.unwrap().inventory.setItem(i, layout.asPlayerInventory().getItem(i)); + } } else { InventoryUtil.loadInventory(player, "duels", gameMode.toLowerCase()); }