Solved Protocollib NBT Liberary

Discussion in 'Plugin Development' started by jerryh96, Jul 23, 2015.

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

    jerryh96

    @aadnk @Comphenix
    How to get the NbtCompound from a NbtList ? I have tried the way list.getValue(i); but not success.

    Caused by: java.lang.ClassCastException: com.comphenix.protocol.wrappers.nbt.WrappedCompound$1 cannot be cast to com.comphenix.protocol.wrappers.nbt.NbtCompound

    for(Object base : list.asCollection())
    {
    if(base instanceof NbtCompound)
    {
    NbtCompound compound = (NbtCompound) base;
    }
    }

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 11, 2016
Thread Status:
Not open for further replies.

Share This Page