Call superclass constructor for GroupManager, fixes #48

This commit is contained in:
vemacs 2015-06-02 17:09:03 -06:00
parent 5375ff3790
commit ce5ffb9bd7
3 changed files with 3 additions and 10 deletions

View File

@ -11,6 +11,7 @@ public class GroupManagerHandler extends AbstractVaultHandler {
private final transient GroupManager groupManager;
public GroupManagerHandler(final Plugin permissionsPlugin) {
super();
groupManager = ((GroupManager) permissionsPlugin);
}

View File

@ -1,20 +1,13 @@
package com.earth2me.essentials.perm;
import org.bukkit.entity.Player;
import ru.tehkode.permissions.PermissionManager;
import ru.tehkode.permissions.PermissionUser;
import ru.tehkode.permissions.bukkit.PermissionsEx;
public class PermissionsExHandler extends AbstractVaultHandler {
private final transient PermissionManager manager;
public PermissionsExHandler() {
manager = PermissionsEx.getPermissionManager();
}
@Override
public boolean canBuild(final Player base, final String group) {
final PermissionUser user = manager.getUser(base.getUniqueId());
final PermissionUser user = PermissionsEx.getPermissionManager().getUser(base.getUniqueId());
return user != null && user.getOptionBoolean("build", base.getWorld().getName(), false);
}
}

View File

@ -8,7 +8,6 @@ import org.bukkit.plugin.PluginManager;
import java.util.Collections;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
public class PermissionsHandler implements IPermissionsHandler {
@ -147,9 +146,9 @@ public class PermissionsHandler implements IPermissionsHandler {
if (vault.setupProviders()) {
ess.getLogger().info("Using generic Vault based permissions.");
handler = vault;
return;
}
}
return;
}
if (useSuperperms) {