Development Assistance StaffChat Rank

Discussion in 'Plugin Help/Development/Requests' started by RanterMC, Jun 23, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    RanterMC

    right now I'm making Staff Chat and I want to ask how can I do like rank staff chat.
    I mean for example:
    Moderator has a red rank color
    Admin has dark red rank color
    And in staff chat how can I make it so that you can see rank in the chat?
    Like that:
    [STAFFCHAT] UserAdmin: HelloWorld!
    [STAFFCHAT] UserMod: HelloWorld!

    How can I do that ^ ?
    Thanks.
     
  2. Offline

    Xerox262

    Do something like this for all possible prefixes, then when you're sending the message do playerPrefix + player.getName();
    Code:java
    1.  
    2. String playerPrefix = "";
    3. if(player.hasPermission("staffchat.admin")) {
    4. playerPrefix = ChatColor.DARK_RED + "ADMIN ";
    5. } else if (player.hasPermission("staffchat.moderator")) {
    6. playerPrefix = ChatColor.RED + "MODERATOR ";
    7. }
    8.  


    P.S. You should go in decending order, example Admin > Moderator > Pre-Mod > Helper > Default
     
  3. Offline

    RanterMC

    I mean I don't want prefixes, just a coloured name..
     
  4. Offline

    Boomer

    do the same as above, minus the "ADMIN" text
    Nix that, that will just color the text that follows.
    You can change player.setDisplayName() to be colored
     
Thread Status:
Not open for further replies.

Share This Page