From 4bf0d8ec0ffd5cfd66f8e797f40ebf0aab5689d9 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 26 May 2018 15:35:02 -0700 Subject: [PATCH] Fixed bug with island command and island go --- .../java/us/tastybento/bskyblock/commands/IslandCommand.java | 3 ++- .../tastybento/bskyblock/commands/island/IslandGoCommand.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/us/tastybento/bskyblock/commands/IslandCommand.java b/src/main/java/us/tastybento/bskyblock/commands/IslandCommand.java index ca31f719b..2c6a327fa 100755 --- a/src/main/java/us/tastybento/bskyblock/commands/IslandCommand.java +++ b/src/main/java/us/tastybento/bskyblock/commands/IslandCommand.java @@ -67,7 +67,8 @@ public class IslandCommand extends CompositeCommand { } if (args.isEmpty()) { // If in world, go - if (getPlugin().getIslands().hasIsland(getWorld(), user.getUniqueId())) { + + if (getPlugin().getIslands().getIsland(getWorld(), user.getUniqueId()) != null) { return getSubCommand("go").map(goCmd -> goCmd.execute(user, new ArrayList<>())).orElse(false); } // No islands currently diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/IslandGoCommand.java b/src/main/java/us/tastybento/bskyblock/commands/island/IslandGoCommand.java index db0201c2f..c496f6550 100644 --- a/src/main/java/us/tastybento/bskyblock/commands/island/IslandGoCommand.java +++ b/src/main/java/us/tastybento/bskyblock/commands/island/IslandGoCommand.java @@ -38,7 +38,7 @@ public class IslandGoCommand extends CompositeCommand { @Override public boolean execute(User user, List args) { - if (!getIslands().hasIsland(getWorld(), user.getUniqueId())) { + if (getIslands().getIsland(getWorld(), user.getUniqueId()) == null) { user.sendMessage(ChatColor.RED + "general.errors.no-island"); return false; }