Improve WireframeCommand

This commit is contained in:
2026-03-25 08:20:51 +01:00
parent 02aad8d094
commit 6700c16c18
2 changed files with 7 additions and 7 deletions
@@ -57,12 +57,12 @@ public class TestblockCommand extends SWCommand {
super("testblock", "tb", "dummy"); super("testblock", "tb", "dummy");
} }
@Register @Register(description = {"REGION_TB_HELP_RESET", "REGION_TB_HELP_RESET_EXTENSION"})
public void schematicTestblockCommand(@Validator Player p, TestblockParameterType... testblockParameterTypes) { public void schematicTestblockCommand(@Validator Player p, TestblockParameterType... testblockParameterTypes) {
schematicTestblockCommand(p, null, testblockParameterTypes); schematicTestblockCommand(p, null, testblockParameterTypes);
} }
@Register @Register(description = {"REGION_TB_HELP_SCHEMATIC", "REGION_TB_HELP_SCHEMATIC_EXTENSION"})
public void schematicTestblockCommand(@Validator Player p, @Mapper("withPublic") SchematicNode node, TestblockParameterType... testblockParameterTypes) { public void schematicTestblockCommand(@Validator Player p, @Mapper("withPublic") SchematicNode node, TestblockParameterType... testblockParameterTypes) {
Set<TestblockParameterType> testblockParameterTypesSet = new HashSet<>(Arrays.asList(testblockParameterTypes)); Set<TestblockParameterType> testblockParameterTypesSet = new HashSet<>(Arrays.asList(testblockParameterTypes));
boolean isExtension = testblockParameterTypesSet.contains(TestblockParameterType.EXTENSION); boolean isExtension = testblockParameterTypesSet.contains(TestblockParameterType.EXTENSION);
@@ -38,7 +38,7 @@ public class WireframeCommand extends SWCommand {
super("wireframe"); super("wireframe");
} }
@Register @Register(description = "REGION_WIREFRAME_HELP_RESET")
public void wireframeCommand(@Validator Player p) { public void wireframeCommand(@Validator Player p) {
Region region = regionCheck(p); Region region = regionCheck(p);
if (region == null) return; if (region == null) return;
@@ -48,10 +48,10 @@ public class WireframeCommand extends SWCommand {
.ignoreAir(true) .ignoreAir(true)
.color(region.getRegionData().get(Flag.COLOR).getWithDefault()); .color(region.getRegionData().get(Flag.COLOR).getWithDefault());
region.getBuildArea().reset(pasteBuilder, false); region.getBuildArea().reset(pasteBuilder, false);
RegionUtils.message(region, "REGION_TB_DONE"); RegionUtils.message(region, "REGION_WIREFRAME_DONE");
} catch (SecurityException e) { } catch (SecurityException e) {
BauSystem.MESSAGE.send("REGION_TB_ERROR", p); BauSystem.MESSAGE.send("REGION_WIREFRAME_ERROR", p);
Bukkit.getLogger().log(Level.WARNING, "Failed testblock", e); Bukkit.getLogger().log(Level.WARNING, "Failed wireframe", e);
} }
} }
@@ -69,7 +69,7 @@ public class WireframeCommand extends SWCommand {
} }
} }
if (region.getTestblockArea().isEmpty()) { if (region.getTestblockArea().isEmpty()) {
BauSystem.MESSAGE.send("REGION_TB_NO_REGION", player); BauSystem.MESSAGE.send("REGION_WIREFRAME_NO_REGION", player);
return null; return null;
} }
return region; return region;