NBTFactory broken?

Discussion in 'Plugin Development' started by TigerHix, Apr 13, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    TigerHix

    Refers to:
    https://gist.github.com/aadnk/6754159 - Attribute.java
    https://gist.github.com/aadnk/6754421 - AttributeStorage.java
    https://github.com/aadnk/AttributeS.../java/com/comphenix/attribute/NbtFactory.java - NBTFactory.java

    The error:

    1. 59:26 [Server] INFO at com.tigerhix.framework.lib.AttributeStorage.setData(AttributeStorage.java:51) ~[?:?]
    2. 13.04 04:59:26 [Server] INFO at com.tigerhix.framework.lib.Attributes.<init>(Attributes.java:215) ~[?:?]
    3. 13.04 04:59:26 [Server] INFO at com.tigerhix.framework.lib.NbtFactory.getCraftItemStack(NbtFactory.java:520) ~[?:?]
    4. 13.04 04:59:26 [Server] INFO at com.tigerhix.framework.lib.NbtFactory.get(NbtFactory.java:301) ~[?:?]
    5. 13.04 04:59:26 [Server] INFO at com.tigerhix.framework.lib.NbtFactory.<init>(NbtFactory.java:331) ~[?:?]
    6. 13.04 04:59:26 [Server] INFO at com.tigerhix.framework.lib.NbtFactory.getMethod(NbtFactory.java:704) ~[?:?]
    7. 13.04 04:59:26 [Server] INFO at com.tigerhix.framework.lib.NbtFactory.getMethod(NbtFactory.java:705) ~[?:?]
    8. 13.04 04:59:26 [Server] INFO java.lang.IllegalStateException: Unable to find method null ([interface java.io.DataInput]).

    When executing the line with >, above error shows in the console.

    this.itemStack = {a random itemstack};
    AttributeStorage storage = AttributeStorage.newTarget(this.itemStack);
    > storage.setData(String.valueOf(id));
    this.itemStack = storage.getTarget();

    The error will not show up in 1.7.5 but only 1.7.8 (CraftBukkit), so I guess thats because some method originally refers to are now deleted, so getMethod() throws an exception. Could anyone help?

    Comphenix Of course its better to find the original author XD
     
  2. Offline

    Comphenix

    Ah, I just fixed this exact thing in ProtocolLib. I really wish Bukkit had a proper automatic dependency system, like Maven, and I'd only need to do this once.

    In any case, try the latest version of AttributeStorage. It should work in 1.7.2 and 1.7.8.
     
Thread Status:
Not open for further replies.

Share This Page