forked from SteamWar/SteamWar
Add /tb default subcommand
This commit is contained in:
+14
-23
@@ -73,6 +73,16 @@ public class TestblockCommand extends SWCommand {
|
|||||||
resetRegion(p, node, isExtension ? RegionExtensionType.EXTENSION : RegionExtensionType.NORMAL, isIgnoreAir, isOnlyColor, replaceTNT, replaceWater);
|
resetRegion(p, node, isExtension ? RegionExtensionType.EXTENSION : RegionExtensionType.NORMAL, isIgnoreAir, isOnlyColor, replaceTNT, replaceWater);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Register(value="default")
|
||||||
|
public void setTestblockDefault(Player p) {
|
||||||
|
Region region = regionCheck(p);
|
||||||
|
if (region == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
region.getRegionData().setTestblockSchematic(null);
|
||||||
|
resetRegion(p, null, RegionExtensionType.EXTENSION, false, false, false, false);
|
||||||
|
}
|
||||||
|
|
||||||
private void resetRegion(Player p, SchematicNode node, RegionExtensionType regionExtensionType, boolean ignoreAir, boolean onlyColors, boolean removeTNT, boolean removeWater) {
|
private void resetRegion(Player p, SchematicNode node, RegionExtensionType regionExtensionType, boolean ignoreAir, boolean onlyColors, boolean removeTNT, boolean removeWater) {
|
||||||
Region region = regionCheck(p);
|
Region region = regionCheck(p);
|
||||||
if (region == null) return;
|
if (region == null) return;
|
||||||
@@ -93,29 +103,10 @@ public class TestblockCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Beta Tester enabled
|
if (node == null) {
|
||||||
switch (BauServer.getInstance().getOwnerID()) {
|
node = region.getRegionData().getTestblockSchematic();
|
||||||
case 245:
|
} else {
|
||||||
case 403:
|
region.getRegionData().setTestblockSchematic(node);
|
||||||
case 1898:
|
|
||||||
case 3320:
|
|
||||||
case 4603:
|
|
||||||
case 5262:
|
|
||||||
case 5399:
|
|
||||||
case 6032:
|
|
||||||
case 7862:
|
|
||||||
case 11077:
|
|
||||||
case 11888:
|
|
||||||
case 12258:
|
|
||||||
case 16009:
|
|
||||||
if (node == null) {
|
|
||||||
node = region.getRegionData().getTestblockSchematic();
|
|
||||||
} else {
|
|
||||||
region.getRegionData().setTestblockSchematic(node);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PasteBuilder.ClipboardProvider clipboardProvider;
|
PasteBuilder.ClipboardProvider clipboardProvider;
|
||||||
|
|||||||
Reference in New Issue
Block a user