Fix minor brush persistence issue
This commit is contained in:
parent
880b054957
commit
1dad7a6cce
@ -51,6 +51,7 @@ public class BrushBoundBaseBlock extends BaseBlock implements BrushHolder {
|
||||
try {
|
||||
this.tool = BrushTool.fromString(player, session, json);
|
||||
this.tool.setHolder(this);
|
||||
brushCache.put(getKey(item), tool);
|
||||
} catch (Throwable ignore) {
|
||||
ignore.printStackTrace();
|
||||
}
|
||||
|
@ -72,6 +72,7 @@ public class BrushSettings {
|
||||
String args = constructor.substring(constructor.indexOf(' ') + 1);
|
||||
String[] parentArgs = new String[]{"brush", split[0]};
|
||||
BrushSettings bs = (BrushSettings) sphereCommand.call(args, locals, parentArgs);
|
||||
bs.constructor.put(SettingType.BRUSH, constructor);
|
||||
if (settings.containsKey(SettingType.PERMISSIONS.name())) {
|
||||
bs.permissions.addAll((Collection<? extends String>) settings.get(SettingType.PERMISSIONS.name()));
|
||||
}
|
||||
|
@ -297,6 +297,7 @@ public class BrushTool implements DoubleActionTraceTool, ScrollTool, MovableTool
|
||||
current.clearPerms();
|
||||
current.setBrush(brush);
|
||||
current.addPermission(permission);
|
||||
update();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user