Improved Island#onIsland(Location) javadoc

This commit is contained in:
Florian CUNY 2019-06-13 09:48:34 +02:00
parent ad3cb821f4
commit 51738df54c

View File

@ -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);
} }