Skip to content

Commit

Permalink
do the same with duels
Browse files Browse the repository at this point in the history
  • Loading branch information
Inf1nityy committed Nov 5, 2024
1 parent 7d10a40 commit 8469524
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
}
Expand Down

0 comments on commit 8469524

Please sign in to comment.