1.15.2 custom chat format!

Discussion in 'Spigot Plugin Development' started by Lurkers1234567, May 30, 2020.

  1. How do I get it to format what group a person is in? im struggling at this point

    Code (Text):
    public class chatFormat implements Listener {
     FileConfiguration config;
        public chatFormat(Main c) {
            this.config = c.getConfig();
        public void chatFormat(AsyncPlayerChatEvent e) {
            Player p = e.getPlayer();
            String c = config.getString("chat_format");
            c = c.replace("{message}", e.getMessage());
            c = c.replace("{player}", p.getDisplayName());
            e.setFormat(ChatColor.translateAlternateColorCodes('&', c));
  2. Sorry, stupid quesiton but: What groups are you talking about?
  3. sorry my bad, like prefix for groups on server, im trying to get it to work so prefix on lp or pex or any others will work with my plugin, im currently making customessentials and it wont show group prefix because of the chat_format, i have added c = c.replace("{group}", "[PREFIX]");
  4. it did but PermissionEx just in red scribbles :/ do i have to add them into Ref libraries
  5. Yes, you will have to add it as library or if you use maven then you can include it as dependency in your pom.xml
  6. ok its luckperms now :| pex is unsupportive now DX