mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +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
|
@Override
|
||||||
public boolean onBlockDestroy(Player modPlayer, Block blockClicked) {
|
public boolean onBlockDestroy(Player modPlayer, Block blockClicked) {
|
||||||
if (!canUseCommand(modPlayer, "/editpos1")
|
if (!canUseCommand(modPlayer, "/editpos1")
|
||||||
&& !canUseCommand(modPlayer, "//")
|
&& !canUseCommand(modPlayer, "//")) { return false; }
|
||||||
&& !canUseCommand(modPlayer, "/worldedit")) { return false; }
|
|
||||||
|
|
||||||
WorldEdit worldEdit = WorldEdit.getInstance();
|
WorldEdit worldEdit = WorldEdit.getInstance();
|
||||||
WorldEditPlayer player = new SMWorldEditPlayer(modPlayer);
|
WorldEditPlayer player = new SMWorldEditPlayer(modPlayer);
|
||||||
@ -113,8 +112,16 @@ public class SMWorldEditListener extends PluginListener {
|
|||||||
}
|
}
|
||||||
} else if (player.isHoldingPickAxe()) {
|
} else if (player.isHoldingPickAxe()) {
|
||||||
if (session.hasSuperPickAxe()) {
|
if (session.hasSuperPickAxe()) {
|
||||||
return etc.getMCServer().e.d(blockClicked.getX(),
|
Vector pos = new Vector(blockClicked.getX(),
|
||||||
blockClicked.getY(), blockClicked.getZ(), 0);
|
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