mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 09:07:37 +00:00
Remove extra space from prefixes
This commit is contained in:
parent
4887960463
commit
b0240ef46e
@ -50,7 +50,11 @@ public class ListCMD extends PlexCommand
|
||||
}
|
||||
else
|
||||
{
|
||||
list = list.append(VaultHook.getPrefix(getPlexPlayer(player))).append(Component.space()).append(Component.text(player.getName()).color(NamedTextColor.WHITE));
|
||||
Component prefix = VaultHook.getPrefix(getPlexPlayer(player));
|
||||
if (prefix != null && !prefix.equals(Component.empty()) && !prefix.equals(Component.space())) {
|
||||
list = list.append(prefix).append(Component.space());
|
||||
}
|
||||
list = list.append(Component.text(player.getName()).color(NamedTextColor.WHITE));
|
||||
}
|
||||
if (i != players.size() - 1)
|
||||
{
|
||||
|
@ -76,15 +76,14 @@ public class TagCMD extends PlexCommand
|
||||
}
|
||||
|
||||
PlexPlayer player = DataUtils.getPlayer(playerSender.getUniqueId());
|
||||
player.setPrefix("");
|
||||
player.setPrefix(null);
|
||||
DataUtils.update(player);
|
||||
return messageComponent("prefixCleared");
|
||||
}
|
||||
|
||||
checkRank(sender, Rank.ADMIN, "plex.tag.clear.others");
|
||||
Player target = getNonNullPlayer(args[1]);
|
||||
PlexPlayer plexTarget = DataUtils.getPlayer(target.getUniqueId());
|
||||
plexTarget.setPrefix("");
|
||||
plexTarget.setPrefix(null);
|
||||
DataUtils.update(plexTarget);
|
||||
return messageComponent("otherPrefixCleared", target.getName());
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ public class ChatListener extends PlexListener
|
||||
}
|
||||
Component prefix = plugin.getRankManager().getPrefix(plexPlayer);
|
||||
|
||||
if (prefix != null)
|
||||
if (prefix != null && !prefix.equals(Component.empty()) && !prefix.equals(Component.space()))
|
||||
{
|
||||
renderer.hasPrefix = true;
|
||||
renderer.prefix = prefix;
|
||||
|
@ -124,7 +124,7 @@ public class RankManager
|
||||
}
|
||||
if (getConfigPrefixes(plexPlayer) != null)
|
||||
{
|
||||
getConfigPrefixes(plexPlayer);
|
||||
return getConfigPrefixes(plexPlayer);
|
||||
}
|
||||
if (Bukkit.getServer().getPluginManager().isPluginEnabled("Vault") && Plex.get().getSystem().equalsIgnoreCase("permissions"))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user