mirror of
https://github.com/TotalFreedomMC/OpenInv.git
synced 2025-01-03 13:38:21 +00:00
Correct field name for list of inventory contents (#66)
This commit is contained in:
parent
307f47e4d3
commit
ca85a392aa
29 changed files with 58 additions and 58 deletions
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvparent</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvapi</artifactId>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvparent</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvassembly</artifactId>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvparent</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
|
@ -22,7 +22,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvapi</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_4_5</artifactId>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_4_6</artifactId>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvparent</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_10_R1</artifactId>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_11_R1</artifactId>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_12_R1</artifactId>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -150,28 +150,28 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP
|
|||
Field modifiers = Field.class.getDeclaredField("modifiers");
|
||||
modifiers.setAccessible(true);
|
||||
|
||||
// Access and replace main inventory array
|
||||
// Access and replace main inventory list
|
||||
Field field = PlayerInventory.class.getField("items");
|
||||
modifiers.setInt(field, field.getModifiers() & ~Modifier.FINAL);
|
||||
field.set(inventory, items);
|
||||
|
||||
// Access and replace armor inventory array
|
||||
// Access and replace armor inventory list
|
||||
field = PlayerInventory.class.getField("armor");
|
||||
modifiers.setInt(field, field.getModifiers() & ~Modifier.FINAL);
|
||||
field.set(inventory, armor);
|
||||
|
||||
// Access and replace offhand inventory array
|
||||
// Access and replace offhand inventory list
|
||||
field = PlayerInventory.class.getField("extraSlots");
|
||||
modifiers.setInt(field, field.getModifiers() & ~Modifier.FINAL);
|
||||
field.set(inventory, extraSlots);
|
||||
|
||||
// Access and replace array containing all inventory arrays
|
||||
field = PlayerInventory.class.getDeclaredField("g");
|
||||
// Access and replace list containing all inventory lists
|
||||
field = PlayerInventory.class.getDeclaredField("f");
|
||||
field.setAccessible(true);
|
||||
modifiers.setInt(field, field.getModifiers() & ~Modifier.FINAL);
|
||||
field.set(inventory, Arrays.asList(new NonNullList[] { items, armor, extraSlots }));
|
||||
} catch (NoSuchFieldException e) {
|
||||
// Unable to set final fields to item arrays, we're screwed. Noisily fail.
|
||||
// Unable to set final fields to item lists, we're screwed. Noisily fail.
|
||||
e.printStackTrace();
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_4_R1</artifactId>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_5_R2</artifactId>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_5_R3</artifactId>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_6_R1</artifactId>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_6_R2</artifactId>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_6_R3</artifactId>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_7_R1</artifactId>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_7_R2</artifactId>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_7_R3</artifactId>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_7_R4</artifactId>
|
||||
|
@ -27,7 +27,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_8_R1</artifactId>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_8_R2</artifactId>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_8_R3</artifactId>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_9_R1</artifactId>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvinternal</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvadapter1_9_R2</artifactId>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvplugin</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvplugincore</artifactId>
|
||||
|
@ -22,12 +22,12 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvpluginv1_10_r1</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvplugin</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvpluginv1_10_r1</artifactId>
|
||||
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvcommon</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>com.lishid</groupId>
|
||||
<artifactId>openinvparent</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openinvplugin</artifactId>
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -6,7 +6,7 @@
|
|||
<artifactId>openinvparent</artifactId>
|
||||
<name>OpenInvParent</name>
|
||||
<url>http://dev.bukkit.org/bukkit-plugins/openinv/</url>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>3.2.1</version>
|
||||
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
|
Loading…
Reference in a new issue