mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-09-10 01:28:19 +02:00
Changed update message coloring to red
This commit is contained in:
parent
d52ef43738
commit
009a4608b8
@ -36,6 +36,9 @@ public class LibsDisguises extends JavaPlugin implements Listener {
|
|||||||
private String latestVersion;
|
private String latestVersion;
|
||||||
private String currentVersion;
|
private String currentVersion;
|
||||||
private String permission;
|
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
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
@ -152,10 +155,7 @@ public class LibsDisguises extends JavaPlugin implements Listener {
|
|||||||
latestVersion = "v" + latestVersion;
|
latestVersion = "v" + latestVersion;
|
||||||
for (Player p : Bukkit.getOnlinePlayers())
|
for (Player p : Bukkit.getOnlinePlayers())
|
||||||
if (p.hasPermission(permission))
|
if (p.hasPermission(permission))
|
||||||
p.sendMessage(String.format(ChatColor.GOLD + "[LibsDisguises] " + ChatColor.DARK_GREEN
|
p.sendMessage(String.format(updateMessage, currentVersion, latestVersion));
|
||||||
+ "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));
|
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
System.out.print(String.format("[LibsDisguises] Failed to check for update: %s", ex.getMessage()));
|
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) {
|
public void onJoin(PlayerJoinEvent event) {
|
||||||
Player p = event.getPlayer();
|
Player p = event.getPlayer();
|
||||||
if (latestVersion != null && p.hasPermission(permission))
|
if (latestVersion != null && p.hasPermission(permission))
|
||||||
p.sendMessage(String.format(ChatColor.GOLD + "[LibsDisguises] " + ChatColor.DARK_GREEN
|
p.sendMessage(String.format(updateMessage, currentVersion, latestVersion));
|
||||||
+ "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));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user