This commit is contained in:
Jesse Boyd 2016-11-28 18:01:41 +11:00
parent 8edc357d01
commit 878010255c
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
3 changed files with 7 additions and 5 deletions

View File

@ -149,7 +149,7 @@ public class PS {
}
}
if (getJavaVersion() < 1.8) {
PS.log(C.CONSOLE_JAVA_OUTDATED_1_8.f(IMP.getPluginName()));
PS.log(C.CONSOLE_JAVA_OUTDATED.f(IMP.getPluginName()));
}
TaskManager.IMP = this.IMP.getTaskManager();
setupConfigs();
@ -2008,7 +2008,7 @@ public class PS {
* Get the Java version.
* @return the java version
*/
private double getJavaVersion() {
public double getJavaVersion() {
return Double.parseDouble(System.getProperty("java.specification.version"));
}

View File

@ -158,8 +158,8 @@ public enum C {
/*
* Static console
*/
CONSOLE_JAVA_OUTDATED_1_8("&cYour version of java is outdated. It is highly recommended that you update to Java 8 as it increases performance "
+ "and security. %s0 will require Java 9 in a future update.", "static.console"),
CONSOLE_JAVA_OUTDATED("&cYour version of java is outdated. It is highly recommended that you update to Java 8 as it increases performance "
+ "and security. %s0 will require Java 8 in a future update.", "static.console"),
CONSOLE_PLEASE_ENABLE_METRICS("&dPlease enable metrics for %s0. Using metrics improves plugin stability, performance, and features. "
+ "Bug fixes and new features are influenced on metrics.", "static.console"),
/*

View File

@ -71,7 +71,9 @@ public abstract class EventUtil {
}
}
if (PS.get().update != null && Permissions.hasPermission(player, C.PERMISSION_ADMIN_UPDATE) && Settings.Enabled_Components.UPDATER) {
MainUtil.sendMessage(player,C.CONSOLE_JAVA_OUTDATED_1_8.f(PS.get().IMP.getPluginName()));
if (PS.get().getJavaVersion() < 1.8) {
MainUtil.sendMessage(player, C.CONSOLE_JAVA_OUTDATED.f(PS.get().IMP.getPluginName()));
}
MainUtil.sendMessage(player, "&6An update for " + PS.imp().getPluginName() + " is available: &7/plot update");
}
final Plot plot = player.getCurrentPlot();