Closed eth-p closed 4 years ago
Cool!! But we can also remove the blank space, add the blank space on language files for new users, and let existing users to choose if leave without that space or add on your lang files?
As example from:
p.sendMessage(get(p, "_UChat.prefix") + " " + UCMessages.formatTags("",
UChatColor.translateAlternateColorCodes(key), p, "", "", UChat.get().getPlayerChannel(p)));
p.sendMessage(get(p, "_UChat.prefix") + UCMessages.formatTags("",
UChatColor.translateAlternateColorCodes(key), p, "", "", UChat.get().getPlayerChannel(p)));
That could work too. I did it the way I did to avoid breaking any existing configs, but if you have a way to automatically change the prefix for old installations that work be a more optimal solution.
Whenever the
_UChat.prefix
locale key is set to an empty string, chat messages are still prefixed with an extra space. This pull request fixes that by explicitly checking the prefix, and only adding a space if it's not empty.Tested on Paper 1.15.2. I was unable to test it on Sponge, as their maven repo is currently down.