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 (sender instanceof Player player) {
|
||||||
if (args.length >= 1) {
|
if (args.length >= 1) {
|
||||||
switch (args[0]) {
|
switch (args[0]) {
|
||||||
case "debug" -> new NickoDebugSubCmd(this).execute(sender, args);
|
case "debug" -> new NickoDebugSubCmd().execute(sender, args);
|
||||||
case "check" -> new NickoCheckSubCmd(this).execute(player, args);
|
case "check" -> new NickoCheckSubCmd().execute(player, args);
|
||||||
default -> sendHelpMessages(sender);
|
default -> sendHelpMessages(sender);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package net.artelnatif.nicko.command.sub;
|
package net.artelnatif.nicko.command.sub;
|
||||||
|
|
||||||
import net.artelnatif.nicko.NickoBukkit;
|
import net.artelnatif.nicko.NickoBukkit;
|
||||||
import net.artelnatif.nicko.command.NickoCommand;
|
|
||||||
import net.artelnatif.nicko.disguise.AppearanceManager;
|
import net.artelnatif.nicko.disguise.AppearanceManager;
|
||||||
import net.artelnatif.nicko.i18n.I18N;
|
import net.artelnatif.nicko.i18n.I18N;
|
||||||
import net.artelnatif.nicko.i18n.I18NDict;
|
import net.artelnatif.nicko.i18n.I18NDict;
|
||||||
|
@ -12,11 +11,7 @@ import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.util.StringJoiner;
|
import java.util.StringJoiner;
|
||||||
|
|
||||||
public class NickoCheckSubCmd extends NickoSubCmd {
|
public class NickoCheckSubCmd {
|
||||||
public NickoCheckSubCmd(NickoCommand nickoCommand) {
|
|
||||||
super(nickoCommand);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void execute(Player player, String[] args) {
|
public void execute(Player player, String[] args) {
|
||||||
final String targetName = args[1];
|
final String targetName = args[1];
|
||||||
final Player target = Bukkit.getPlayerExact(targetName);
|
final Player target = Bukkit.getPlayerExact(targetName);
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package net.artelnatif.nicko.command.sub;
|
package net.artelnatif.nicko.command.sub;
|
||||||
|
|
||||||
import net.artelnatif.nicko.NickoBukkit;
|
import net.artelnatif.nicko.NickoBukkit;
|
||||||
import net.artelnatif.nicko.command.NickoCommand;
|
|
||||||
import net.artelnatif.nicko.disguise.AppearanceManager;
|
import net.artelnatif.nicko.disguise.AppearanceManager;
|
||||||
import net.artelnatif.nicko.mojang.MojangUtils;
|
import net.artelnatif.nicko.mojang.MojangUtils;
|
||||||
import net.artelnatif.nicko.utils.PlayerUtils;
|
import net.artelnatif.nicko.utils.PlayerUtils;
|
||||||
|
@ -10,12 +9,7 @@ import org.bukkit.Sound;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public class NickoDebugSubCmd extends NickoSubCmd {
|
public class NickoDebugSubCmd {
|
||||||
|
|
||||||
public NickoDebugSubCmd(NickoCommand nickoCommand) {
|
|
||||||
super(nickoCommand);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void execute(CommandSender sender, String[] args) {
|
public void execute(CommandSender sender, String[] args) {
|
||||||
Player target;
|
Player target;
|
||||||
String name, skin;
|
String name, skin;
|
||||||
|
|
|
@ -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