Removing block

Discussion in 'Spigot Plugin Development' started by Hangar555, Jun 9, 2016.

  1. Hello, I want to remove block when the a countdown is over.
    Code (Java):

    //Countdown Stuff
    world.getBlock(DIAMOND_BLOCK).setType(Material.AIR);
    Is this correct?
     
  2. MiniDigger

    Supporter

    wat
    did you try it? there is no need to start a thread if you did not try it... it should work (assuming you are using a real Block instance and not the bullshit "copy&paste protection" you put in place for whatever reason.
     
  3. Make a runnable with a timer int and cancel it when that timer hits 0, and why would you need to protect that code LMAo thats the most bs ive heard in a while. all it look slike your doing is
    world.getblockAt(x, y, z).getType().setType(Material.AIR);l
     
  4. Omnivion

    Patron

    World#getBlock(Location)
    Block#setType(Material)

    Use the bukkit scheduler api to do this at a later time
     
  5. if you dont understand what i said, learn java/spigot first.
     
  6. Code (Text):
    player.getWorld().getBlockAt(Location location).setType(Material material);
     
    • Like Like x 1