Fix: getOpenInventory

This commit is contained in:
2024-12-01 20:13:12 +01:00
parent bf21d7ee90
commit a009c841b1
4 changed files with 17 additions and 2 deletions
@@ -55,7 +55,7 @@ public abstract class SimulatorBaseGui {
inv.setItem(i, null);
}
setup();
if (player.getOpenInventory().getTopInventory() != inv) {
if (TrickyTrialsWrapper.impl.getTopInventory(player.getOpenInventory()) != inv) {
inventory.open();
SimulatorWatcher.watch(player, simulator, this::open);
}
@@ -63,7 +63,7 @@ public abstract class SimulatorBaseGui {
player.getOpenInventory().setTitle(title());
}
populate();
if (player.getOpenInventory().getTopInventory() == inv) {
if (TrickyTrialsWrapper.impl.getTopInventory(player.getOpenInventory()) == inv) {
inventory.open();
SimulatorWatcher.watch(player, simulator, this::open);
}