Use latest WorldGuard-integration for all versions > 6

Fixes FastAsyncWorldEdit incompatibility
implements #172
This commit is contained in:
Sn0wStorm 2019-07-01 19:09:34 +02:00
parent e62e9a61c2
commit b713463ba3

View File

@ -333,9 +333,13 @@ public class P extends JavaPlugin {
Plugin plugin = Bukkit.getPluginManager().getPlugin("WorldEdit");
if (plugin != null) {
String wgv = plugin.getDescription().getVersion();
if (wgv.startsWith("7.")) wg = new WGBarrel7();
else if (wgv.startsWith("6.")) wg = new WGBarrelNew();
else if (wgv.startsWith("5.")) wg = new WGBarrelOld();
if (wgv.startsWith("6.")) {
wg = new WGBarrelNew();
} else if (wgv.startsWith("5.")) {
wg = new WGBarrelOld();
} else {
wg = new WGBarrel7();
}
}
if (wg == null) {
P.p.errorLog("Failed loading WorldGuard Integration! Opening Barrels will NOT work!");