Remove unneeded permissions class.

This commit is contained in:
drtshock 2015-01-05 10:40:35 -06:00
parent 7b56276c2d
commit f411b4e014
1 changed files with 0 additions and 18 deletions

View File

@ -13,14 +13,10 @@ import com.massivecraft.factions.struct.ChatMode;
import com.massivecraft.factions.util.*;
import com.massivecraft.factions.zcore.MPlugin;
import com.massivecraft.factions.zcore.util.TextUtil;
import net.milkbowl.vault.permission.Permission;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.plugin.RegisteredServiceProvider;
import java.lang.reflect.Modifier;
import java.lang.reflect.Type;
@ -47,8 +43,6 @@ public class P extends MPlugin {
// Persistence related
private boolean locked = false;
public static Permission perms = null;
public boolean getLocked() {
return this.locked;
}
@ -73,7 +67,6 @@ public class P extends MPlugin {
this.blockListener = new FactionsBlockListener(this);
}
@Override
public void onEnable() {
if (!preEnable()) {
@ -122,7 +115,6 @@ public class P extends MPlugin {
getServer().getPluginManager().registerEvents(blockListener, this);
saveDefaultConfig();
setupPermissions();
// since some other plugins execute commands directly through this command interface, provide it
this.getCommand(this.refCommand).setExecutor(this);
@ -131,12 +123,6 @@ public class P extends MPlugin {
this.loadSuccessful = true;
}
private boolean setupPermissions() {
RegisteredServiceProvider<Permission> rsp = getServer().getServicesManager().getRegistration(Permission.class);
perms = rsp.getProvider();
return perms != null;
}
@Override
public GsonBuilder getGsonBuilder() {
Type mapFLocToStringSetType = new TypeToken<Map<FLocation, Set<String>>>() {
@ -323,10 +309,6 @@ public class P extends MPlugin {
return players;
}
public String getPrimaryGroup(OfflinePlayer player) {
return perms == null ? " " : perms.getPrimaryGroup(Bukkit.getWorlds().get(0).toString(), player);
}
public void debug(Level level, String s) {
if (getConfig().getBoolean("debug", false)) {
getLogger().log(level, s);