mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
New Command /break, and new Permission: essentials.break.bedrock
Test #1188
This commit is contained in:
parent
343618642b
commit
8ce8764f6a
1 changed files with 3 additions and 3 deletions
|
@ -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())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue