Scoreboard Team Prefixes arent displayed in chat

Discussion in 'Plugin Development' started by M4GNV5, Oct 28, 2013.

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


    hey guys
    i now managed solving my last problem with my scoreboard-team-groupmanager plugin but here is the next:

    i can edit prefixes and suffixes of plugins but they are only displayed in the list of players you can see pressing TAB and not in the chat...

    the funny thing is that when i edit prefixes and copy the world to a vanilla server the prefix is displayed in both list and chat :D

    so where is the problem with bukkit?
  2. Offline


    Lol, I didn't know about that xD.
    What I did is this :
    Event :
    public void onPlayerSay(AsyncPlayerChatEvent e){
    Check if the player is in teamblue (can be any teamobject), if it is than set the format of the message.
    e.setFormat(ChatColor.GRAY + "[" + ChatColor.BLUE + "Blue" + ChatColor.GRAY + "] " + ChatColor.WHITE + e.getPlayer().getDisplayName() + ": "+ e.getMessage());
    That's what I did xD.
    If someone can answer your question please also tag me so I know what's the problem.
    This is just a way how you can fix it :)
    PLEASE tell me if this is a bad code (or even dangerous I don't know lol)
    Atleast this works fine and I'm using this for weeks now :p

    I hope it works for you,

  3. Offline


    well in fact that might works
    but normally the prefixes and suffixes of teams are displayed in chat ba the vanilla server and in vanilla it works so i do not understand why not in bukkit...

    of course you can do it the way you said but if it would work with scoreboard teams it would be much more easier ;)
Thread Status:
Not open for further replies.

Share This Page