From af5c7e472ed1f564eb09c3e2978f9038029ea1cb Mon Sep 17 00:00:00 2001 From: Tastybento Date: Tue, 6 Feb 2018 21:48:59 -0800 Subject: [PATCH] Fixed execute return values. --- .../commands/island/IslandSetnameCommand.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/IslandSetnameCommand.java b/src/main/java/us/tastybento/bskyblock/commands/island/IslandSetnameCommand.java index a58b5c9c0..e79c6ecae 100644 --- a/src/main/java/us/tastybento/bskyblock/commands/island/IslandSetnameCommand.java +++ b/src/main/java/us/tastybento/bskyblock/commands/island/IslandSetnameCommand.java @@ -42,17 +42,17 @@ public class IslandSetnameCommand extends CompositeCommand { if (!getIslands().hasIsland(playerUUID)) { user.sendMessage("general.errors.no-island"); - return true; + return false; } if (!getIslands().isOwner(playerUUID)) { user.sendMessage("general.errors.not-leader"); - return true; + return false; } // Explain command if (args.isEmpty()) { - user.sendMessage(getUsage()); - return true; + this.getSubCommand("help").ifPresent(help -> help.execute(user, args)); + return false; } // Naming the island - join all the arguments with spaces. @@ -61,11 +61,11 @@ public class IslandSetnameCommand extends CompositeCommand { // Check if the name isn't too short or too long if (name.length() < getSettings().getNameMinLength()) { user.sendMessage("commands.island.setname.too-short", "[length]", String.valueOf(getSettings().getNameMinLength())); - return true; + return false; } if (name.length() > getSettings().getNameMaxLength()) { user.sendMessage("commands.island.setname.too-long", "[length]", String.valueOf(getSettings().getNameMaxLength())); - return true; + return false; } // Set the name