mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00: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>
This commit is contained in:
parent
508b94ddc3
commit
a9e1d5009c
@ -171,7 +171,12 @@ public class ToolUtilCommands {
|
||||
@Arg(desc = "The trace mask to set", def = "")
|
||||
Mask maskOpt
|
||||
) 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) {
|
||||
player.print(Caption.of("worldedit.tool.tracemask.disabled"));
|
||||
} else {
|
||||
|
@ -283,6 +283,7 @@
|
||||
"worldedit.brush.butcher.equip": "Butcher brush equipped ({0}).",
|
||||
"worldedit.brush.operation.equip": "Set brush to {0}.",
|
||||
"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.not-locatable": "Command sender must be present in the world to use the -p flag.",
|
||||
"worldedit.drawsel.disabled": "Server CUI disabled.",
|
||||
|
Loading…
Reference in New Issue
Block a user