diff --git a/src/main/java/us/tastybento/bskyblock/commands/IslandCommand.java b/src/main/java/us/tastybento/bskyblock/commands/IslandCommand.java index 3efb75961..a0f316e00 100755 --- a/src/main/java/us/tastybento/bskyblock/commands/IslandCommand.java +++ b/src/main/java/us/tastybento/bskyblock/commands/IslandCommand.java @@ -51,6 +51,7 @@ public class IslandCommand extends CompositeCommand { if (subCreate.isPresent()) { subCreate.get().execute(user, new ArrayList<>()); } + return true; } Optional go = getSubCommand("go"); // Otherwise, currently, just go home diff --git a/src/main/java/us/tastybento/bskyblock/database/objects/Island.java b/src/main/java/us/tastybento/bskyblock/database/objects/Island.java index c80b66e5d..329994b66 100755 --- a/src/main/java/us/tastybento/bskyblock/database/objects/Island.java +++ b/src/main/java/us/tastybento/bskyblock/database/objects/Island.java @@ -73,10 +73,12 @@ public class Island implements DataObject { //// Team //// private UUID owner; + private HashMap members = new HashMap<>(); //// State //// private boolean locked = false; + private boolean spawn = false; private boolean purgeProtected = false; @@ -86,10 +88,10 @@ public class Island implements DataObject { private HashMap flags = new HashMap<>(); private int levelHandicap; + private Location spawnPoint; public Island() {} - public Island(Location location, UUID owner, int protectionRange) { setOwner(owner); createdDate = System.currentTimeMillis(); @@ -113,7 +115,6 @@ public class Island implements DataObject { members.put(playerUUID, RanksManager.MEMBER_RANK); } } - /** * Adds target to a list of banned players for this island. May be blocked by the event being cancelled. * If the player is a member, coop or trustee, they will be removed from those lists. @@ -154,7 +155,6 @@ public class Island implements DataObject { public long getCreatedDate(){ return createdDate; } - /** * Gets the rank needed to bypass this Island Guard flag * @param flag @@ -213,28 +213,28 @@ public class Island implements DataObject { /** * @return the minProtectedX */ - public int getMinProtectedX() { + public final int getMinProtectedX() { return minProtectedX; } /** * @return the minProtectedZ */ - public int getMinProtectedZ() { + public final int getMinProtectedZ() { return minProtectedZ; } /** * @return the minX */ - public int getMinX() { + public final int getMinX() { return minX; } /** * @return the minZ */ - public int getMinZ() { + public final int getMinZ() { return minZ; } @@ -397,13 +397,6 @@ public class Island implements DataObject { return center.getBlockZ(); } - public boolean inIslandSpace(Location location) { - if (Util.inWorld(location)) { - return inIslandSpace(location.getBlockX(), location.getBlockZ()); - } - return false; - } - /** * Checks if coords are in the island space * @param x @@ -415,6 +408,13 @@ public class Island implements DataObject { return x >= minX && x < minX + range*2 && z >= minZ && z < minZ + range*2; } + public boolean inIslandSpace(Location location) { + if (Util.inWorld(location)) { + return inIslandSpace(location.getBlockX(), location.getBlockZ()); + } + return false; + } + /** * Checks if the coords are in island space * @param blockCoord @@ -595,7 +595,6 @@ public class Island implements DataObject { this.minX = minX; } - /** * @param minZ the minZ to set */