Optimize Region.getRegion
Dieser Commit ist enthalten in:
Ursprung
9fb66faa20
Commit
fcba3e3296
@ -48,17 +48,10 @@ public class Region {
|
||||
private static final List<Region> REGION_LIST = new ArrayList<>();
|
||||
|
||||
public static Region getRegion(Location location) {
|
||||
String s = Thread.currentThread().getStackTrace()[2].toString();
|
||||
if (!s.contains("sidebar")) {
|
||||
System.out.println(s + " " + location);
|
||||
}
|
||||
/*for (Region region : REGION_LIST) {
|
||||
if (region.inRegion(location, region.minPoint, region.maxPoint)) {
|
||||
return region;
|
||||
}
|
||||
}
|
||||
return GlobalRegion.instance;*/
|
||||
return REGION_LIST.stream().filter(r -> r.inRegion(location, r.minPoint, r.maxPoint)).findFirst().orElse(GlobalRegion.instance);
|
||||
return REGION_LIST.stream()
|
||||
.filter(r -> r.inRegion(location, r.minPoint, r.maxPoint))
|
||||
.findFirst()
|
||||
.orElse(GlobalRegion.instance);
|
||||
}
|
||||
|
||||
public static void setGlobal(Flag flagType, Flag.Value<?> value) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren