refactor: remove useless class
This commit is contained in:
parent
78b4725584
commit
b150ae2875
4 changed files with 5 additions and 31 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue