1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-16 19:44:15 +02:00

New Command /break, and new Permission: essentials.break.bedrock

Test #1188
This commit is contained in:
KHobbits
2011-12-03 20:41:24 +00:00
parent c6f802b83b
commit 4b876efd77

View File

@@ -15,9 +15,9 @@ public class Commandbreak extends EssentialsCommand
} }
@Override @Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{ {
Block block = user.getTargetBlock(null, 20); final Block block = user.getTargetBlock(null, 20);
if (block.getType() == Material.AIR) if (block.getType() == Material.AIR)
{ {
throw new NoChargeException(); throw new NoChargeException();
@@ -26,7 +26,7 @@ public class Commandbreak extends EssentialsCommand
{ {
throw new NoChargeException(); throw new NoChargeException();
} }
BlockBreakEvent event = new BlockBreakEvent(block, user); final BlockBreakEvent event = new BlockBreakEvent(block, user);
server.getPluginManager().callEvent(event); server.getPluginManager().callEvent(event);
if (event.isCancelled()) if (event.isCancelled())
{ {