Question How do I make my new players talk in gray as default instead of white

Discussion in 'Plugin Help/Development/Requests' started by Wagy, Oct 24, 2015.

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

    Wagy

    the title explains it all... basically I am wondering how do I make players new players talk in gray instead of the default white, I want to set gray to default
     
  2. Offline

    Binner_Done

    EssentialsChat, edit in config
     
  3. Offline

    Wagy

    @Binner_Done Doesnt work, from default to this format: '&7{DISPLAYNAME} 》&7 {MESSAGE}'

    Do you know how I could fix it ?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Oct 29, 2015
  4. Offline

    ObviousEmeralds

    If you want to create a plugin to make this, Add ChatColor.GRAY before the chat event.

    For essentials chat, Instead of using &7, use &8
     
  5. Offline

    Firestar311

    @Wagy For EssentialsChat, you need EssentialsChat installed. And you want group formats, you need this section under the "Essentials Chat" section in the config.
    Code:
     group-formats:
      #  Default: '{WORLDNAME} {DISPLAYNAME}&7:&r {MESSAGE}'
      #  Admins: '{WORLDNAME} &c[{GROUP}]&r {DISPLAYNAME}&7:&c {MESSAGE}'
    This is the default part of the config, you MUST specify the group name as it is in the config of your permissions plugin. This does work for ALL permissions plugins
    Although I use my own plugin for chat formatting, I still know how to do this. So for example, my Owner rank is "FirecraftTeam" and of course Admin is "Admin" and so on, so an example config might be...
    Code:
    group-formats:
        Member: '{DISPLAYNAME}&7:&f {MESSAGE}'
        Helper: '{DISPLAYNAME}&7:&c {MESSAGE}'
        Mod: '{DISPLAYNAME}&7:&c {MESSAGE}'
        Admin: '{DISPLAYNAME}&7:&c {MESSAGE}'
        FirecraftTeam: '{DISPLAYNAME}&7:&c {MESSAGE}'
    If you need a list of variables here is a link.
     
  6. Offline

    TheMrJezza

    But going with what @ObviousEmeralds said, if you want to make a plugin, it's simple.

    Code:
    @EventHandler
    public void onChat(AsyncPlayerChatEvent evt) {
    Player player = evt.getPlayer();
    if (player.hasPermission("chatcolor.gray")) {
        evt.setFormat("<%s>" + ChatColor.GRAY + "%s");
        }
    } 
    This isn't tested, but anyone with the permission chatcolor.gray should have gray chat.
     
Thread Status:
Not open for further replies.

Share This Page