3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-12 14:10:07 +01:00

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