From 009a4608b8872992048c3446d3a1be8c6253feb6 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 25 Jun 2013 15:15:38 +1200 Subject: [PATCH] Changed update message coloring to red --- src/me/libraryaddict/disguise/LibsDisguises.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/me/libraryaddict/disguise/LibsDisguises.java b/src/me/libraryaddict/disguise/LibsDisguises.java index c54a25c3..1b36688a 100644 --- a/src/me/libraryaddict/disguise/LibsDisguises.java +++ b/src/me/libraryaddict/disguise/LibsDisguises.java @@ -36,6 +36,9 @@ public class LibsDisguises extends JavaPlugin implements Listener { private String latestVersion; private String currentVersion; private String permission; + private String updateMessage = ChatColor.RED + "[LibsDisguises] " + ChatColor.DARK_RED + + "There is a update ready to be downloaded! You are using " + ChatColor.RED + "%s" + ChatColor.DARK_RED + + ", the new version is " + ChatColor.RED + "%s" + ChatColor.DARK_RED + "!"; @Override public void onEnable() { @@ -152,10 +155,7 @@ public class LibsDisguises extends JavaPlugin implements Listener { latestVersion = "v" + latestVersion; for (Player p : Bukkit.getOnlinePlayers()) if (p.hasPermission(permission)) - p.sendMessage(String.format(ChatColor.GOLD + "[LibsDisguises] " + ChatColor.DARK_GREEN - + "There is a update ready to be downloaded! You are using " + ChatColor.GREEN + "%s" - + ChatColor.DARK_GREEN + ", the new version is " + ChatColor.GREEN + "%s" - + ChatColor.DARK_GREEN + "!", currentVersion, latestVersion)); + p.sendMessage(String.format(updateMessage, currentVersion, latestVersion)); } } catch (Exception ex) { System.out.print(String.format("[LibsDisguises] Failed to check for update: %s", ex.getMessage())); @@ -170,9 +170,6 @@ public class LibsDisguises extends JavaPlugin implements Listener { public void onJoin(PlayerJoinEvent event) { Player p = event.getPlayer(); if (latestVersion != null && p.hasPermission(permission)) - p.sendMessage(String.format(ChatColor.GOLD + "[LibsDisguises] " + ChatColor.DARK_GREEN - + "There is a update ready to be downloaded! You are using " + ChatColor.GREEN + "%s" + ChatColor.DARK_GREEN - + ", the new version is " + ChatColor.GREEN + "%s" + ChatColor.DARK_GREEN + "!", currentVersion, - latestVersion)); + p.sendMessage(String.format(updateMessage, currentVersion, latestVersion)); } } \ No newline at end of file