mirror of
https://github.com/plexusorg/Plex.git
synced 2025-07-01 15:46:42 +00:00
a few things
This commit is contained in:
@ -442,7 +442,7 @@ public abstract class PlexCommand extends Command implements PluginIdentifiableC
|
||||
*/
|
||||
protected Component usage(String s)
|
||||
{
|
||||
return componentFromString(ChatColor.YELLOW + "Correct Usage: " + ChatColor.GRAY + this.getUsage());
|
||||
return componentFromString(ChatColor.YELLOW + "Correct Usage: " + ChatColor.GRAY + s);
|
||||
}
|
||||
|
||||
protected Player getNonNullPlayer(String name)
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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());
|
||||
|
Reference in New Issue
Block a user