Can't figure out chat tags

Discussion in 'Plugin Development' started by Fiddy_percent, Aug 4, 2014.

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

    Fiddy_percent

    doesn't seem to run and I cant figure out why
    this is AsyncPlayerChatEvent
    Code:java
    1. FcPlayers fc = new FcPlayers(plugin,p);
    2. String job = fc.getPlayerJob();
    3. String ms = e.getMessage();
    4. String format = ms;
    5.  
    6.  
    7.  
    8. if(job.equalsIgnoreCase("Farmer")){
    9. format = "["+ChatColor.DARK_GREEN + job + "]" + ChatColor.WHITE + ms;
    10. }else if(job.equalsIgnoreCase("Police")){
    11. format = "["+ChatColor.DARK_BLUE + job + "]" + ChatColor.WHITE + ms;
    12. }else if(job.equalsIgnoreCase("Unemployed")){
    13. format = "["+ChatColor.DARK_AQUA + "Citizen" + "]";
    14. }
    15. e.getMessage().format(format, ChatColor.WHITE + ms);
     
  2. Offline

    Regablith

    is fc the player?
     
  3. Offline

    Fiddy_percent

    its the players plugin data not the actual player Entity
     
  4. Offline

    Gater12

    Fiddy_percent
    I don't think that's what String#format does...
     
  5. Offline

    Fiddy_percent

    then how do you make player chat tags? Gater12
     
  6. Offline

    Gater12

Thread Status:
Not open for further replies.

Share This Page