diff --git a/plugin/src/main/java/me/filoghost/chestcommands/inventory/DefaultMenuView.java b/plugin/src/main/java/me/filoghost/chestcommands/inventory/DefaultMenuView.java index 30d6178..f1644d8 100644 --- a/plugin/src/main/java/me/filoghost/chestcommands/inventory/DefaultMenuView.java +++ b/plugin/src/main/java/me/filoghost/chestcommands/inventory/DefaultMenuView.java @@ -19,8 +19,8 @@ import org.jetbrains.annotations.NotNull; public class DefaultMenuView implements MenuView { private final BaseMenu menu; - private final InventoryGrid bukkitInventory; private final Player viewer; + private final InventoryGrid bukkitInventory; public DefaultMenuView(BaseMenu menu, Player viewer) { this.menu = menu; @@ -45,7 +45,7 @@ public class DefaultMenuView implements MenuView { } } - public void open(Player viewer) { + public void open() { viewer.openInventory(bukkitInventory.getInventory()); } diff --git a/plugin/src/main/java/me/filoghost/chestcommands/menu/BaseMenu.java b/plugin/src/main/java/me/filoghost/chestcommands/menu/BaseMenu.java index 6d23a4f..0407266 100644 --- a/plugin/src/main/java/me/filoghost/chestcommands/menu/BaseMenu.java +++ b/plugin/src/main/java/me/filoghost/chestcommands/menu/BaseMenu.java @@ -65,7 +65,7 @@ public abstract class BaseMenu implements Menu { Preconditions.notNull(player, "player"); DefaultMenuView menuView = new DefaultMenuView(this, player); - menuView.open(player); + menuView.open(); return menuView; }