Copy logic from pre-refactor, should fix everything PermissionsHandler related, add Vault dependency to readme

This commit is contained in:
vemacs 2015-06-03 07:04:39 -06:00
parent 8f71261646
commit 1f14ac5c18
2 changed files with 27 additions and 27 deletions

View File

@ -94,10 +94,10 @@ public class PermissionsHandler implements IPermissionsHandler {
}
public void checkPermissions() {
if (!(handler instanceof NullPermissionsHandler)) return;
final PluginManager pluginManager = ess.getServer().getPluginManager();
final Plugin vaultAPI = pluginManager.getPlugin("Vault");
if (vaultAPI != null && vaultAPI.isEnabled()) {
if (!(handler instanceof AbstractVaultHandler)) {
AbstractVaultHandler vaultHandler;
String enabledPermsPlugin = "";
List<String> specialCasePlugins = Arrays.asList("PermissionsEx", "GroupManager",
@ -124,14 +124,14 @@ public class PermissionsHandler implements IPermissionsHandler {
vaultHandler = new GenericVaultHandler();
}
if (vaultHandler.setupProviders()) {
if (enabledPermsPlugin.equals("")) {
enabledPermsPlugin = "generic";
}
handler = vaultHandler;
ess.getLogger().info("Using Vault based permissions (" + enabledPermsPlugin + ")");
return;
vaultHandler.setupProviders();
}
return;
}
if (useSuperperms) {
if (!(handler instanceof SuperpermsHandler)) {

View File

@ -11,7 +11,7 @@ Why you should use it
EssentialsX provides several performance enhancements and fixes that are currently not available in Essentials and Spigot-Essentials. [See the wiki for details.](https://github.com/drtshock/Essentials/wiki)
EssentialsX is a drop-in replacement for Essentials.
EssentialsX is almost a completely drop-in replacement for Essentials. **EssentialsX requires [Vault](http://dev.bukkit.org/bukkit-plugins/vault/) if you have a supported permissions plugin.**
Downloads
--------