diff --git a/nicko-core/src/main/java/net/artelnatif/nicko/command/NickoCommand.java b/nicko-core/src/main/java/net/artelnatif/nicko/command/NickoCommand.java index d7be13b..0611375 100644 --- a/nicko-core/src/main/java/net/artelnatif/nicko/command/NickoCommand.java +++ b/nicko-core/src/main/java/net/artelnatif/nicko/command/NickoCommand.java @@ -21,8 +21,8 @@ public class NickoCommand implements CommandExecutor { if (sender instanceof Player player) { if (args.length >= 1) { switch (args[0]) { - case "debug" -> new NickoDebugSubCmd(this).execute(sender, args); - case "check" -> new NickoCheckSubCmd(this).execute(player, args); + case "debug" -> new NickoDebugSubCmd().execute(sender, args); + case "check" -> new NickoCheckSubCmd().execute(player, args); default -> sendHelpMessages(sender); } return false; diff --git a/nicko-core/src/main/java/net/artelnatif/nicko/command/sub/NickoCheckSubCmd.java b/nicko-core/src/main/java/net/artelnatif/nicko/command/sub/NickoCheckSubCmd.java index 24f72ef..c9708b7 100644 --- a/nicko-core/src/main/java/net/artelnatif/nicko/command/sub/NickoCheckSubCmd.java +++ b/nicko-core/src/main/java/net/artelnatif/nicko/command/sub/NickoCheckSubCmd.java @@ -1,7 +1,6 @@ package net.artelnatif.nicko.command.sub; import net.artelnatif.nicko.NickoBukkit; -import net.artelnatif.nicko.command.NickoCommand; import net.artelnatif.nicko.disguise.AppearanceManager; import net.artelnatif.nicko.i18n.I18N; import net.artelnatif.nicko.i18n.I18NDict; @@ -12,11 +11,7 @@ import org.bukkit.entity.Player; import java.util.StringJoiner; -public class NickoCheckSubCmd extends NickoSubCmd { - public NickoCheckSubCmd(NickoCommand nickoCommand) { - super(nickoCommand); - } - +public class NickoCheckSubCmd { public void execute(Player player, String[] args) { final String targetName = args[1]; final Player target = Bukkit.getPlayerExact(targetName); diff --git a/nicko-core/src/main/java/net/artelnatif/nicko/command/sub/NickoDebugSubCmd.java b/nicko-core/src/main/java/net/artelnatif/nicko/command/sub/NickoDebugSubCmd.java index f388e3c..0d091d4 100644 --- a/nicko-core/src/main/java/net/artelnatif/nicko/command/sub/NickoDebugSubCmd.java +++ b/nicko-core/src/main/java/net/artelnatif/nicko/command/sub/NickoDebugSubCmd.java @@ -1,7 +1,6 @@ package net.artelnatif.nicko.command.sub; import net.artelnatif.nicko.NickoBukkit; -import net.artelnatif.nicko.command.NickoCommand; import net.artelnatif.nicko.disguise.AppearanceManager; import net.artelnatif.nicko.mojang.MojangUtils; import net.artelnatif.nicko.utils.PlayerUtils; @@ -10,12 +9,7 @@ import org.bukkit.Sound; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -public class NickoDebugSubCmd extends NickoSubCmd { - - public NickoDebugSubCmd(NickoCommand nickoCommand) { - super(nickoCommand); - } - +public class NickoDebugSubCmd { public void execute(CommandSender sender, String[] args) { Player target; String name, skin; @@ -27,7 +21,7 @@ public class NickoDebugSubCmd extends NickoSubCmd { final String playerName = args[1]; target = Bukkit.getPlayer(playerName); - if(args.length < 3) { + if (args.length < 3) { sender.sendMessage(NickoBukkit.getInstance().getNickoConfig().getPrefix() + "§cMissing argument."); return; } diff --git a/nicko-core/src/main/java/net/artelnatif/nicko/command/sub/NickoSubCmd.java b/nicko-core/src/main/java/net/artelnatif/nicko/command/sub/NickoSubCmd.java deleted file mode 100644 index 0c94674..0000000 --- a/nicko-core/src/main/java/net/artelnatif/nicko/command/sub/NickoSubCmd.java +++ /dev/null @@ -1,15 +0,0 @@ -package net.artelnatif.nicko.command.sub; - -import net.artelnatif.nicko.command.NickoCommand; - -public class NickoSubCmd { - private final NickoCommand nickoCommand; - - public NickoSubCmd(NickoCommand nickoCommand) { - this.nickoCommand = nickoCommand; - } - - public NickoCommand getMainCommand() { - return nickoCommand; - } -}