diff options
author | snowleo <schneeleo@gmail.com> | 2011-09-17 13:19:47 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-09-17 13:19:47 +0200 |
commit | 1df79bc9f4e5dd378bbc3d18877a05d02f0d0ce9 (patch) | |
tree | dc9b043d5ea26854a23387ed0ef6a9f4d82e7a52 /EssentialsGroupBridge/src/com | |
parent | ab590af9272b4381e55a3061d07a83e917613401 (diff) | |
parent | 73b5fe971f1dc77c008373652c49efa53b86990e (diff) | |
download | Essentials-1df79bc9f4e5dd378bbc3d18877a05d02f0d0ce9.tar Essentials-1df79bc9f4e5dd378bbc3d18877a05d02f0d0ce9.tar.gz Essentials-1df79bc9f4e5dd378bbc3d18877a05d02f0d0ce9.tar.lz Essentials-1df79bc9f4e5dd378bbc3d18877a05d02f0d0ce9.tar.xz Essentials-1df79bc9f4e5dd378bbc3d18877a05d02f0d0ce9.zip |
GroupManager 1.1
Merge branch 'groupmanager'
Conflicts:
EssentialsGroupManager/src/plugin.yml
EssentialsGroupManager/src/users.yml
Diffstat (limited to 'EssentialsGroupBridge/src/com')
-rw-r--r-- | EssentialsGroupBridge/src/com/nijiko/Messaging.class | bin | 2604 -> 0 bytes | |||
-rw-r--r-- | EssentialsGroupBridge/src/com/nijiko/Misc$string.class | bin | 982 -> 0 bytes | |||
-rw-r--r-- | EssentialsGroupBridge/src/com/nijiko/Misc.class | bin | 3980 -> 0 bytes | |||
-rw-r--r-- | EssentialsGroupBridge/src/com/nijiko/configuration/ConfigurationHandler.class | bin | 788 -> 0 bytes | |||
-rw-r--r-- | EssentialsGroupBridge/src/com/nijiko/configuration/DefaultConfiguration.class | bin | 435 -> 0 bytes | |||
-rw-r--r-- | EssentialsGroupBridge/src/com/nijiko/database/Wrapper$Type.class | bin | 1107 -> 0 bytes | |||
-rw-r--r-- | EssentialsGroupBridge/src/com/nijiko/database/Wrapper.class | bin | 5428 -> 0 bytes | |||
-rw-r--r-- | EssentialsGroupBridge/src/com/nijiko/permissions/Control.class | bin | 27337 -> 0 bytes | |||
-rw-r--r-- | EssentialsGroupBridge/src/com/nijiko/permissions/PermissionHandler.class | bin | 3198 -> 0 bytes | |||
-rw-r--r-- | EssentialsGroupBridge/src/com/nijikokun/bukkit/Permissions/Permissions.java | 122 |
10 files changed, 38 insertions, 84 deletions
diff --git a/EssentialsGroupBridge/src/com/nijiko/Messaging.class b/EssentialsGroupBridge/src/com/nijiko/Messaging.class Binary files differdeleted file mode 100644 index f563d0085..000000000 --- a/EssentialsGroupBridge/src/com/nijiko/Messaging.class +++ /dev/null diff --git a/EssentialsGroupBridge/src/com/nijiko/Misc$string.class b/EssentialsGroupBridge/src/com/nijiko/Misc$string.class Binary files differdeleted file mode 100644 index 124b535c3..000000000 --- a/EssentialsGroupBridge/src/com/nijiko/Misc$string.class +++ /dev/null diff --git a/EssentialsGroupBridge/src/com/nijiko/Misc.class b/EssentialsGroupBridge/src/com/nijiko/Misc.class Binary files differdeleted file mode 100644 index 4330a303f..000000000 --- a/EssentialsGroupBridge/src/com/nijiko/Misc.class +++ /dev/null diff --git a/EssentialsGroupBridge/src/com/nijiko/configuration/ConfigurationHandler.class b/EssentialsGroupBridge/src/com/nijiko/configuration/ConfigurationHandler.class Binary files differdeleted file mode 100644 index 97c1fb35b..000000000 --- a/EssentialsGroupBridge/src/com/nijiko/configuration/ConfigurationHandler.class +++ /dev/null diff --git a/EssentialsGroupBridge/src/com/nijiko/configuration/DefaultConfiguration.class b/EssentialsGroupBridge/src/com/nijiko/configuration/DefaultConfiguration.class Binary files differdeleted file mode 100644 index 06d9ee23b..000000000 --- a/EssentialsGroupBridge/src/com/nijiko/configuration/DefaultConfiguration.class +++ /dev/null diff --git a/EssentialsGroupBridge/src/com/nijiko/database/Wrapper$Type.class b/EssentialsGroupBridge/src/com/nijiko/database/Wrapper$Type.class Binary files differdeleted file mode 100644 index 173279ddf..000000000 --- a/EssentialsGroupBridge/src/com/nijiko/database/Wrapper$Type.class +++ /dev/null diff --git a/EssentialsGroupBridge/src/com/nijiko/database/Wrapper.class b/EssentialsGroupBridge/src/com/nijiko/database/Wrapper.class Binary files differdeleted file mode 100644 index e1b59f9e1..000000000 --- a/EssentialsGroupBridge/src/com/nijiko/database/Wrapper.class +++ /dev/null diff --git a/EssentialsGroupBridge/src/com/nijiko/permissions/Control.class b/EssentialsGroupBridge/src/com/nijiko/permissions/Control.class Binary files differdeleted file mode 100644 index d0d8845ac..000000000 --- a/EssentialsGroupBridge/src/com/nijiko/permissions/Control.class +++ /dev/null diff --git a/EssentialsGroupBridge/src/com/nijiko/permissions/PermissionHandler.class b/EssentialsGroupBridge/src/com/nijiko/permissions/PermissionHandler.class Binary files differdeleted file mode 100644 index a23287a5b..000000000 --- a/EssentialsGroupBridge/src/com/nijiko/permissions/PermissionHandler.class +++ /dev/null diff --git a/EssentialsGroupBridge/src/com/nijikokun/bukkit/Permissions/Permissions.java b/EssentialsGroupBridge/src/com/nijikokun/bukkit/Permissions/Permissions.java index cf0d09a35..5d027cccc 100644 --- a/EssentialsGroupBridge/src/com/nijikokun/bukkit/Permissions/Permissions.java +++ b/EssentialsGroupBridge/src/com/nijikokun/bukkit/Permissions/Permissions.java @@ -1,16 +1,11 @@ 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.GroupManager; import org.anjocaido.groupmanager.permissions.NijikoPermissionsProxy; -import org.bukkit.Server; import org.bukkit.event.Event.Priority; import org.bukkit.event.Event.Type; -import org.bukkit.event.player.PlayerChatEvent; -import org.bukkit.event.player.PlayerListener; import org.bukkit.event.server.PluginEnableEvent; import org.bukkit.event.server.ServerListener; import org.bukkit.plugin.Plugin; @@ -19,110 +14,69 @@ 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 - Security = new NijikoPermissionsProxy(null); - } - - Plugin p = (this.getServer() == null) ? null : this.getServer().getPluginManager().getPlugin("GroupManager"); - if (p != null) { - if (p.isEnabled()) { - setGM(p); - } else { - if (this.getServer() != null) { - this.getServer().getPluginManager().registerEvent(Type.PLUGIN_ENABLE, new ServerListener() { + if (Security == null) { + //make sure we have only one instance + Security = new NijikoPermissionsProxy(null); + } + + Plugin p = (this.getServer() == null) ? null : this.getServer().getPluginManager().getPlugin("GroupManager"); + if (p != null) { + if (p.isEnabled()) { + setGM(p); + } else { + if (this.getServer() != null) { + this.getServer().getPluginManager().registerEvent(Type.PLUGIN_ENABLE, new ServerListener() { + + @Override + public void onPluginEnable(PluginEnableEvent event) { + if (event.getPlugin().getDescription().getName().equals("GroupManager")) { + Permissions.this.setGM(event.getPlugin()); + } + } + }, Priority.Normal, this); + } + } + } else { + System.err.println("OOOPS! Fake " + pdfFile.getName() + " version " + pdfFile.getVersion() + " couldn't find GroupManager!"); + this.getPluginLoader().disablePlugin(this); + } - @Override - public void onPluginEnable(PluginEnableEvent event) - { - if (event.getPlugin().getDescription().getName().equals("GroupManager")) { - Permissions.this.setGM(event.getPlugin()); - } - } - - }, Priority.Normal, this); - } - } - } 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!"); + if (pdfFile != null) { + System.out.println("Fake " + pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!"); + } } - private void registerEvents() { - //compiled code - //throw new RuntimeException("Compiled Code"); + private void setGM(final Plugin p) { + //GroupManager groupManager = (GroupManager) p; + ((NijikoPermissionsProxy) Security).setGM(p); } - - private void setGM(Plugin p) { - groupManager = (GroupManager)p; - ((NijikoPermissionsProxy)Security).setGM(p); - } public PermissionHandler getHandler() { - //compiled code - //throw new RuntimeException("Compiled Code"); - //System.out.println("Alguem chamou o handler"); - if (Security == null) - { - Security = new NijikoPermissionsProxy(null); - } - //checkEnable(); + if (Security == null) { + Security = new NijikoPermissionsProxy(null); + } return Security; } public void setupPermissions() { - if (Security == null) - { - Security = new NijikoPermissionsProxy(null); - } - //checkEnable(); - } - - private void checkEnable() { - if (!this.isEnabled() && Security == null && this.getServer() != null) { - this.getServer().getPluginManager().enablePlugin(this); + if (Security == null) { + Security = new NijikoPermissionsProxy(null); } } } |