mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 17:17: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
|
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)
|
if (i != players.size() - 1)
|
||||||
{
|
{
|
||||||
|
@ -76,15 +76,14 @@ public class TagCMD extends PlexCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
PlexPlayer player = DataUtils.getPlayer(playerSender.getUniqueId());
|
PlexPlayer player = DataUtils.getPlayer(playerSender.getUniqueId());
|
||||||
player.setPrefix("");
|
player.setPrefix(null);
|
||||||
DataUtils.update(player);
|
DataUtils.update(player);
|
||||||
return messageComponent("prefixCleared");
|
return messageComponent("prefixCleared");
|
||||||
}
|
}
|
||||||
|
|
||||||
checkRank(sender, Rank.ADMIN, "plex.tag.clear.others");
|
checkRank(sender, Rank.ADMIN, "plex.tag.clear.others");
|
||||||
Player target = getNonNullPlayer(args[1]);
|
Player target = getNonNullPlayer(args[1]);
|
||||||
PlexPlayer plexTarget = DataUtils.getPlayer(target.getUniqueId());
|
PlexPlayer plexTarget = DataUtils.getPlayer(target.getUniqueId());
|
||||||
plexTarget.setPrefix("");
|
plexTarget.setPrefix(null);
|
||||||
DataUtils.update(plexTarget);
|
DataUtils.update(plexTarget);
|
||||||
return messageComponent("otherPrefixCleared", target.getName());
|
return messageComponent("otherPrefixCleared", target.getName());
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ public class ChatListener extends PlexListener
|
|||||||
}
|
}
|
||||||
Component prefix = plugin.getRankManager().getPrefix(plexPlayer);
|
Component prefix = plugin.getRankManager().getPrefix(plexPlayer);
|
||||||
|
|
||||||
if (prefix != null)
|
if (prefix != null && !prefix.equals(Component.empty()) && !prefix.equals(Component.space()))
|
||||||
{
|
{
|
||||||
renderer.hasPrefix = true;
|
renderer.hasPrefix = true;
|
||||||
renderer.prefix = prefix;
|
renderer.prefix = prefix;
|
||||||
|
@ -124,7 +124,7 @@ public class RankManager
|
|||||||
}
|
}
|
||||||
if (getConfigPrefixes(plexPlayer) != null)
|
if (getConfigPrefixes(plexPlayer) != null)
|
||||||
{
|
{
|
||||||
getConfigPrefixes(plexPlayer);
|
return getConfigPrefixes(plexPlayer);
|
||||||
}
|
}
|
||||||
if (Bukkit.getServer().getPluginManager().isPluginEnabled("Vault") && Plex.get().getSystem().equalsIgnoreCase("permissions"))
|
if (Bukkit.getServer().getPluginManager().isPluginEnabled("Vault") && Plex.get().getSystem().equalsIgnoreCase("permissions"))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user