Solved Instabreak block like a WorldEdit

Discussion in 'Plugin Development' started by Pr07o7yp3, May 1, 2013.

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

    Pr07o7yp3

    Ok, I'm trying to make a plugin for InstaBreak block like a Super Pickaxe in WorldEdit.

    I have this code:
    Code:
    public void onPlayerInteract(PlayerInteractEvent event)
    {
        if (event.getAction().equals(Action.LEFT_CLICK_BLOCK))
        {
            event.getClickedBlock().setTypeId(0);
        }
    }
    Actually, it works but there is no effect.
    The block just disappeared. There is no breaking effect. Any ideas how to add this effect?

    Thanks. :)
     
  2. Offline

    Chinwe

    I think the effect STEP_SOUND is the effect you're looking for?

    But to actually instabreak the block, try calling a block break event like this:
    Code:
    Bukkit.getPluginManager().callEvent(new BlockBreakEvent(parameters))
     
  3. Offline

    Pr07o7yp3

    Thanks. The STEP_SOUND effect was what I needed. :)
     
Thread Status:
Not open for further replies.

Share This Page