diff --git a/internal/v1_21_R1/src/main/java/com/lishid/openinv/internal/v1_21_R1/container/menu/OpenChestMenu.java b/internal/v1_21_R1/src/main/java/com/lishid/openinv/internal/v1_21_R1/container/menu/OpenChestMenu.java index ca969983..a3b331ed 100644 --- a/internal/v1_21_R1/src/main/java/com/lishid/openinv/internal/v1_21_R1/container/menu/OpenChestMenu.java +++ b/internal/v1_21_R1/src/main/java/com/lishid/openinv/internal/v1_21_R1/container/menu/OpenChestMenu.java @@ -45,7 +45,7 @@ public abstract class OpenChestMenu> bukkitEntity; // Syncher fields private @Nullable ContainerSynchronizer synchronizer; private final List dataSlots = new ArrayList<>(); @@ -129,7 +129,7 @@ protected void preSlotSetup() {} @Override - public final @NotNull CraftInventoryView getBukkitView() { + public final @NotNull CraftInventoryView> getBukkitView() { if (bukkitEntity == null) { bukkitEntity = createBukkitEntity(); } @@ -137,14 +137,14 @@ protected void preSlotSetup() {} return bukkitEntity; } - protected @NotNull CraftInventoryView createBukkitEntity() { + protected @NotNull CraftInventoryView> createBukkitEntity() { Inventory top; if (viewOnly) { top = new OpenDummyInventory(container); } else { top = container.getBukkitInventory(); } - return new CraftInventoryView(viewer.getBukkitEntity(), top, this) { + return new CraftInventoryView<>(viewer.getBukkitEntity(), top, this) { @Override public @Nullable Inventory getInventory(int rawSlot) { if (viewOnly) { diff --git a/internal/v1_21_R1/src/main/java/com/lishid/openinv/internal/v1_21_R1/container/menu/OpenInventoryMenu.java b/internal/v1_21_R1/src/main/java/com/lishid/openinv/internal/v1_21_R1/container/menu/OpenInventoryMenu.java index c80af6e2..3c11fe91 100644 --- a/internal/v1_21_R1/src/main/java/com/lishid/openinv/internal/v1_21_R1/container/menu/OpenInventoryMenu.java +++ b/internal/v1_21_R1/src/main/java/com/lishid/openinv/internal/v1_21_R1/container/menu/OpenInventoryMenu.java @@ -104,7 +104,7 @@ protected boolean checkViewOnly() { } @Override - protected @NotNull CraftInventoryView createBukkitEntity() { + protected @NotNull CraftInventoryView> createBukkitEntity() { org.bukkit.inventory.Inventory bukkitInventory; if (viewOnly) { bukkitInventory = new OpenDummyInventory(container); @@ -114,7 +114,7 @@ protected boolean checkViewOnly() { bukkitInventory = container.getBukkitInventory(); } - return new CraftInventoryView(viewer.getBukkitEntity(), bukkitInventory, this) { + return new CraftInventoryView<>(viewer.getBukkitEntity(), bukkitInventory, this) { @Override public org.bukkit.inventory.ItemStack getItem(int index) { if (viewOnly || index < 0) { @@ -174,7 +174,7 @@ public int convertSlot(int rawSlot) { if (slot >= topSize) { return super.getSlotType(offset + slot); } - return container.getSlotType(offset + slot); + return OpenInventoryMenu.this.container.getSlotType(offset + slot); } @Override