From cb21bc4d7a67f0974c2773fdd0f5376f177c068e Mon Sep 17 00:00:00 2001 From: Zenexer Date: Wed, 30 Mar 2011 04:03:21 +0000 Subject: 2.1 prerelease, part 2 of 3 git-svn-id: https://svn.java.net/svn/essentials~svn/trunk2.1@1015 e251c2fe-e539-e718-e476-b85c1f46cddb --- EssentialsGroupBridge/build.xml | 74 ++ EssentialsGroupBridge/nbproject/build-impl.xml | 1047 ++++++++++++++++++++ .../nbproject/genfiles.properties | 8 + .../nbproject/private/private.properties | 1 + EssentialsGroupBridge/nbproject/project.properties | 78 ++ EssentialsGroupBridge/nbproject/project.xml | 25 + .../src/com/nijiko/Messaging.class | Bin 0 -> 2604 bytes .../src/com/nijiko/Misc$string.class | Bin 0 -> 982 bytes EssentialsGroupBridge/src/com/nijiko/Misc.class | Bin 0 -> 3980 bytes .../configuration/ConfigurationHandler.class | Bin 0 -> 788 bytes .../configuration/DefaultConfiguration.class | Bin 0 -> 435 bytes .../src/com/nijiko/database/Wrapper$Type.class | Bin 0 -> 1107 bytes .../src/com/nijiko/database/Wrapper.class | Bin 0 -> 5428 bytes .../src/com/nijiko/permissions/Control.class | Bin 0 -> 27337 bytes .../com/nijiko/permissions/PermissionHandler.class | Bin 0 -> 3198 bytes .../nijikokun/bukkit/Permissions/Permissions.java | 102 ++ .../permissions/NijikoPermissionsProxy.java | 428 ++++++++ EssentialsGroupBridge/src/plugin.yml | 3 + 18 files changed, 1766 insertions(+) create mode 100644 EssentialsGroupBridge/build.xml create mode 100644 EssentialsGroupBridge/nbproject/build-impl.xml create mode 100644 EssentialsGroupBridge/nbproject/genfiles.properties create mode 100644 EssentialsGroupBridge/nbproject/private/private.properties create mode 100644 EssentialsGroupBridge/nbproject/project.properties create mode 100644 EssentialsGroupBridge/nbproject/project.xml create mode 100644 EssentialsGroupBridge/src/com/nijiko/Messaging.class create mode 100644 EssentialsGroupBridge/src/com/nijiko/Misc$string.class create mode 100644 EssentialsGroupBridge/src/com/nijiko/Misc.class create mode 100644 EssentialsGroupBridge/src/com/nijiko/configuration/ConfigurationHandler.class create mode 100644 EssentialsGroupBridge/src/com/nijiko/configuration/DefaultConfiguration.class create mode 100644 EssentialsGroupBridge/src/com/nijiko/database/Wrapper$Type.class create mode 100644 EssentialsGroupBridge/src/com/nijiko/database/Wrapper.class create mode 100644 EssentialsGroupBridge/src/com/nijiko/permissions/Control.class create mode 100644 EssentialsGroupBridge/src/com/nijiko/permissions/PermissionHandler.class create mode 100644 EssentialsGroupBridge/src/com/nijikokun/bukkit/Permissions/Permissions.java create mode 100644 EssentialsGroupBridge/src/org/anjocaido/groupmanager/permissions/NijikoPermissionsProxy.java create mode 100644 EssentialsGroupBridge/src/plugin.yml (limited to 'EssentialsGroupBridge') diff --git a/EssentialsGroupBridge/build.xml b/EssentialsGroupBridge/build.xml new file mode 100644 index 000000000..94dd95861 --- /dev/null +++ b/EssentialsGroupBridge/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + Builds, tests, and runs the project EssentialsGroupBridge. + + + diff --git a/EssentialsGroupBridge/nbproject/build-impl.xml b/EssentialsGroupBridge/nbproject/build-impl.xml new file mode 100644 index 000000000..30d2e9bf6 --- /dev/null +++ b/EssentialsGroupBridge/nbproject/build-impl.xml @@ -0,0 +1,1047 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + + + + + + + + Must select one file in the IDE or set profile.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/EssentialsGroupBridge/nbproject/genfiles.properties b/EssentialsGroupBridge/nbproject/genfiles.properties new file mode 100644 index 000000000..194afdd81 --- /dev/null +++ b/EssentialsGroupBridge/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=475c8f4d +build.xml.script.CRC32=674d9b15 +build.xml.stylesheet.CRC32=28e38971@1.38.2.45 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=475c8f4d +nbproject/build-impl.xml.script.CRC32=5fe43282 +nbproject/build-impl.xml.stylesheet.CRC32=19debb58@1.42.1.45 diff --git a/EssentialsGroupBridge/nbproject/private/private.properties b/EssentialsGroupBridge/nbproject/private/private.properties new file mode 100644 index 000000000..94183418a --- /dev/null +++ b/EssentialsGroupBridge/nbproject/private/private.properties @@ -0,0 +1 @@ +user.properties.file=C:\\Users\\Paul\\.netbeans\\7.0beta2\\build.properties diff --git a/EssentialsGroupBridge/nbproject/project.properties b/EssentialsGroupBridge/nbproject/project.properties new file mode 100644 index 000000000..0649cc58f --- /dev/null +++ b/EssentialsGroupBridge/nbproject/project.properties @@ -0,0 +1,78 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +application.title=EssentialsGroupBridge +application.vendor=gabrielcouto +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/EssentialsGroupBridge.jar +dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath= +excludes= +file.reference.craftbukkit-0.0.1-SNAPSHOT.jar=..\\lib\\craftbukkit-0.0.1-SNAPSHOT.jar +file.reference.Permissions.jar=..\\lib\\Permissions.jar +includes=** +jar.compress=false +javac.classpath=\ + ${reference.EssentialsGroupManager.jar}:\ + ${file.reference.craftbukkit-0.0.1-SNAPSHOT.jar}:\ + ${file.reference.Permissions.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.6 +javac.target=1.6 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class= +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +platform.active=default_platform +project.EssentialsGroupManager=../EssentialsGroupManager +reference.EssentialsGroupManager.jar=${project.EssentialsGroupManager}/dist/EssentialsGroupManager.jar +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value +# or test-sys-prop.name=value to set system properties for unit tests): +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/EssentialsGroupBridge/nbproject/project.xml b/EssentialsGroupBridge/nbproject/project.xml new file mode 100644 index 000000000..f7234f600 --- /dev/null +++ b/EssentialsGroupBridge/nbproject/project.xml @@ -0,0 +1,25 @@ + + + org.netbeans.modules.java.j2seproject + + + EssentialsGroupBridge + + + + + + + + + + EssentialsGroupManager + jar + + jar + clean + jar + + + + diff --git a/EssentialsGroupBridge/src/com/nijiko/Messaging.class b/EssentialsGroupBridge/src/com/nijiko/Messaging.class new file mode 100644 index 000000000..f563d0085 Binary files /dev/null and b/EssentialsGroupBridge/src/com/nijiko/Messaging.class differ diff --git a/EssentialsGroupBridge/src/com/nijiko/Misc$string.class b/EssentialsGroupBridge/src/com/nijiko/Misc$string.class new file mode 100644 index 000000000..124b535c3 Binary files /dev/null and b/EssentialsGroupBridge/src/com/nijiko/Misc$string.class differ diff --git a/EssentialsGroupBridge/src/com/nijiko/Misc.class b/EssentialsGroupBridge/src/com/nijiko/Misc.class new file mode 100644 index 000000000..4330a303f Binary files /dev/null and b/EssentialsGroupBridge/src/com/nijiko/Misc.class differ diff --git a/EssentialsGroupBridge/src/com/nijiko/configuration/ConfigurationHandler.class b/EssentialsGroupBridge/src/com/nijiko/configuration/ConfigurationHandler.class new file mode 100644 index 000000000..97c1fb35b Binary files /dev/null and b/EssentialsGroupBridge/src/com/nijiko/configuration/ConfigurationHandler.class differ diff --git a/EssentialsGroupBridge/src/com/nijiko/configuration/DefaultConfiguration.class b/EssentialsGroupBridge/src/com/nijiko/configuration/DefaultConfiguration.class new file mode 100644 index 000000000..06d9ee23b Binary files /dev/null and b/EssentialsGroupBridge/src/com/nijiko/configuration/DefaultConfiguration.class differ diff --git a/EssentialsGroupBridge/src/com/nijiko/database/Wrapper$Type.class b/EssentialsGroupBridge/src/com/nijiko/database/Wrapper$Type.class new file mode 100644 index 000000000..173279ddf Binary files /dev/null and b/EssentialsGroupBridge/src/com/nijiko/database/Wrapper$Type.class differ diff --git a/EssentialsGroupBridge/src/com/nijiko/database/Wrapper.class b/EssentialsGroupBridge/src/com/nijiko/database/Wrapper.class new file mode 100644 index 000000000..e1b59f9e1 Binary files /dev/null and b/EssentialsGroupBridge/src/com/nijiko/database/Wrapper.class differ diff --git a/EssentialsGroupBridge/src/com/nijiko/permissions/Control.class b/EssentialsGroupBridge/src/com/nijiko/permissions/Control.class new file mode 100644 index 000000000..d0d8845ac Binary files /dev/null and b/EssentialsGroupBridge/src/com/nijiko/permissions/Control.class differ diff --git a/EssentialsGroupBridge/src/com/nijiko/permissions/PermissionHandler.class b/EssentialsGroupBridge/src/com/nijiko/permissions/PermissionHandler.class new file mode 100644 index 000000000..a23287a5b Binary files /dev/null and b/EssentialsGroupBridge/src/com/nijiko/permissions/PermissionHandler.class differ diff --git a/EssentialsGroupBridge/src/com/nijikokun/bukkit/Permissions/Permissions.java b/EssentialsGroupBridge/src/com/nijikokun/bukkit/Permissions/Permissions.java new file mode 100644 index 000000000..bca7a89ed --- /dev/null +++ b/EssentialsGroupBridge/src/com/nijikokun/bukkit/Permissions/Permissions.java @@ -0,0 +1,102 @@ +package com.nijikokun.bukkit.Permissions; + +import com.nijiko.Misc; +import com.nijiko.configuration.DefaultConfiguration; +import com.nijiko.permissions.PermissionHandler; +import java.util.logging.Logger; +import org.anjocaido.groupmanager.GroupManager; +import org.anjocaido.groupmanager.permissions.NijikoPermissionsProxy; +import org.bukkit.Server; +import org.bukkit.event.player.PlayerChatEvent; +import org.bukkit.event.player.PlayerListener; +import org.bukkit.plugin.Plugin; +import org.bukkit.plugin.PluginDescriptionFile; +import org.bukkit.plugin.java.JavaPlugin; + +public class Permissions extends JavaPlugin { + + private class Listener extends PlayerListener { + + private Permissions plugin; + + public Listener(Permissions plugin) { + //compiled code + throw new RuntimeException("Compiled Code"); + } + + public void onPlayerCommand(PlayerChatEvent event) { + //compiled code + throw new RuntimeException("Compiled Code"); + } + } + public static final Logger log = Logger.getLogger("Fake Permissions"); + public static String name = "Permissions"; + public static String codename = "Hacked Permissions by AnjoCaido"; + public static String version = "2.0"; + public static PermissionHandler Security = null; + public static Misc Misc = new Misc(); + public static Server Server; + private Listener Listener = null; + private DefaultConfiguration config = null; + private GroupManager groupManager; + + @Override + public void onDisable() { + //compiled code + //throw new RuntimeException("Compiled Code"); + // EXAMPLE: Custom code, here we just output some info so we can check all is well + PluginDescriptionFile pdfFile = this.getDescription(); + System.out.println("Fake " + pdfFile.getName() + " version " + pdfFile.getVersion() + " is disabled!"); + } + + @Override + public void onEnable() { + Server = this.getServer(); + PluginDescriptionFile pdfFile = this.getDescription(); + + if (Security == null) {//make sure we have only one instance + Plugin p = (Plugin)(this.getServer() == null ? new GroupManager() : this.getServer().getPluginManager().getPlugin("GroupManager")); + if (p != null) { + if (!p.isEnabled()) { + if (this.getServer() == null) { + p.onEnable(); + } else { + this.getServer().getPluginManager().enablePlugin(p); + } + } + GroupManager gm = (GroupManager) p; + groupManager = gm; + Security = new NijikoPermissionsProxy(gm); + } else { + System.err.println("OOOPS! Fake " + pdfFile.getName() + " version " + pdfFile.getVersion() + " couldn't find GroupManager!"); + this.getPluginLoader().disablePlugin(this); + } + } + // EXAMPLE: Custom code, here we just output some info so we can check all is well + if (pdfFile != null) + System.out.println("Fake " + pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!"); + } + + private void registerEvents() { + //compiled code + //throw new RuntimeException("Compiled Code"); + } + + public PermissionHandler getHandler() { + //compiled code + //throw new RuntimeException("Compiled Code"); + //System.out.println("Alguem chamou o handler"); + checkEnable(); + return Security; + } + + public void setupPermissions() { + checkEnable(); + } + + private void checkEnable() { + if (!this.isEnabled() && Security == null && this.getServer() != null) { + this.getServer().getPluginManager().enablePlugin(this); + } + } +} diff --git a/EssentialsGroupBridge/src/org/anjocaido/groupmanager/permissions/NijikoPermissionsProxy.java b/EssentialsGroupBridge/src/org/anjocaido/groupmanager/permissions/NijikoPermissionsProxy.java new file mode 100644 index 000000000..18da0cd56 --- /dev/null +++ b/EssentialsGroupBridge/src/org/anjocaido/groupmanager/permissions/NijikoPermissionsProxy.java @@ -0,0 +1,428 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package org.anjocaido.groupmanager.permissions; + +import com.nijiko.permissions.Control; +import java.io.File; +import java.util.Map; +import org.anjocaido.groupmanager.GroupManager; +import org.bukkit.entity.Player; +import org.bukkit.util.config.Configuration; + +/** + * Everything here maintains the model created by Nijikokun + * + * But implemented to use GroupManager system. Which provides instant changes, + * without file access. + * + * @author gabrielcouto + */ +public class NijikoPermissionsProxy extends Control { + GroupManager plugin; + public NijikoPermissionsProxy(GroupManager plugin){ + super(null); + this.plugin = plugin; + } + + @Override + public void addGroupPermission(String world, String group, String node) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void removeGroupPermission(String world, String group, String node) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void addGroupInfo(String world, String group, String node, Object data) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void removeGroupInfo(String world, String group, String node) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void addUserPermission(String world, String user, String node) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void removeUserPermission(String world, String user, String node) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void addUserInfo(String world, String user, String node, Object data) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void removeUserInfo(String world, String user, String node) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void removeUserInfo(String user, String node) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void addGroupPermission(String group, String node) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void removeGroupPermission(String group, String node) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void addGroupInfo(String group, String node, Object data) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void removeGroupInfo(String group, String node) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void addUserPermission(String user, String node) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void removeUserPermission(String user, String node) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void addUserInfo(String user, String node, Object data) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDefaultWorld(String world) { + //throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setDirectory(File directory) { + //throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean loadWorld(String world) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void forceLoadWorld(String world) { + //throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean checkWorld(String world) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void load() { + //throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void load(String world, Configuration config) { + //throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void reload() { + plugin.getWorldsHolder().reloadAll(); + //throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean reload(String world) { + plugin.getWorldsHolder().reloadWorld(world); + return true; + } + + @Override + public void setCache(Map Cache) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCache(String world, Map Cache) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCacheItem(String player, String permission, boolean data) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void setCacheItem(String world, String player, String permission, boolean data) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Map getCache() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Map getCache(String world) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getCacheItem(String player, String permission) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean getCacheItem(String world, String player, String permission) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void removeCachedItem(String player, String permission) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void removeCachedItem(String world, String player, String permission) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void clearCache() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void clearCache(String world) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void clearAllCache() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean has(Player player, String permission) { + //throw new UnsupportedOperationException("Not supported yet."); + return permission(player, permission); + } + + @Override + public boolean permission(Player player, String permission) { + //throw new UnsupportedOperationException("Not supported yet."); + if(permission==null || permission.equals("")){ + return false; + } + if(player==null){ + GroupManager.logger.severe("A plugin is asking permission '"+permission+"' for a null player... Which plugin does that? Bastards!"); + return false; + } + if(player.getWorld()==null){ + GroupManager.logger.warning("The player "+player.getName()+" has a null world? Treating as default world!"); + return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().has(player, permission); + } + return plugin.getWorldsHolder().getWorldData(player.getWorld().getName()).getPermissionsHandler().has(player, permission); + } + + @Override + public String getGroup(String world, String name) { + return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getGroup(name); + } + + @Deprecated + @Override + public String getGroup(String name) { + return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getGroup(name); + } + + @Override + public String[] getGroups(String world, String name) { + return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getGroups(name); + } + + @Deprecated + @Override + public String[] getGroups(String name) { + return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getGroups(name); + } + + @Override + public boolean inGroup(String world, String name, String group) { + return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().inGroup(name,group); + } + + @Deprecated + @Override + public boolean inGroup(String name, String group) { + return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().inGroup(name,group); + } + + @Override + public String getGroupPrefix(String world, String group) { + return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getGroupPrefix(group); + } + + @Override + public String getGroupPrefix(String group) { + return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getGroupPrefix(group); + } + + @Override + public String getGroupSuffix(String world, String group) { + return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getGroupSuffix(group); + } + + @Override + public String getGroupSuffix(String group) { + return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getGroupSuffix(group); + } + + @Override + public boolean canGroupBuild(String world, String group) { + return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().canGroupBuild(group); + } + + @Deprecated + @Override + public boolean canGroupBuild(String group) { + return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().canGroupBuild(group); + } + + @Override + public String getGroupPermissionString(String world, String group, String permission) { + return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getGroupPermissionString(group,permission); + } + + @Override + public String getGroupPermissionString(String group, String permission) { + return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getGroupPermissionString(group,permission); + } + + @Override + public int getGroupPermissionInteger(String world, String group, String permission) { + return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getGroupPermissionInteger(group,permission); + } + + @Override + public int getGroupPermissionInteger(String group, String permission) { + return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getGroupPermissionInteger(group,permission); + } + + @Override + public boolean getGroupPermissionBoolean(String world, String group, String permission) { + return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getGroupPermissionBoolean(group,permission); + } + + @Override + public boolean getGroupPermissionBoolean(String group, String permission) { + return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getGroupPermissionBoolean(group,permission); + } + + @Override + public double getGroupPermissionDouble(String world, String group, String permission) { + return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getGroupPermissionDouble(group,permission); + } + + @Override + public double getGroupPermissionDouble(String group, String permission) { + return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getGroupPermissionDouble(group,permission); + } + + @Override + public String getUserPermissionString(String world, String name, String permission) { + return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getUserPermissionString(name,permission); + } + + @Override + public String getUserPermissionString(String name, String permission) { + return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getUserPermissionString(name,permission); + } + + @Override + public int getUserPermissionInteger(String world, String name, String permission) { + return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getUserPermissionInteger(name,permission); + } + + @Override + public int getUserPermissionInteger(String name, String permission) { + return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getUserPermissionInteger(name,permission); + } + + @Override + public boolean getUserPermissionBoolean(String world, String name, String permission) { + return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getUserPermissionBoolean(name,permission); + } + + @Override + public boolean getUserPermissionBoolean(String name, String permission) { + return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getUserPermissionBoolean(name,permission); + } + + @Override + public double getUserPermissionDouble(String world, String name, String permission) { + return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getUserPermissionDouble(name,permission); + } + + @Override + public double getUserPermissionDouble(String name, String permission) { + return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getUserPermissionDouble(name,permission); + } + + @Override + public String getPermissionString(String world, String name, String permission) { + return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getPermissionString(name,permission); + } + + @Override + public String getPermissionString(String name, String permission) { + return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getPermissionString(name,permission); + } + + @Override + public int getPermissionInteger(String world, String name, String permission) { + return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getPermissionInteger(name,permission); + } + + @Override + public int getPermissionInteger(String name, String permission) { + return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getPermissionInteger(name,permission); + } + + @Override + public boolean getPermissionBoolean(String world, String name, String permission) { + return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getPermissionBoolean(name,permission); + } + + @Override + public boolean getPermissionBoolean(String name, String permission) { + return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getPermissionBoolean(name,permission); + } + + @Override + public double getPermissionDouble(String world, String name, String permission) { + return plugin.getWorldsHolder().getWorldData(world).getPermissionsHandler().getPermissionDouble(name,permission); + } + + @Override + public double getPermissionDouble(String name, String permission) { + return plugin.getWorldsHolder().getDefaultWorld().getPermissionsHandler().getPermissionDouble(name,permission); + } + +} diff --git a/EssentialsGroupBridge/src/plugin.yml b/EssentialsGroupBridge/src/plugin.yml new file mode 100644 index 000000000..af93ee4a0 --- /dev/null +++ b/EssentialsGroupBridge/src/plugin.yml @@ -0,0 +1,3 @@ +name: Permissions +version: 2.5.1 +main: com.nijikokun.bukkit.Permissions.Permissions -- cgit v1.2.3