Solved CraftBlock String to block

Discussion in 'Plugin Development' started by MrFrozen, Jun 5, 2016.

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

    MrFrozen

    Hey Bukkit,

    I have saved a CraftBlock string in the config
    Code:
    CraftBlock{chunk=CraftChunk{x=-5z=16},x=-76,y=102,z=263,type=WALL_SIGN,data=4}
    How can access that as a block in the code so I can use it again?
     
  2. Offline

    Xerox262

    @MrFrozen Use the coordinates along with World#getBlockAtLocation(), get the block, check that it's still a wall sign
     
  3. Offline

    Betagear

    Do not serialize them, make them more appealing like World/x/y/z/type, you'll have a hard time removing the useless data saved.
     
  4. Offline

    MrFrozen

    OKe, I will use that instead! Thanks!
     
  5. Offline

    Betagear

    @MrFrozen Also, I want to warn you ahead : There are dots in the coordinates, replace them all with _, then at the time of extracting it from the string, you can revert them to dots.
     
Thread Status:
Not open for further replies.

Share This Page