mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 09:07:37 +00:00
Make this more friendly
This commit is contained in:
parent
bee4268d51
commit
d4710f1808
@ -1,10 +1,12 @@
|
|||||||
package dev.plex.listener.impl;
|
package dev.plex.listener.impl;
|
||||||
|
|
||||||
import dev.plex.cache.DataUtils;
|
import dev.plex.cache.DataUtils;
|
||||||
|
import dev.plex.hook.VaultHook;
|
||||||
import dev.plex.listener.PlexListener;
|
import dev.plex.listener.PlexListener;
|
||||||
import dev.plex.meta.PlayerMeta;
|
import dev.plex.meta.PlayerMeta;
|
||||||
import dev.plex.player.PlexPlayer;
|
import dev.plex.player.PlexPlayer;
|
||||||
import net.kyori.adventure.text.Component;
|
import dev.plex.util.PlexUtils;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
@ -17,6 +19,6 @@ public class TabListener extends PlexListener
|
|||||||
{
|
{
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
PlexPlayer plexPlayer = DataUtils.getPlayer(player.getUniqueId());
|
PlexPlayer plexPlayer = DataUtils.getPlayer(player.getUniqueId());
|
||||||
player.playerListName(Component.text(player.getName()).color(PlayerMeta.getColor(plexPlayer)));
|
player.playerListName(PlexUtils.mmDeserialize(PlayerMeta.getColor(plexPlayer) + player.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,17 +51,17 @@ public class PlayerMeta
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TextColor getColor(PlexPlayer plexPlayer)
|
public static String getColor(PlexPlayer plexPlayer)
|
||||||
{
|
{
|
||||||
if (PlexUtils.DEVELOPERS.contains(plexPlayer.getUuid().toString())) // don't remove or we will front door ur mother
|
if (PlexUtils.DEVELOPERS.contains(plexPlayer.getUuid().toString())) // don't remove or we will front door ur mother
|
||||||
{
|
{
|
||||||
return NamedTextColor.DARK_PURPLE;
|
return "<dark_purple>";
|
||||||
}
|
}
|
||||||
String group = VaultHook.getPermission().getPrimaryGroup(null, plexPlayer.getPlayer());
|
String group = VaultHook.getPermission().getPrimaryGroup(null, plexPlayer.getPlayer());
|
||||||
if (Plex.get().getConfig().isSet("colors." + group))
|
if (Plex.get().getConfig().isSet("colors." + group))
|
||||||
{
|
{
|
||||||
return TextColor.color(Plex.get().getConfig().getInt("colors." + group));
|
return PlexUtils.mmSerialize(PlexUtils.mmDeserialize(Plex.get().getConfig().getString("colors." + group)));
|
||||||
}
|
}
|
||||||
return NamedTextColor.WHITE;
|
return "<white>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,27 +25,11 @@ chat:
|
|||||||
name-color: '<white>'
|
name-color: '<white>'
|
||||||
|
|
||||||
# You can define colors for each group which will appear in the tab list
|
# You can define colors for each group which will appear in the tab list
|
||||||
# BLACK = 0x000000
|
|
||||||
# DARK_BLUE = 0x0000aa
|
|
||||||
# DARK_GREEN = 0x00aa00
|
|
||||||
# DARK_AQUA = 0x00aaaa
|
|
||||||
# DARK_RED = 0xaa0000
|
|
||||||
# DARK_PURPLE = 0xaa00aa
|
|
||||||
# GOLD = 0xffaa00
|
|
||||||
# GRAY = 0xaaaaaa
|
|
||||||
# DARK_GRAY = 0x555555
|
|
||||||
# BLUE = 0x5555ff
|
|
||||||
# GREEN = 0x55ff55
|
|
||||||
# AQUA = 0x55ffff
|
|
||||||
# RED = 0xff5555
|
|
||||||
# LIGHT_PURPLE = 0xff55ff
|
|
||||||
# YELLOW = 0xffff55
|
|
||||||
# WHITE = 0xffffff
|
|
||||||
colors:
|
colors:
|
||||||
admin: 0x00aa00
|
admin: '<aqua>'
|
||||||
senior: 0xffaa00
|
senior: '<light_purple>'
|
||||||
executive: 0x5555ff
|
executive: '<blue>'
|
||||||
masterbuilder: 0x55ffff
|
masterbuilder: '<dark_aqua>'
|
||||||
|
|
||||||
# Login Messages
|
# Login Messages
|
||||||
loginmessages:
|
loginmessages:
|
||||||
|
Loading…
Reference in New Issue
Block a user