Remove permissions support
This commit is contained in:
parent
5d28fab1d2
commit
6c044ec82e
12
README
12
README
@ -15,9 +15,9 @@ iConomy support added back in, only costs are create, destroy and use.
|
|||||||
Permissions
|
Permissions
|
||||||
=============
|
=============
|
||||||
stargate.use -- Allow use of all gates linking to any world in any network (Override ALL network/world permissions. Set to false to use network/world specific permissions)
|
stargate.use -- Allow use of all gates linking to any world in any network (Override ALL network/world permissions. Set to false to use network/world specific permissions)
|
||||||
stargate.world -- Allow use of gates linking to any world (For Permissions 2.x/3.x please use stargate.world.*)
|
stargate.world -- Allow use of gates linking to any world
|
||||||
stargate.world.{world} -- Allow use of gates with a destination in {world}. Set to false to disallow use.
|
stargate.world.{world} -- Allow use of gates with a destination in {world}. Set to false to disallow use.
|
||||||
stargate.network -- Allow use of gates on all networks (For Permissions 2.x/3.x please use stargate.network.*)
|
stargate.network -- Allow use of gates on all networks
|
||||||
stargate.network.{network} -- Allow use of all gates in {network}. Set to false to disallow use.
|
stargate.network.{network} -- Allow use of all gates in {network}. Set to false to disallow use.
|
||||||
|
|
||||||
stargate.option -- Allow use of all options
|
stargate.option -- Allow use of all options
|
||||||
@ -32,14 +32,14 @@ stargate.option -- Allow use of all options
|
|||||||
|
|
||||||
stargate.create -- Allow creating gates on any network (Override all create permissions)
|
stargate.create -- Allow creating gates on any network (Override all create permissions)
|
||||||
stargate.create.personal -- Allow creating gates on network {playername}
|
stargate.create.personal -- Allow creating gates on network {playername}
|
||||||
stargate.create.network -- Allow creating gates on any network (For Permissions 2.x/3.x please use stargate.create.network.*)
|
stargate.create.network -- Allow creating gates on any network
|
||||||
stargate.create.network.{networkname} -- Allow creating gates on network {networkname}. Set to false to disallow creation on {networkname}
|
stargate.create.network.{networkname} -- Allow creating gates on network {networkname}. Set to false to disallow creation on {networkname}
|
||||||
stargate.create.gate -- Allow creation of any gate layout (For Permissions 2.x/3.x please use stargate.create.gate.*)
|
stargate.create.gate -- Allow creation of any gate layout
|
||||||
stargate.create.gate.{gatefile} -- Allow creation of only {gatefile} gates
|
stargate.create.gate.{gatefile} -- Allow creation of only {gatefile} gates
|
||||||
|
|
||||||
stargate.destroy -- Allow destruction gates on any network (Orderride all destroy permissions)
|
stargate.destroy -- Allow destruction gates on any network (Orderride all destroy permissions)
|
||||||
stargate.destroy.personal -- Allow destruction of gates owned by user only
|
stargate.destroy.personal -- Allow destruction of gates owned by user only
|
||||||
stargate.destroy.network -- Allow destruction of gates on any network (For Permissions 2.x/3.x please use stargate.destroy.network.*)
|
stargate.destroy.network -- Allow destruction of gates on any network
|
||||||
stargate.destroy.network.{networkname} -- Allow destruction of gates on network {networkname}. Set to false to disallow destruction of {networkname}
|
stargate.destroy.network.{networkname} -- Allow destruction of gates on network {networkname}. Set to false to disallow destruction of {networkname}
|
||||||
|
|
||||||
stargate.free -- Allow free use/creation/destruction of gates
|
stargate.free -- Allow free use/creation/destruction of gates
|
||||||
@ -215,6 +215,8 @@ Bukkit Issue: Stargate will randomly NPE when drawing a sign. Long-standing Bukk
|
|||||||
=============
|
=============
|
||||||
Changes
|
Changes
|
||||||
=============
|
=============
|
||||||
|
[Version 0.7.9.9]
|
||||||
|
- Remove "Permissions" support, we now only support SuperPerms handlers.
|
||||||
[Version 0.7.9.8]
|
[Version 0.7.9.8]
|
||||||
- Make sure buttons stay where they should
|
- Make sure buttons stay where they should
|
||||||
[Version 0.7.9.7]
|
[Version 0.7.9.7]
|
||||||
|
@ -58,9 +58,6 @@ import org.bukkit.plugin.PluginDescriptionFile;
|
|||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
// Permissions
|
|
||||||
import com.nijikokun.bukkit.Permissions.Permissions;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stargate - A portal plugin for Bukkit
|
* Stargate - A portal plugin for Bukkit
|
||||||
* Copyright (C) 2011 Shaun (sturmeh)
|
* Copyright (C) 2011 Shaun (sturmeh)
|
||||||
@ -83,9 +80,6 @@ import com.nijikokun.bukkit.Permissions.Permissions;
|
|||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public class Stargate extends JavaPlugin {
|
public class Stargate extends JavaPlugin {
|
||||||
// Permissions
|
|
||||||
private static Permissions permissions = null;
|
|
||||||
|
|
||||||
public static Logger log;
|
public static Logger log;
|
||||||
private FileConfiguration newConfig;
|
private FileConfiguration newConfig;
|
||||||
private PluginManager pm;
|
private PluginManager pm;
|
||||||
@ -169,12 +163,7 @@ public class Stargate extends JavaPlugin {
|
|||||||
this.migrate();
|
this.migrate();
|
||||||
this.reloadGates();
|
this.reloadGates();
|
||||||
|
|
||||||
// Check to see if iConomy/Permissions is loaded yet.
|
// Check to see if iConomy 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;
|
|
||||||
}
|
|
||||||
if (iConomyHandler.setupeConomy(pm)) {
|
if (iConomyHandler.setupeConomy(pm)) {
|
||||||
if (iConomyHandler.register != null)
|
if (iConomyHandler.register != null)
|
||||||
log.info("[Stargate] Register v" + iConomyHandler.register.getDescription().getVersion() + " found");
|
log.info("[Stargate] Register v" + iConomyHandler.register.getDescription().getVersion() + " found");
|
||||||
@ -381,16 +370,10 @@ public class Stargate extends JavaPlugin {
|
|||||||
* Check whether the player has the given permissions.
|
* Check whether the player has the given permissions.
|
||||||
*/
|
*/
|
||||||
public static boolean hasPerm(Player player, String perm) {
|
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)
|
if (permDebug)
|
||||||
Stargate.debug("hasPerm::SuperPerm(" + player.getName() + ")", perm + " => " + player.hasPermission(perm));
|
Stargate.debug("hasPerm::SuperPerm(" + player.getName() + ")", perm + " => " + player.hasPermission(perm));
|
||||||
return player.hasPermission(perm);
|
return player.hasPermission(perm);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check a deep permission, this will check to see if the permissions is defined for this use
|
* Check a deep permission, this will check to see if the permissions is defined for this use
|
||||||
@ -399,11 +382,6 @@ public class Stargate extends JavaPlugin {
|
|||||||
* Or the value of the node if it is
|
* Or the value of the node if it is
|
||||||
*/
|
*/
|
||||||
public static boolean hasPermDeep(Player player, String perm) {
|
public static boolean hasPermDeep(Player player, String perm) {
|
||||||
if (permissions != null) {
|
|
||||||
if (permDebug)
|
|
||||||
Stargate.debug("hasPermDeep::Permissions", perm + " => " + permissions.getHandler().has(player, perm));
|
|
||||||
return permissions.getHandler().has(player, perm);
|
|
||||||
} else {
|
|
||||||
if (!player.isPermissionSet(perm)) {
|
if (!player.isPermissionSet(perm)) {
|
||||||
if (permDebug)
|
if (permDebug)
|
||||||
Stargate.debug("hasPermDeep::SuperPerm", perm + " => true");
|
Stargate.debug("hasPermDeep::SuperPerm", perm + " => true");
|
||||||
@ -413,7 +391,6 @@ public class Stargate extends JavaPlugin {
|
|||||||
Stargate.debug("hasPermDeep::SuperPerms", perm + " => " + player.hasPermission(perm));
|
Stargate.debug("hasPermDeep::SuperPerms", perm + " => " + player.hasPermission(perm));
|
||||||
return player.hasPermission(perm);
|
return player.hasPermission(perm);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check whether player can teleport to dest world
|
* Check whether player can teleport to dest world
|
||||||
@ -1303,16 +1280,6 @@ public class Stargate extends JavaPlugin {
|
|||||||
if (iConomyHandler.setupVault(event.getPlugin())) {
|
if (iConomyHandler.setupVault(event.getPlugin())) {
|
||||||
log.info("[Stargate] Vault v" + iConomyHandler.vault.getDescription().getVersion() + " found");
|
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
|
@EventHandler
|
||||||
@ -1320,10 +1287,6 @@ public class Stargate extends JavaPlugin {
|
|||||||
if (iConomyHandler.checkLost(event.getPlugin())) {
|
if (iConomyHandler.checkLost(event.getPlugin())) {
|
||||||
log.info("[Stargate] Register/Vault plugin lost.");
|
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
|
name: Stargate
|
||||||
main: net.TheDgtl.Stargate.Stargate
|
main: net.TheDgtl.Stargate.Stargate
|
||||||
version: 0.7.9.8
|
version: 0.7.9.9
|
||||||
description: Stargate mod for Bukkit
|
description: Stargate mod for Bukkit
|
||||||
author: Drakia
|
author: Drakia
|
||||||
website: http://www.thedgtl.net
|
website: http://www.thedgtl.net
|
||||||
|
Loading…
Reference in New Issue
Block a user