How to respawn a block at a position?

Discussion in 'Plugin Development' started by Lookatmego, Jun 27, 2012.

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

    Lookatmego

    Hey there,

    Im attempting to respawn a certain block type(diamond block) at a certain x,y,z cord. How would I do this?Ive tried a couple of ways which gives me null pointers..any ideas?
     
  2. Code:
    Bukkit.getWorld(<worldname>).getBlockAt(x, y, z).setType(Material.DIAMOND_BLOCK);
    something like that.
     
  3. Offline

    Lookatmego

    i did that and i get null pointer exceptions
     
  4. Offline

    theguynextdoor

    Make sure the world name is spelt correctly. Which is case sensitive as well. If that still doesnt work then post your code and error so we can take a proper look.
     
  5. Offline

    Lookatmego

    nope i got it working thanks:D i had multiple problems 1 i was spawning material.DIAMOND and also had the world name messed up:) thanks tho
     
Thread Status:
Not open for further replies.

Share This Page