diff --git a/src/main/java/world/bentobox/bentobox/api/commands/island/IslandCreateCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/island/IslandCreateCommand.java index b56925410..6e2d21d8b 100644 --- a/src/main/java/world/bentobox/bentobox/api/commands/island/IslandCreateCommand.java +++ b/src/main/java/world/bentobox/bentobox/api/commands/island/IslandCreateCommand.java @@ -1,5 +1,6 @@ package world.bentobox.bentobox.api.commands.island; +import java.io.IOException; import java.util.List; import org.eclipse.jdt.annotation.Nullable; @@ -93,7 +94,7 @@ public class IslandCreateCommand extends CompositeCommand { .reason(Reason.CREATE) .name(name) .build(); - } catch (Exception e) { + } catch (IOException e) { getPlugin().logError("Could not create island for player. " + e.getMessage()); user.sendMessage(e.getMessage()); return false; diff --git a/src/main/java/world/bentobox/bentobox/api/commands/island/IslandResetCommand.java b/src/main/java/world/bentobox/bentobox/api/commands/island/IslandResetCommand.java index 95e50b8e7..ec90ecffd 100644 --- a/src/main/java/world/bentobox/bentobox/api/commands/island/IslandResetCommand.java +++ b/src/main/java/world/bentobox/bentobox/api/commands/island/IslandResetCommand.java @@ -1,5 +1,6 @@ package world.bentobox.bentobox.api.commands.island; +import java.io.IOException; import java.util.List; import org.bukkit.Bukkit; @@ -139,7 +140,7 @@ public class IslandResetCommand extends ConfirmableCommand { .name(name); if (noPaste) builder.noPaste(); builder.build(); - } catch (Exception e) { + } catch (IOException e) { getPlugin().logError("Could not create island for player. " + e.getMessage()); user.sendMessage(e.getMessage()); return false; diff --git a/src/main/java/world/bentobox/bentobox/managers/island/NewIsland.java b/src/main/java/world/bentobox/bentobox/managers/island/NewIsland.java index bb2bcdf03..7651fbd69 100644 --- a/src/main/java/world/bentobox/bentobox/managers/island/NewIsland.java +++ b/src/main/java/world/bentobox/bentobox/managers/island/NewIsland.java @@ -35,7 +35,7 @@ public class NewIsland { private NewIslandLocationStrategy locationStrategy; - public NewIsland(Builder builder) throws Exception { + public NewIsland(Builder builder) throws IOException { plugin = BentoBox.getInstance(); this.user = builder.user2; this.reason = builder.reason2; @@ -137,7 +137,7 @@ public class NewIsland { * @return Island * @throws Exception */ - public Island build() throws Exception { + public Island build() throws IOException { if (user2 != null) { NewIsland newIsland = new NewIsland(this); return newIsland.getIsland();