Fix color codes in preview?

This commit is contained in:
Eva 2022-03-23 23:24:22 +00:00 committed by GitHub
parent 5368ad722a
commit 0925327aff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,7 +31,7 @@ public class Command_myadmin extends FreedomCommand {
if ("setlogin".equalsIgnoreCase(args[0])) { if ("setlogin".equalsIgnoreCase(args[0])) {
final String inputMessage = StringUtils.join(args, " ", 1, args.length); // Parse the input provided. final String inputMessage = StringUtils.join(args, " ", 1, args.length); // Parse the input provided.
playerMsg(ChatColor.GRAY + "Set your custom login message."); // Notify player that the login message has been set. playerMsg(ChatColor.GRAY + "Set your custom login message."); // Notify player that the login message has been set.
playerMsg(ChatColor.GRAY + "Your login message will show up as: \n" + ChatColor.AQUA + sender_p.getPlayer().getName() + " is " + inputMessage); playerMsg(ChatColor.GRAY + "Your login message will show up as: \n" + ChatColor.AQUA + sender_p.getPlayer().getName() + " is " + ChatColor.translateAlternateColorCodes('&', inputMessage));
AdminList.getEntry(uuid).setCustomLoginMessage(inputMessage); // Set the custom login message to the value. AdminList.getEntry(uuid).setCustomLoginMessage(inputMessage); // Set the custom login message to the value.
AdminList.save(AdminList.getEntry(uuid)); // Save the modified value to the super admin configuration. AdminList.save(AdminList.getEntry(uuid)); // Save the modified value to the super admin configuration.