Skip to content
This repository has been archived by the owner on Feb 3, 2024. It is now read-only.

Commit

Permalink
Add better incompatible version warning essage
Browse files Browse the repository at this point in the history
  • Loading branch information
zml2008 committed Jan 17, 2015
1 parent 2a21e89 commit 9333bf2
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/main/java/ru/tehkode/permissions/bukkit/PermissionsEx.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.logging.Level;
import java.util.logging.LogRecord;

import com.google.common.cache.CacheBuilder;
import com.zachsthings.netevents.NetEventsPlugin;
import net.gravitydevelopment.updater.Updater;
import org.bukkit.ChatColor;
Expand Down Expand Up @@ -160,19 +161,30 @@ public void onEnable() {
return;
}
try {
try {
CacheBuilder.class.getMethod("maximumSize", long.class);
} catch (NoSuchMethodException e) {
getLogger().severe("=================================================================================");
getLogger().severe("As of version 1.23, PEX is only compatible with versions of Minecraft 1.8 or greater. " +
"Please downgrade to the most recent 1.22.x series version of PEX to continue.");
getLogger().severe("=================================================================================");
getPluginLoader().disablePlugin(this);
return;
}

if (this.permissionsManager == null) {
this.permissionsManager = new PermissionManager(config, getLogger(), this);
}

try {
OfflinePlayer.class.getMethod("getUniqueId");
} catch (NoSuchMethodException e) {
getLogger().severe("============================================================================================");
getLogger().severe("=================================================================================");
getLogger().severe("As of version 1.21, PEX requires a version of Bukkit with UUID support to function (>1.7.5). Please download a non-UUID version of PermissionsEx to continue.");
getLogger().severe("Beginning reversion of potential invalid UUID conversion");
getPermissionsManager().getBackend().revertUUID();
getLogger().severe("Reversion complete, disabling. PermissionsEx will not work until downgrade is complete");
getLogger().severe("============================================================================================");
getLogger().severe("=================================================================================");
getPluginLoader().disablePlugin(this);
return;
}
Expand Down

0 comments on commit 9333bf2

Please sign in to comment.