diff --git a/src/main/java/dev/heliosares/auxprotect/core/commands/APCommand.java b/src/main/java/dev/heliosares/auxprotect/core/commands/APCommand.java index bc85929..2cac1b6 100644 --- a/src/main/java/dev/heliosares/auxprotect/core/commands/APCommand.java +++ b/src/main/java/dev/heliosares/auxprotect/core/commands/APCommand.java @@ -1,7 +1,11 @@ package dev.heliosares.auxprotect.core.commands; import dev.heliosares.auxprotect.adapters.sender.SenderAdapter; -import dev.heliosares.auxprotect.core.*; +import dev.heliosares.auxprotect.core.APPermission; +import dev.heliosares.auxprotect.core.Command; +import dev.heliosares.auxprotect.core.IAuxProtect; +import dev.heliosares.auxprotect.core.Language; +import dev.heliosares.auxprotect.core.PlatformType; import dev.heliosares.auxprotect.exceptions.CommandException; import dev.heliosares.auxprotect.exceptions.NotPlayerException; import dev.heliosares.auxprotect.exceptions.PlatformException; @@ -9,7 +13,12 @@ import dev.heliosares.auxprotect.exceptions.SyntaxException; import java.io.FileNotFoundException; import java.io.IOException; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; import java.util.stream.Collectors; public class APCommand extends Command { @@ -99,9 +108,10 @@ public class APCommand extends Command { } } } catch (CommandException e) { - sender.sendLang(Language.L.ERROR); if (e.getMessage() != null) { sender.sendMessageRaw(e.getMessage()); + } else { + sender.sendLang(Language.L.ERROR); } } catch (Throwable t) { sender.sendLang(Language.L.ERROR);