mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-16 17:16:11 +00:00
Added //bedrock permission that allows super pick axe users to destroy bedrock.
This commit is contained in:
parent
ce16f6e04d
commit
327632b4d0
@ -80,8 +80,7 @@ public class SMWorldEditListener extends PluginListener {
|
||||
@Override
|
||||
public boolean onBlockDestroy(Player modPlayer, Block blockClicked) {
|
||||
if (!canUseCommand(modPlayer, "/editpos1")
|
||||
&& !canUseCommand(modPlayer, "//")
|
||||
&& !canUseCommand(modPlayer, "/worldedit")) { return false; }
|
||||
&& !canUseCommand(modPlayer, "//")) { return false; }
|
||||
|
||||
WorldEdit worldEdit = WorldEdit.getInstance();
|
||||
WorldEditPlayer player = new SMWorldEditPlayer(modPlayer);
|
||||
@ -113,8 +112,16 @@ public class SMWorldEditListener extends PluginListener {
|
||||
}
|
||||
} else if (player.isHoldingPickAxe()) {
|
||||
if (session.hasSuperPickAxe()) {
|
||||
return etc.getMCServer().e.d(blockClicked.getX(),
|
||||
blockClicked.getY(), blockClicked.getZ(), 0);
|
||||
Vector pos = new Vector(blockClicked.getX(),
|
||||
blockClicked.getY(), blockClicked.getZ());
|
||||
if (WorldEdit.getServer().getBlockType(pos) == 7
|
||||
&& !canUseCommand(modPlayer, "//bedrock")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
WorldEdit.getServer().setBlockType(pos, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user