Block Placing not working

Discussion in 'Bukkit Help' started by jsutaria, Jul 1, 2016.

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

    jsutaria

    if (args[0].equalsIgnoreCase("build")) {

    Chunk chunk = player.getLocation().getChunk();

    Block block = chunk.getBlock(0, 5, 0);

    //first try (doesn't work)
    block.getState().setType(Material.STONE);

    block.getState().update();

    //second try (doesn't work)
    block.setType(Material.STONE);

    return true;

    }

    I have the following code and when I run the command, none of them work. When I print in block.getType(), it shows that it is stone, but when I am looking at it, it looks like air. What is going on?
     
Thread Status:
Not open for further replies.

Share This Page