This commit is contained in:
Telesphoreo 2024-06-15 19:26:45 -05:00
parent fd673f24fe
commit 726bd3beb9

View File

@ -30,19 +30,19 @@ public class NickMMCommand extends PlexCommand
private final LegacyComponentSerializer legacyComponent = LegacyComponentSerializer.legacySection();
@Override
protected Component execute(@NotNull CommandSender commandSender, @Nullable Player player, @NotNull String[] strings)
protected Component execute(@NotNull CommandSender commandSender, @Nullable Player player, @NotNull String[] args)
{
if (!Bukkit.getPluginManager().isPluginEnabled("Essentials"))
{
return Component.text("Essentials is not enabled!", NamedTextColor.RED);
}
if (strings.length == 0)
if (args.length == 0)
{
return usage();
}
final Component nick = SafeMiniMessage.mmDeserializeWithoutEvents(strings[0]);
final Component nick = SafeMiniMessage.mmDeserializeWithoutEvents(args[0]);
final String plain = plainText.serialize(nick);
if (plain.length() > NickMiniMessageModule.getEssentials().getSettings().getMaxNickLength()