Added //bedrock permission that allows super pick axe users to destroy bedrock.

Dieser Commit ist enthalten in:
sk89q 2010-10-19 20:56:20 -07:00
Ursprung ce16f6e04d
Commit 327632b4d0

Datei anzeigen

@ -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;
} }
} }