3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-07-23 02:28:02 +02:00

World checks in BrushSettings don't offer any performance benefit

Dieser Commit ist enthalten in:
MattBDev 2020-02-05 10:40:29 -05:00
Ursprung 75653087b9
Commit aa04b0c326
2 geänderte Dateien mit 1 neuen und 16 gelöschten Zeilen

Datei anzeigen

@ -51,7 +51,6 @@ public class BrushSettings {
private Expression size = DEFAULT_SIZE;
private Set<String> permissions;
private Scroll scrollAction;
private String lastWorld;
public BrushSettings() {
this.permissions = new HashSet<>();
@ -213,20 +212,6 @@ public class BrushSettings {
return this;
}
/**
* Set the world the brush is being used in
* @param world
* @return true if the world differs from the last used world
*/
public boolean setWorld(String world) {
boolean result = false;
if (this.lastWorld != null && !this.lastWorld.equalsIgnoreCase(world)) {
result = true;
}
this.lastWorld = world;
return result;
}
public Brush getBrush() {
return brush;
}

Datei anzeigen

@ -491,7 +491,7 @@ public class BrushTool implements DoubleActionTraceTool, ScrollTool, MovableTool
Brush brush = current.getBrush();
if (brush == null) return false;
if (current.setWorld(player.getWorld().getName()) && !current.canUse(player)) {
if (!current.canUse(player)) {
player.print(Caption.of("fawe.error.no-perm" , StringMan.join(current.getPermissions(), ",")));
return false;
}