mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-06 02:51:32 +01:00
Copy logic from pre-refactor, should fix everything PermissionsHandler related, add Vault dependency to readme
This commit is contained in:
parent
8f71261646
commit
1f14ac5c18
@ -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)) {
|
||||
|
@ -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
|
||||
--------
|
||||
|
Loading…
Reference in New Issue
Block a user