From 51738df54ce760fc0abe14f3d03c9d42434b92c0 Mon Sep 17 00:00:00 2001 From: Florian CUNY Date: Thu, 13 Jun 2019 09:48:34 +0200 Subject: [PATCH] Improved Island#onIsland(Location) javadoc --- .../world/bentobox/bentobox/database/objects/Island.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/world/bentobox/bentobox/database/objects/Island.java b/src/main/java/world/bentobox/bentobox/database/objects/Island.java index 6830bd12b..c29a27472 100644 --- a/src/main/java/world/bentobox/bentobox/database/objects/Island.java +++ b/src/main/java/world/bentobox/bentobox/database/objects/Island.java @@ -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 - * @return true if it is, false if not + * @param target location to check, not null + * @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); }