Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 02:50:06 +01:00
fix: add null-check for brush in traceMask (#2160)
* fix: add null-check for brush in traceMask - Fixes #2149 * Switch to print from printError Co-authored-by: Alexander Brandes <mc.cache@web.de> --------- Co-authored-by: Alexander Brandes <mc.cache@web.de>
Dieser Commit ist enthalten in:
Ursprung
508b94ddc3
Commit
a9e1d5009c
@ -171,7 +171,12 @@ public class ToolUtilCommands {
|
|||||||
@Arg(desc = "The trace mask to set", def = "")
|
@Arg(desc = "The trace mask to set", def = "")
|
||||||
Mask maskOpt
|
Mask maskOpt
|
||||||
) throws WorldEditException {
|
) throws WorldEditException {
|
||||||
session.getBrushTool(player, false).setTraceMask(maskOpt);
|
BrushTool brushTool = session.getBrushTool(player, false);
|
||||||
|
if (brushTool == null) {
|
||||||
|
player.print(Caption.of("worldedit.brush.none.equipped"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
brushTool.setTraceMask(maskOpt);
|
||||||
if (maskOpt == null) {
|
if (maskOpt == null) {
|
||||||
player.print(Caption.of("worldedit.tool.tracemask.disabled"));
|
player.print(Caption.of("worldedit.tool.tracemask.disabled"));
|
||||||
} else {
|
} else {
|
||||||
|
@ -283,6 +283,7 @@
|
|||||||
"worldedit.brush.butcher.equip": "Butcher brush equipped ({0}).",
|
"worldedit.brush.butcher.equip": "Butcher brush equipped ({0}).",
|
||||||
"worldedit.brush.operation.equip": "Set brush to {0}.",
|
"worldedit.brush.operation.equip": "Set brush to {0}.",
|
||||||
"worldedit.brush.none.equip": "Brush unbound from your current item.",
|
"worldedit.brush.none.equip": "Brush unbound from your current item.",
|
||||||
|
"worldedit.brush.none.equipped": "You have no brush bound to your current item. Try /brush sphere for a basic brush.",
|
||||||
"worldedit.setbiome.changed": "Biomes were changed in {0} columns. You may have to rejoin your game (or close and reopen your world) to see a change.",
|
"worldedit.setbiome.changed": "Biomes were changed in {0} columns. You may have to rejoin your game (or close and reopen your world) to see a change.",
|
||||||
"worldedit.setbiome.not-locatable": "Command sender must be present in the world to use the -p flag.",
|
"worldedit.setbiome.not-locatable": "Command sender must be present in the world to use the -p flag.",
|
||||||
"worldedit.drawsel.disabled": "Server CUI disabled.",
|
"worldedit.drawsel.disabled": "Server CUI disabled.",
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren