Destroy Block

Discussion in 'Plugin Development' started by Tuna, Feb 9, 2011.

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

    Tuna

    Hey guys,

    I've been working on a multi-tool plugin which will have a lot of features for the player (time manipulation, porting, cuboid like selection/replacement,etc...) and I have most of it completed except for a few issues. I'm wondering is there a way to call a command in java and destroy a block?

    Say I hit a block with a sword, I pick up the damaged block coordinates and use that to select the block directly behind it. Now how would I break that block directly behind the one I hit? I can replace it with air which will make the block disappear, but you will lose any material it contained. I guess what I'm asking is how do I actually "break" a block, like you would with a pickaxe, but in Java? If there is even a way to do this haha.

    Thanks!
     
  2. Offline

    CaseyServer

    Hello! I was just wondering when you wil be releasing this plugin!
     
  3. Offline

    Axle

    I saw a plugin on this site somewhere that offered the ability to modify what dropped out of a destroyed block. I'm still new to the API, so, if I was doing what you were doing, I'd probably go check if they're offering the source for the plugin. Chances are, what you're hoping to achieve will be available in there.

    Here's the link to said plugin:
    http://forums.bukkit.org/threads/me...anything-drops-mobs-vehicles-blocks-185.2177/

    I apologize for such an indirect answer, as I said, I'm still new with this. I just hope this answers your question on the ability to create a "dropped" block.
     
  4. Replace with air and then spawn corresponding item maybe
     
  5. Offline

    Tuna

    Thanks Guys! And I appreciate your interest :D I'm planning on releasing the plugin either tonight or tomorrow. Currently it has a working /give command with names and quantities (like "/give wood 30" adds 30 wood to inventory) a boomstick ("/boomstick 2" will make it so each swing of the stick clears a 2x2x2 cube around the player, 2 can be replaced with any number) basic /time command, and basic /warp functionality similar to hey0's. Let me know if you want anything else before tonight :D
    --- merged: Feb 13, 2011 8:32 PM ---
    oh and for survival mode, there's a command I added called "/ohshit" in which it will instantly spawn a temporary shelter around the player with torches and such. In case of a sneaky creeper incursion :p
    --- merged: Feb 14, 2011 5:34 PM ---
    Hey again, I released the plugin last night and its available here!

    http://forums.bukkit.org/threads/misc-tpack-v1-0-multi-tool-pack.4334/
     
Thread Status:
Not open for further replies.

Share This Page