Block Placement With Plugin

Discussion in 'Plugin Development' started by bob0310, Nov 6, 2014.

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

    bob0310

    I was wondering if its possible to have the plugin or console place blocks in the world. If so how might I do this?
     
  2. Offline

    TheCodingCat

    yes you can bob0310 if you are familiar with the bukkit API (why ask a stupid question cat this bukkit plugin development :p) then you can place a block with
    <YourWorld>.getBlockAt(<YourLocation>).setType(Material.<yourMaterial>);
     
  3. Offline

    reider45

    Yes, you can.

    Code:java
    1. Bukkit.getWorld("world").getBlockAt(location).setType(Material.OBSIDIAN);


    This would set the block at location to obsidian
     
  4. Offline

    WesJD

    bob0310
    Just make accessible command from the console and make it run the code shown above.
     
  5. Offline

    bob0310

  6. Offline

    TheCodingCat

    bob0310 do you have enough expirience with the bukkit API to know how to make commands?
     
  7. Offline

    WesJD

  8. Offline

    TheCodingCat

  9. Offline

    bob0310

Thread Status:
Not open for further replies.

Share This Page