geforkt von Mirrors/FastAsyncWorldEdit
World checks in BrushSettings don't offer any performance benefit
Dieser Commit ist enthalten in:
Ursprung
75653087b9
Commit
aa04b0c326
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren