a few things

This commit is contained in:
2022-02-22 01:11:37 -06:00
parent e23929ee0c
commit 137bc44212
6 changed files with 31 additions and 22 deletions

View File

@ -7,6 +7,7 @@ import dev.plex.command.annotation.CommandParameters;
import dev.plex.command.annotation.CommandPermissions;
import dev.plex.rank.enums.Rank;
import dev.plex.util.PlexUtils;
import java.util.List;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
import org.bukkit.command.CommandSender;
@ -14,9 +15,7 @@ import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
@CommandParameters(name = "debug", description = "Debug command", usage = "/<command> <redis-reset> [player]")
@CommandParameters(name = "debug", description = "Debug command", usage = "/<command> redis-reset [player]")
@CommandPermissions(level = Rank.EXECUTIVE, permission = "plex.debug")
public class DebugCMD extends PlexCommand
{
@ -30,15 +29,13 @@ public class DebugCMD extends PlexCommand
if (args[0].equalsIgnoreCase("redis-reset"))
{
Player player = getNonNullPlayer(args[1]);
if (Plex.get().getRedisConnection().getJedis().exists(player.getUniqueId().toString()))
if (plugin.getRedisConnection().getJedis().exists(player.getUniqueId().toString()))
{
Plex.get().getRedisConnection().getJedis().del(player.getUniqueId().toString());
return componentFromString("Successfully reset " + player.getName() + "'s redis punishments!").color(NamedTextColor.YELLOW);
plugin.getRedisConnection().getJedis().del(player.getUniqueId().toString());
return componentFromString("Successfully reset " + player.getName() + "'s Redis punishments!").color(NamedTextColor.YELLOW);
}
return componentFromString("Couldn't find player in redis punishments.");
return componentFromString("Couldn't find player in Redis punishments.");
}
return null;
}

View File

@ -48,7 +48,7 @@ public class TagCMD extends PlexCommand
String prefix = StringUtils.join(args, " ", 1, args.length);
if (ChatColor.stripColor(prefix).length() > plugin.config.getInt("chat.max-tag-length", 16))
{
return componentFromString("The max length for a tag may only be " + plugin.config.getInt("chat.max-tag-length", 16));
return componentFromString("The maximum length for a tag may only be " + plugin.config.getInt("chat.max-tag-length", 16));
}
player.setPrefix(prefix);
return Component.text("Your prefix has been set to ").color(NamedTextColor.AQUA).append(componentFromString(prefix));
@ -68,7 +68,7 @@ public class TagCMD extends PlexCommand
return Component.text("Your prefix has been cleared.").color(NamedTextColor.AQUA);
}
checkRank(sender, Rank.ADMIN, "plex.tag.clearother");
checkRank(sender, Rank.ADMIN, "plex.tag.clear.others");
Player target = getNonNullPlayer(args[1]);
PlexPlayer plexTarget = DataUtils.getPlayer(target.getUniqueId());