mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Merge branch 'master' of https://github.com/IntellectualSites/PlotSquared
This commit is contained in:
commit
22901bf9f2
@ -170,9 +170,12 @@ public class SpongeMain implements IPlotMain {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getPluginVersion() {
|
public int[] getPluginVersion() {
|
||||||
String version = this.plugin.getVersion().orElse("");
|
String ver = this.plugin.getVersion().orElse("");
|
||||||
String[] split = version.split("\\.");
|
if (ver.contains("-")) {
|
||||||
return new int[]{Integer.parseInt(split[0]), Integer.parseInt(split[1]), split.length == 3 ? Integer.parseInt(split[2]) : 0};
|
ver = ver.split("-")[0];
|
||||||
|
}
|
||||||
|
String[] split = ver.split("\\.");
|
||||||
|
return new int[]{Integer.parseInt(split[0]), Integer.parseInt(split[1]), Integer.parseInt(split[2])};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public String getPluginVersionString() {
|
@Override public String getPluginVersionString() {
|
||||||
@ -262,10 +265,10 @@ public class SpongeMain implements IPlotMain {
|
|||||||
public boolean initWorldEdit() {
|
public boolean initWorldEdit() {
|
||||||
try {
|
try {
|
||||||
Class.forName("com.sk89q.worldedit.WorldEdit");
|
Class.forName("com.sk89q.worldedit.WorldEdit");
|
||||||
return true;
|
|
||||||
} catch (ClassNotFoundException ignored) {
|
} catch (ClassNotFoundException ignored) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user