diff options
author | ElgarL <ElgarL@palmergames.com> | 2012-04-13 14:57:23 +0100 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2012-04-13 14:57:23 +0100 |
commit | 59b204d4100d69c50f02dcba5db3a3673558563c (patch) | |
tree | 73e078c47a2ecee53262af7fe53b452d6ea9210f | |
parent | b838cde64898c2bc22155fe07470db6b7f6d96fd (diff) | |
download | Essentials-59b204d4100d69c50f02dcba5db3a3673558563c.tar Essentials-59b204d4100d69c50f02dcba5db3a3673558563c.tar.gz Essentials-59b204d4100d69c50f02dcba5db3a3673558563c.tar.lz Essentials-59b204d4100d69c50f02dcba5db3a3673558563c.tar.xz Essentials-59b204d4100d69c50f02dcba5db3a3673558563c.zip |
Stop using our own deprecated methods as we tell others to do.
-rw-r--r-- | EssentialsGroupManager/src/Changelog.txt | 3 | ||||
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java | 18 |
2 files changed, 10 insertions, 11 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index 5549fef17..790821fa1 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -177,4 +177,5 @@ v 2.0: - Expand GlobalGroups.yml and groups.yml to cover the VanishNoPacket plugin. Demonstrating how to negate and add nodes when using the '*' permission with inheritance.
- Fix silly nested throw/catch statements. Errors are now correctly generated when reading yml's.
- Unregister the worldsHolder as a service on a reload/shutdown instead of the whole plugin.
- - Update all code formatting to use tabs for indentation.
\ No newline at end of file + - Update all code formatting to use tabs for indentation.
+ - Stop using our own deprecated methods as we tell others to do.
\ No newline at end of file diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java index b75c2242e..c9c8fcbd5 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java @@ -29,7 +29,6 @@ import org.anjocaido.groupmanager.dataholder.worlds.WorldsHolder; import org.anjocaido.groupmanager.events.GMSystemEvent; import org.anjocaido.groupmanager.events.GMWorldListener; import org.anjocaido.groupmanager.events.GroupManagerEventHandler; -import org.anjocaido.groupmanager.events.GMGroupEvent.Action; import org.anjocaido.groupmanager.utils.GMLoggerHandler; import org.anjocaido.groupmanager.utils.PermissionCheckResult; import org.anjocaido.groupmanager.utils.Tasks; @@ -40,15 +39,14 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.command.ConsoleCommandSender; import org.bukkit.entity.Player; -import org.bukkit.event.Event; import org.bukkit.plugin.PluginDescriptionFile; import org.bukkit.plugin.ServicePriority; import org.bukkit.plugin.java.JavaPlugin; -@SuppressWarnings("unused") + /** * - * @author gabrielcouto + * @author gabrielcouto, ElgarL */ public class GroupManager extends JavaPlugin { @@ -79,7 +77,6 @@ public class GroupManager extends JavaPlugin { this.validateOnlinePlayer = validateOnlinePlayer; } - private boolean isReady = false; private static boolean isLoaded = false; protected GMConfiguration config; @@ -111,7 +108,8 @@ public class GroupManager extends JavaPlugin { } } - WorldEvents = null; + if (WorldEvents != null) + WorldEvents = null; // Remove all attachments before clearing if (BukkitPermissions != null) { @@ -366,7 +364,7 @@ public class GroupManager extends JavaPlugin { * @param cmd * @param args */ - @SuppressWarnings({ "deprecation" }) + //@SuppressWarnings({ "deprecation" }) @Override public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) { @@ -1131,7 +1129,7 @@ public class GroupManager extends JavaPlugin { } // Validating permission - if (permissionHandler.searchGroupInInheritance(auxGroup, auxGroup2.getName(), null)) { + if (permissionHandler.hasGroupInInheritance(auxGroup, auxGroup2.getName())) { sender.sendMessage(ChatColor.RED + "Group " + auxGroup.getName() + " already inherits " + auxGroup2.getName() + " (might not be directly)"); return false; } @@ -1170,7 +1168,7 @@ public class GroupManager extends JavaPlugin { } // Validating permission - if (!permissionHandler.searchGroupInInheritance(auxGroup, auxGroup2.getName(), null)) { + if (!permissionHandler.hasGroupInInheritance(auxGroup, auxGroup2.getName())) { sender.sendMessage(ChatColor.RED + "Group " + auxGroup.getName() + " does not inherits " + auxGroup2.getName() + "."); return false; } @@ -1461,7 +1459,7 @@ public class GroupManager extends JavaPlugin { return false; } // Validating permission - auxGroup2 = permissionHandler.nextGroupWithVariable(auxGroup, args[1], null); + auxGroup2 = permissionHandler.nextGroupWithVariable(auxGroup, args[1]); if (auxGroup2 == null) { sender.sendMessage(ChatColor.RED + "The group doesn't have access to that variable!"); } |