mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-10-31 23:59:25 +00:00
Added Color Tabs and Auto Prefixes. Resolves #173
This commit is contained in:
parent
31e03d6348
commit
dbfec1e86d
|
@ -775,4 +775,32 @@ public class TFM_PlayerListener implements Listener
|
|||
{
|
||||
TFM_ServerInterface.handlePlayerLogin(event);
|
||||
}
|
||||
|
||||
// Player Tab and auto Tags
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public static void onPlayerJoinEvent(PlayerJoinEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
if (TFM_Util.DEVELOPERS.contains(player.getName()))
|
||||
{
|
||||
player.setPlayerListName(ChatColor.DARK_PURPLE + player.getName());
|
||||
TFM_PlayerData.getPlayerData(player).setTag("&8[&5Developer&8]");
|
||||
}
|
||||
else if (TFM_AdminList.isSeniorAdmin(player))
|
||||
{
|
||||
player.setPlayerListName(ChatColor.LIGHT_PURPLE + player.getName());
|
||||
TFM_PlayerData.getPlayerData(player).setTag("&8[&dSenior Admin&8]");
|
||||
}
|
||||
else if (TFM_AdminList.isTelnetAdmin(player, true))
|
||||
{
|
||||
player.setPlayerListName(ChatColor.GREEN + player.getName());
|
||||
TFM_PlayerData.getPlayerData(player).setTag("&8[&2Telnet Admin&8]");
|
||||
}
|
||||
else if (TFM_AdminList.isSuperAdmin(player))
|
||||
{
|
||||
player.setPlayerListName(ChatColor.AQUA + player.getName());
|
||||
TFM_PlayerData.getPlayerData(player).setTag("&8[&BSuper Admin&8]");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue