mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-23 08:31:34 +01:00
Improved Island#onIsland(Location) javadoc
This commit is contained in:
parent
ad3cb821f4
commit
51738df54c
@ -528,12 +528,12 @@ public class Island implements DataObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if a location is within this island's protected area
|
* Checks if a location is within this island's protected area.
|
||||||
*
|
*
|
||||||
* @param target - target location
|
* @param target location to check, not null
|
||||||
* @return true if it is, false if not
|
* @return {@code true} if this location is within this island's protected area, {@code false} otherwise.
|
||||||
*/
|
*/
|
||||||
public boolean onIsland(Location target) {
|
public boolean onIsland(@NonNull Location target) {
|
||||||
return Util.sameWorld(world, target.getWorld()) && target.getBlockX() >= getMinProtectedX() && target.getBlockX() < (getMinProtectedX() + protectionRange * 2) && target.getBlockZ() >= getMinProtectedZ() && target.getBlockZ() < (getMinProtectedZ() + protectionRange * 2);
|
return Util.sameWorld(world, target.getWorld()) && target.getBlockX() >= getMinProtectedX() && target.getBlockX() < (getMinProtectedX() + protectionRange * 2) && target.getBlockZ() >= getMinProtectedZ() && target.getBlockZ() < (getMinProtectedZ() + protectionRange * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user