Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void playerChat(PlayerChatEvent e) {
- Player p = e.getPlayer();
- String pname = p.getName();
- if (p.hasPermission("lobby.member")) {
- String member = "" +"[" + ChatColor.GRAY + "Member" + ChatColor.RESET + "] " + pname + "";
- p.setDisplayName(member);
- } else if (p.hasPermission("lobby.mod")) {
- String mod = "" + ChatColor.BLACK + "[" + ChatColor.GREEN + "Mod" + ChatColor.BLACK + "] " + ChatColor.RESET + ChatColor.GOLD + pname + ChatColor.RESET + "";
- p.setDisplayName(mod);
- } else if (p.hasPermission("lobby.builder")) {
- String builder = "" + ChatColor.BLACK + "[" + ChatColor.YELLOW + "Builder" + ChatColor.BLACK + "] " + ChatColor.GOLD + pname + ChatColor.RESET + "";
- p.setDisplayName(builder);
- } else if (p.hasPermission("lobby.admin")) {
- String admin = "" + ChatColor.BLACK + "[" + ChatColor.DARK_GREEN + ChatColor.BOLD + "Admin" + ChatColor.RESET + ChatColor.BLACK + "] " + ChatColor.GOLD + pname + ChatColor.RESET + "";
- p.setDisplayName(admin);
- } else if (p.hasPermission("lobby.coowner")) {
- String coowner = "" + ChatColor.BLACK + "[" + ChatColor.BLUE + ChatColor.BOLD + "CO-OWNER" + ChatColor.RESET + ChatColor.BLACK + "]" + ChatColor.BLACK + "[" + ChatColor.YELLOW + ChatColor.BOLD + "Head Builder" + ChatColor.RESET + ChatColor.BLACK + "] " + ChatColor.GOLD + pname + ChatColor.RESET + "";
- p.setDisplayName(coowner);
- } else if (p.hasPermission("lobby.owner")) {
- String owner = "" + ChatColor.BLACK + "[" + ChatColor.AQUA + ChatColor.BOLD + "OWNER" + ChatColor.RESET + ChatColor.BLACK + "]" + ChatColor.RESET + ChatColor.BLACK + "[" + ChatColor.YELLOW + "Builder" + ChatColor.RESET + ChatColor.BLACK + "] " + ChatColor.GOLD + pname + ChatColor.RESET + "";
- p.setDisplayName(owner);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement