From c013cbbce5bdd71346cff0bb2a07846e55d96438 Mon Sep 17 00:00:00 2001 From: Vlammar Date: Wed, 4 Nov 2020 17:37:58 +0100 Subject: [PATCH] updated exception catch --- .../fr/moribus/imageonmap/commands/maptool/GiveCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/fr/moribus/imageonmap/commands/maptool/GiveCommand.java b/src/main/java/fr/moribus/imageonmap/commands/maptool/GiveCommand.java index 440d55b..3921d87 100644 --- a/src/main/java/fr/moribus/imageonmap/commands/maptool/GiveCommand.java +++ b/src/main/java/fr/moribus/imageonmap/commands/maptool/GiveCommand.java @@ -51,6 +51,7 @@ import org.bukkit.entity.Player; import java.io.IOException; import java.util.UUID; +import java.util.concurrent.ExecutionException; @CommandInfo(name = "give", usageParameters = " or ") @@ -67,7 +68,6 @@ public class GiveCommand extends IoMCommand { private OfflinePlayer parse(int index) throws CommandException { String s = args[index].trim(); - String[] subs = s.split(":"); try { // @@ -102,7 +102,7 @@ public class GiveCommand extends IoMCommand { default: throwInvalidArgument(I.t("Invalid prefix, valid one are: player | uuid")); } - } catch (InterruptedException | IOException e) { + } catch (InterruptedException | ExecutionException e) { PluginLogger.warning(I.t("Can't access to mojang API to check the player UUID")); } return null;