Remove permissions support
This commit is contained in:
@ -58,9 +58,6 @@ import org.bukkit.plugin.PluginDescriptionFile;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
// Permissions
|
||||
import com.nijikokun.bukkit.Permissions.Permissions;
|
||||
|
||||
/**
|
||||
* Stargate - A portal plugin for Bukkit
|
||||
* Copyright (C) 2011 Shaun (sturmeh)
|
||||
@ -83,9 +80,6 @@ import com.nijikokun.bukkit.Permissions.Permissions;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class Stargate extends JavaPlugin {
|
||||
// Permissions
|
||||
private static Permissions permissions = null;
|
||||
|
||||
public static Logger log;
|
||||
private FileConfiguration newConfig;
|
||||
private PluginManager pm;
|
||||
@ -169,12 +163,7 @@ public class Stargate extends JavaPlugin {
|
||||
this.migrate();
|
||||
this.reloadGates();
|
||||
|
||||
// Check to see if iConomy/Permissions is loaded yet.
|
||||
permissions = (Permissions)checkPlugin("Permissions");
|
||||
if (permissions != null && (permissions.getDescription().getVersion().equals("2.7.2") || permissions.getDescription().getVersion().equals("2.7.7"))) {
|
||||
log.info("[Stargate] Permissions is 2.7.2/2.7.7, most likely a bridge, disabling.");
|
||||
permissions = null;
|
||||
}
|
||||
// Check to see if iConomy is loaded yet.
|
||||
if (iConomyHandler.setupeConomy(pm)) {
|
||||
if (iConomyHandler.register != null)
|
||||
log.info("[Stargate] Register v" + iConomyHandler.register.getDescription().getVersion() + " found");
|
||||
@ -381,15 +370,9 @@ public class Stargate extends JavaPlugin {
|
||||
* Check whether the player has the given permissions.
|
||||
*/
|
||||
public static boolean hasPerm(Player player, String perm) {
|
||||
if (permissions != null) {
|
||||
if (permDebug)
|
||||
Stargate.debug("hasPerm::Permissions(" + player.getName() + ")", perm + " => " + permissions.getHandler().has(player, perm));
|
||||
return permissions.getHandler().has(player, perm);
|
||||
} else {
|
||||
if (permDebug)
|
||||
Stargate.debug("hasPerm::SuperPerm(" + player.getName() + ")", perm + " => " + player.hasPermission(perm));
|
||||
return player.hasPermission(perm);
|
||||
}
|
||||
if (permDebug)
|
||||
Stargate.debug("hasPerm::SuperPerm(" + player.getName() + ")", perm + " => " + player.hasPermission(perm));
|
||||
return player.hasPermission(perm);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -399,20 +382,14 @@ public class Stargate extends JavaPlugin {
|
||||
* Or the value of the node if it is
|
||||
*/
|
||||
public static boolean hasPermDeep(Player player, String perm) {
|
||||
if (permissions != null) {
|
||||
if (!player.isPermissionSet(perm)) {
|
||||
if (permDebug)
|
||||
Stargate.debug("hasPermDeep::Permissions", perm + " => " + permissions.getHandler().has(player, perm));
|
||||
return permissions.getHandler().has(player, perm);
|
||||
} else {
|
||||
if (!player.isPermissionSet(perm)) {
|
||||
if (permDebug)
|
||||
Stargate.debug("hasPermDeep::SuperPerm", perm + " => true");
|
||||
return true;
|
||||
}
|
||||
if (permDebug)
|
||||
Stargate.debug("hasPermDeep::SuperPerms", perm + " => " + player.hasPermission(perm));
|
||||
return player.hasPermission(perm);
|
||||
Stargate.debug("hasPermDeep::SuperPerm", perm + " => true");
|
||||
return true;
|
||||
}
|
||||
if (permDebug)
|
||||
Stargate.debug("hasPermDeep::SuperPerms", perm + " => " + player.hasPermission(perm));
|
||||
return player.hasPermission(perm);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1303,16 +1280,6 @@ public class Stargate extends JavaPlugin {
|
||||
if (iConomyHandler.setupVault(event.getPlugin())) {
|
||||
log.info("[Stargate] Vault v" + iConomyHandler.vault.getDescription().getVersion() + " found");
|
||||
}
|
||||
if (permissions == null) {
|
||||
PluginDescriptionFile desc = event.getPlugin().getDescription();
|
||||
if (desc.getName().equalsIgnoreCase("Permissions")) {
|
||||
if (desc.getVersion().equals("2.7.2") || desc.getVersion().equals("2.7.7")) {
|
||||
log.info("[Stargate] Permissions is 2.7.2/2.7.7, most likely a bridge, disabling.");
|
||||
return;
|
||||
}
|
||||
permissions = (Permissions)checkPlugin(event.getPlugin());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -1320,10 +1287,6 @@ public class Stargate extends JavaPlugin {
|
||||
if (iConomyHandler.checkLost(event.getPlugin())) {
|
||||
log.info("[Stargate] Register/Vault plugin lost.");
|
||||
}
|
||||
if (event.getPlugin() == permissions) {
|
||||
log.info("[Stargate] Permissions plugin lost.");
|
||||
permissions = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: Stargate
|
||||
main: net.TheDgtl.Stargate.Stargate
|
||||
version: 0.7.9.8
|
||||
version: 0.7.9.9
|
||||
description: Stargate mod for Bukkit
|
||||
author: Drakia
|
||||
website: http://www.thedgtl.net
|
||||
|
Reference in New Issue
Block a user