diff --git a/src/main/java/com/lishid/openinv/internal/v1_10_R1/SpecialEnderChest.java b/src/main/java/com/lishid/openinv/internal/v1_10_R1/SpecialEnderChest.java index 62ceee70..eca499b8 100644 --- a/src/main/java/com/lishid/openinv/internal/v1_10_R1/SpecialEnderChest.java +++ b/src/main/java/com/lishid/openinv/internal/v1_10_R1/SpecialEnderChest.java @@ -62,13 +62,12 @@ public SpecialEnderChest(OpenInv plugin, Player p, Boolean online) { private void setItemArrays(InventorySubcontainer subcontainer, ItemStack[] items) { try { // Prepare to remove final modifier - Field modifiers; - modifiers = Field.class.getDeclaredField("modifiers"); + Field modifiers = Field.class.getDeclaredField("modifiers"); modifiers.setAccessible(true); // Access and replace main inventory array Field field = InventorySubcontainer.class.getField("items"); modifiers.setInt(field, field.getModifiers() & ~Modifier.FINAL); - field.set(inventory, items); + field.set(subcontainer, items); } catch (NoSuchFieldException e) { e.printStackTrace(); } catch (SecurityException e) { diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 1a3581be..ae0b2f76 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,6 +1,6 @@ name: OpenInv main: com.lishid.openinv.OpenInv -version: 2.4.7 +version: 2.4.8 author: lishid authors: [Jikoo] description: >