Simplify Region.inRegion
Dieser Commit ist enthalten in:
Ursprung
758f9cd594
Commit
485cf8f417
@ -195,9 +195,12 @@ public class Region {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean inRegion(Location location, Point minPoint, Point maxPoint) {
|
private boolean inRegion(Location location, Point minPoint, Point maxPoint) {
|
||||||
return location.getBlockX() >= minPoint.getX() && location.getBlockX() <= maxPoint.getX() &&
|
int blockX = location.getBlockX();
|
||||||
location.getBlockY() >= minPoint.getY() && location.getBlockY() <= maxPoint.getY() &&
|
int blockY = location.getBlockY();
|
||||||
location.getBlockZ() >= minPoint.getZ() && location.getBlockZ() <= maxPoint.getZ();
|
int blockZ = location.getBlockZ();
|
||||||
|
return blockX >= minPoint.getX() && blockX <= maxPoint.getX() &&
|
||||||
|
blockY >= minPoint.getY() && blockY <= maxPoint.getY() &&
|
||||||
|
blockZ >= minPoint.getZ() && blockZ <= maxPoint.getZ();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasType(RegionType regionType) {
|
public boolean hasType(RegionType regionType) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren