forked from LogBlock/LogBlock
Check if WorldEdit Version is above WE 5
This commit is contained in:
@@ -119,7 +119,11 @@ public class LogBlock extends JavaPlugin
|
|||||||
if (noDb)
|
if (noDb)
|
||||||
return;
|
return;
|
||||||
if (pm.getPlugin("WorldEdit") != null) {
|
if (pm.getPlugin("WorldEdit") != null) {
|
||||||
|
if(Integer.parseInt(pm.getPlugin("WorldEdit").getDescription().getVersion().substring(0, 1)) > 5) {
|
||||||
new WorldEditLoggingHook(this).hook();
|
new WorldEditLoggingHook(this).hook();
|
||||||
|
} else {
|
||||||
|
getLogger().warning("Failed to hook into WorldEdit. Your WorldEdit version seems to be outdated, please make sure WorldEdit is at least version 6.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
commandsHandler = new CommandsHandler(this);
|
commandsHandler = new CommandsHandler(this);
|
||||||
getCommand("lb").setExecutor(commandsHandler);
|
getCommand("lb").setExecutor(commandsHandler);
|
||||||
|
Reference in New Issue
Block a user