QOL #203
@ -156,10 +156,18 @@ public class TraceCommand extends SWCommand {
|
||||
// /trace show raw -auto at 0
|
||||
@Register(value = {"show"}, description = "TRACE_COMMAND_HELP_SHOW")
|
||||
public void showCommand(@Validator Player p, @OptionalValue("entity") ShowModeType showModeType, ShowModeParameterType... showModeParameterTypes) {
|
||||
Region region = Region.getRegion(p.getLocation());
|
||||
ShowModeParameter showModeParameter = new ShowModeParameter();
|
||||
if (region.getWaterLevel() != 0) { // Enable Water by default for regions with WaterLevel e.g. WarShip
|
||||
showModeParameter.enableWater();
|
||||
}
|
||||
for (ShowModeParameterType showModeParameterType : showModeParameterTypes) {
|
||||
if (showModeParameterType == ShowModeParameterType.WATER && region.getWaterLevel() != 0) {
|
||||
showModeParameter.disableWater();
|
||||
} else {
|
||||
showModeParameterType.getShowModeParameterConsumer().accept(showModeParameter);
|
||||
}
|
||||
}
|
||||
TraceShowManager.show(p, showModeType.showModeBiFunction.apply(p, showModeParameter));
|
||||
BauSystem.MESSAGE.send("TRACE_MESSAGE_SHOW", p);
|
||||
}
|
||||
|
@ -39,6 +39,10 @@ public class ShowModeParameter {
|
||||
this.water = true;
|
||||
}
|
||||
|
||||
public void disableWater() {
|
||||
this.water = false;
|
||||
}
|
||||
|
||||
public void enableInterpolateY() {
|
||||
this.interpolateY = true;
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren