1.14.4 org.bukkit.Location import...

Discussion in 'Spigot Plugin Development' started by THE_REal_jadENO, Jul 18, 2021 at 12:00 PM.

  1. Hello. I imported the import org.bukkit.Location for my Plugin. Everything was fine, but if I try to make bl.getBlock.setData(gunblockdata.get(bl)); it just doesn't work. In 1.8.8 it worked but I am programming in 1.14.4... What do I have to do?
     
  2. Block#setData(int) does not exist in 1.13 and up. Read to javadoc : https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/block/Block.html (it's the javadoc in 1.17.1, you can google "spigot javadoc 1.14 to get the 1.14 javadoc, but methods should be ok here)

    You can get the data then modify it with BlockData that isn't a magic number anymore, but Block#setBlockData(BlockData)
     
  3. Ok, can u write the code that I have to write then?
     
  4. Block#setBlockData(BlockData)
    depending on what block you’re trying to change every type of block can have their own block data
     
  5. I have no idea what is gunblockdata.get(bl) ...