From 074c07f628003b0afc7e38650f3b9335f71700fa Mon Sep 17 00:00:00 2001 From: ineanto Date: Tue, 10 Oct 2023 14:27:50 +0200 Subject: [PATCH] chore: update deps to mc 1.20.2 --- pom.xml | 8 +- .../atnrch/nicko/command/NickoDebugCmd.java | 73 ------------------- 2 files changed, 4 insertions(+), 77 deletions(-) delete mode 100644 src/main/java/xyz/atnrch/nicko/command/NickoDebugCmd.java diff --git a/pom.xml b/pom.xml index 8765da4..e877050 100644 --- a/pom.xml +++ b/pom.xml @@ -57,7 +57,7 @@ com.comphenix.protocol ProtocolLib - 5.0.0-SNAPSHOT + 5.0.1-SNAPSHOT provided @@ -69,18 +69,18 @@ xyz.xenondevs.invui invui - 1.14 + 1.20 pom net.wesjd anvilgui - 1.7.0-SNAPSHOT + 1.9.0-SNAPSHOT com.github.seeseemelk MockBukkit-v1.20 - 3.9.0 + 3.31.0 test diff --git a/src/main/java/xyz/atnrch/nicko/command/NickoDebugCmd.java b/src/main/java/xyz/atnrch/nicko/command/NickoDebugCmd.java deleted file mode 100644 index 4f5b877..0000000 --- a/src/main/java/xyz/atnrch/nicko/command/NickoDebugCmd.java +++ /dev/null @@ -1,73 +0,0 @@ -package xyz.atnrch.nicko.command; - -import org.bukkit.Bukkit; -import org.bukkit.Sound; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; -import xyz.atnrch.nicko.NickoBukkit; -import xyz.atnrch.nicko.appearance.ActionResult; -import xyz.atnrch.nicko.appearance.AppearanceManager; -import xyz.atnrch.nicko.i18n.I18N; -import xyz.atnrch.nicko.mojang.MojangUtils; -import xyz.atnrch.nicko.profile.NickoProfile; -import xyz.atnrch.nicko.storage.PlayerDataStore; - -import java.util.Optional; - -public class NickoDebugCmd { - public void execute(CommandSender sender, String[] args) { - final String prefix = NickoBukkit.getInstance().getNickoConfig().getPrefix(); - - Player target; - String name, skin; - String playerName = null; - if (args.length == 3) { - target = (Player) sender; - name = args[1]; - skin = args[2]; - } else { - if (args.length < 3) { - sender.sendMessage(prefix + "§cMissing argument."); - return; - } - - playerName = args[1]; - name = args[2]; - skin = args[3]; - - target = Bukkit.getPlayer(playerName); - if (target == null) { - sender.sendMessage(prefix + "§cSpecified player is offline."); - return; - } - } - - if (MojangUtils.isUsernameInvalid(name)) { - sender.sendMessage(prefix + "§cSpecified username is invalid."); - return; - } - - if (MojangUtils.isUsernameInvalid(skin)) { - sender.sendMessage(prefix + "§cSpecified skin is invalid."); - return; - } - - final Optional optionalProfile = NickoProfile.get(target); - if (optionalProfile.isPresent()) { - final NickoProfile profile = optionalProfile.get(); - final PlayerDataStore dataStore = NickoBukkit.getInstance().getDataStore(); - profile.setName(name); - profile.setSkin(skin); - dataStore.updateCache(target.getUniqueId(), profile); - final AppearanceManager appearanceManager = new AppearanceManager(target); - final ActionResult result = appearanceManager.updatePlayer(true, false); - if (!result.isError()) { - target.sendMessage(prefix + "§aWhoosh!"); - target.playSound(target.getLocation(), Sound.ENTITY_ITEM_FRAME_PLACE, 1, 1); - } else { - final I18N i18n = new I18N(target); - target.sendMessage(prefix + "§cWhoops. Something happened: " + i18n.translatePrefixless(result.getErrorKey())); - } - } - } -}