mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Java 9
This commit is contained in:
parent
8edc357d01
commit
878010255c
@ -149,7 +149,7 @@ public class PS {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (getJavaVersion() < 1.8) {
|
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();
|
TaskManager.IMP = this.IMP.getTaskManager();
|
||||||
setupConfigs();
|
setupConfigs();
|
||||||
@ -2008,7 +2008,7 @@ public class PS {
|
|||||||
* Get the Java version.
|
* Get the Java version.
|
||||||
* @return the java version
|
* @return the java version
|
||||||
*/
|
*/
|
||||||
private double getJavaVersion() {
|
public double getJavaVersion() {
|
||||||
return Double.parseDouble(System.getProperty("java.specification.version"));
|
return Double.parseDouble(System.getProperty("java.specification.version"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,8 +158,8 @@ public enum C {
|
|||||||
/*
|
/*
|
||||||
* Static console
|
* 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 "
|
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 9 in a future update.", "static.console"),
|
+ "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. "
|
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"),
|
+ "Bug fixes and new features are influenced on metrics.", "static.console"),
|
||||||
/*
|
/*
|
||||||
|
@ -71,7 +71,9 @@ public abstract class EventUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (PS.get().update != null && Permissions.hasPermission(player, C.PERMISSION_ADMIN_UPDATE) && Settings.Enabled_Components.UPDATER) {
|
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");
|
MainUtil.sendMessage(player, "&6An update for " + PS.imp().getPluginName() + " is available: &7/plot update");
|
||||||
}
|
}
|
||||||
final Plot plot = player.getCurrentPlot();
|
final Plot plot = player.getCurrentPlot();
|
||||||
|
Loading…
Reference in New Issue
Block a user