Block Placing/Destroying Help

Discussion in 'Plugin Development' started by 000nick, Jun 26, 2014.

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

    000nick

    Well I made a blood plugin, and part of the plugin will feature placing a block of redstone wire on the location where the player died. I got my code to place the redstone wire successfully, but how do I destroy that same redstone and make it so that if a player destroys it (and things like fireballs,water, etc.) it does NOT drop redstone? I have an existing runnable set to 10 seconds which i would like to destroy the redstone at. Help please? Thanks, -000Nick (bsn_nick)!
     
  2. Offline

    HeadGam3z

    Set the redstone to air/null and clear the drops.
     
  3. Offline

    000nick

    HeadGam3z Well um theres not like a player.getDeathLocation, so how would I do that? If I did player.getLocation and destroyed the block underneath the player, it would break the block at spawn because there is a runnable that does its stuff and thats where I would delete the redstone block. And I'm also not sure how to clear the drop list for that redstone block in particular.
     
  4. Offline

    Krakyn<C


    Instead of breaking the redstone, just play the effect of the restone breaking.
    Code:java
    1. public void onPlayerDeathEvent(PlayerDeathEvent e){
    2. Player p = e.getPlayer();
    3. Location deathlocation = p.getLocation();
    4. p.getWorld().playEffect(deathlocation, Effect.STEP_SOUND, 331 , 5);
    5. }


    331 is the redstonedust ID.
     
  5. Offline

    000nick

    @Krakyn lol thats part of my plugin. I don't want the effect of it breaking. I want the effect of it being a temporary blood puddle lol
     
Thread Status:
Not open for further replies.

Share This Page