mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-26 10:44:42 +02:00
tweals
This commit is contained in:
@ -26,7 +26,9 @@ public interface IPlotMain {
|
||||
|
||||
public void disable();
|
||||
|
||||
public String getVersion();
|
||||
public int[] getPluginVersion();
|
||||
|
||||
public int[] getServerVersion();
|
||||
|
||||
public void handleKick(UUID uuid, C c);
|
||||
|
||||
@ -79,6 +81,4 @@ public interface IPlotMain {
|
||||
public PlayerManager initPlayerManager();
|
||||
|
||||
public String getServerName();
|
||||
|
||||
public boolean checkVersion(int major, int minor, int minor2);
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ public class PS {
|
||||
} catch (Exception e) {
|
||||
log("Could not determine file path");
|
||||
}
|
||||
VERSION = IMP.getVersion();
|
||||
VERSION = IMP.getPluginVersion();
|
||||
EconHandler.manager = IMP.getEconomyHandler();
|
||||
if (getJavaVersion() < 1.7) {
|
||||
log(C.PREFIX.s() + "&cYour java version is outdated. Please update to at least 1.7.");
|
||||
@ -239,6 +239,10 @@ public class PS {
|
||||
showDebug();
|
||||
}
|
||||
|
||||
public boolean checkVersion(int[] version, int major, int minor, int minor2) {
|
||||
return (version[0] > major) || ((version[0] == major) && (version[1] > minor)) || ((version[0] == major) && (version[1] == minor) && (version[2] >= minor2));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the instance of PlotSquared
|
||||
*
|
||||
|
@ -71,11 +71,11 @@ public class plugin extends SubCommand {
|
||||
final ArrayList<String> strings = new ArrayList<String>() {
|
||||
// $2>> $1%id$2:$1%world $2- $1%owner
|
||||
{
|
||||
add(String.format("$2>> $1&lPlotSquared $2($1Version$2: $1%s$2)", PS.get().IMP.getVersion()));
|
||||
add(String.format("$2>> $1&lPlotSquared $2($1Version$2: $1%s$2)", PS.get().IMP.getPluginVersion()));
|
||||
add(String.format("$2>> $1&lAuthors$2: $1Citymonstret $2& $1Empire92"));
|
||||
add(String.format("$2>> $1&lWiki$2: $1https://github.com/IntellectualCrafters/PlotSquared/wiki"));
|
||||
add(String.format("$2>> $1&lWebsite$2: $1http://plotsquared.com"));
|
||||
add(String.format("$2>> $1&lNewest Version$2: $1" + (PS.get().update == null ? PS.get().IMP.getVersion() : PS.get().update)));
|
||||
add(String.format("$2>> $1&lNewest Version$2: $1" + (PS.get().update == null ? PS.get().IMP.getPluginVersion() : PS.get().update)));
|
||||
}
|
||||
};
|
||||
for (final String s : strings) {
|
||||
|
Reference in New Issue
Block a user