forked from SteamWar/SteamWar
Reduce to 34 compiler errors
This commit is contained in:
@@ -28,9 +28,13 @@ import java.io.File;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public interface Region {
|
||||
|
||||
static Stream<Region> getRegions() {
|
||||
return RegionSystem.INSTANCE.getRegions();
|
||||
}
|
||||
static Region getRegion(Location location) {
|
||||
return RegionSystem.INSTANCE.get(location);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class RegionUtils {
|
||||
public void forEachInRegion(Region region, Consumer<Player> consumer) {
|
||||
Bukkit.getOnlinePlayers()
|
||||
.stream()
|
||||
.filter(player -> region.inRegion(player.getLocation()))
|
||||
.filter(player -> region.getArea().inRegion(player.getLocation(), false))
|
||||
.filter(player -> !region.getType().isGlobal() || Region.getRegion(player.getLocation()).getType().isGlobal())
|
||||
.forEach(consumer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user