diff options
author | ElgarL <ElgarL@palmergames.com> | 2012-04-13 15:16:08 +0100 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2012-04-13 15:16:08 +0100 |
commit | 6f109286888a3f5431ba33a15c3d8509985065a3 (patch) | |
tree | 39cf40ec23972562a1801aa6441a3d8e1929f315 /EssentialsGroupManager/src/org | |
parent | 1170297ce90850ea2e5aff715282ebcd5cf20ace (diff) | |
download | Essentials-6f109286888a3f5431ba33a15c3d8509985065a3.tar Essentials-6f109286888a3f5431ba33a15c3d8509985065a3.tar.gz Essentials-6f109286888a3f5431ba33a15c3d8509985065a3.tar.lz Essentials-6f109286888a3f5431ba33a15c3d8509985065a3.tar.xz Essentials-6f109286888a3f5431ba33a15c3d8509985065a3.zip |
Finally remove all deprecated methods.
Diffstat (limited to 'EssentialsGroupManager/src/org')
5 files changed, 5 insertions, 178 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java index 747056c04..df46b70d0 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java @@ -12,7 +12,6 @@ import org.anjocaido.groupmanager.data.Variables; import org.anjocaido.groupmanager.data.User; import org.anjocaido.groupmanager.data.Group; import org.anjocaido.groupmanager.dataholder.OverloadedWorldHolder; -import org.anjocaido.groupmanager.dataholder.WorldDataHolder; import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -295,66 +294,12 @@ public class GroupManager extends JavaPlugin { } } - /** - * Use the WorldsHolder saveChanges directly instead Saves the data on file - */ - @Deprecated - public void commit() { - - if (worldsHolder != null) { - worldsHolder.saveChanges(); - } - } - - /** - * Use worlds holder to reload a specific world Reloads the data - */ - @Deprecated - public void reload() { - - worldsHolder.reloadAll(); - } - public WorldsHolder getWorldsHolder() { return worldsHolder; } /** - * The handler in the interface created by AnjoCaido - * - * @return AnjoPermissionsHandler - */ - @Deprecated - public AnjoPermissionsHandler getPermissionHandler() { - - return worldsHolder.getDefaultWorld().getPermissionsHandler(); - } - - /** - * A simple interface, for ones that don't want to mess with overloading. - * Yet it is affected by overloading. But seamless. - * - * @return the dataholder with all information - */ - @Deprecated - public WorldDataHolder getData() { - - return worldsHolder.getDefaultWorld(); - } - - /** - * Use this if you want to play with overloading. - * - * @return a dataholder with overloading interface - */ - @Deprecated - public OverloadedWorldHolder getOverloadedClassData() { - - return worldsHolder.getDefaultWorld(); - } - - /** * Called when a command registered by this plugin is received. * * @param sender diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java index 25b3cb3fe..c10658fb0 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/data/User.java @@ -108,19 +108,6 @@ public class User extends DataUnit implements Cloneable { return group; } - /** - * @param group - * the group to set - */ - @Deprecated - public void setGroup(String group) { - - this.group = group; - flagAsChanged(); - if (GroupManager.isLoaded()) - if (!GroupManager.BukkitPermissions.isPlayer_join()) - GroupManager.BukkitPermissions.updatePlayer(getBukkitPlayer()); - } /** * @param group diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/OverloadedWorldHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/OverloadedWorldHolder.java index c8a3eb3ae..84561b6e5 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/OverloadedWorldHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/OverloadedWorldHolder.java @@ -30,7 +30,6 @@ public class OverloadedWorldHolder extends WorldDataHolder { super(ph.getName()); this.setGroupsFile(ph.getGroupsFile()); this.setUsersFile(ph.getUsersFile()); - //this.setDefaultGroup(ph.getDefaultGroup()); this.groups = ph.groups; this.users = ph.users; } diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java index ebacfdfac..37d0a8430 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java @@ -46,7 +46,6 @@ public class WorldsHolder { private Map<String, String> mirrorsGroup = new HashMap<String, String>(); private Map<String, String> mirrorsUser = new HashMap<String, String>(); - //private OverloadedWorldHolder defaultWorld; private String serverDefaultWorldName; private GroupManager plugin; private File worldsFolder; diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java index 2f64e4d99..efad11df4 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/AnjoPermissionsHandler.java @@ -16,7 +16,6 @@ import org.anjocaido.groupmanager.data.Group; import org.anjocaido.groupmanager.dataholder.WorldDataHolder; import org.anjocaido.groupmanager.data.User; import org.anjocaido.groupmanager.utils.PermissionCheckResult; -import org.anjocaido.groupmanager.utils.PermissionCheckResult.Type; import org.bukkit.entity.Player; /** @@ -27,7 +26,7 @@ import org.bukkit.entity.Player; * * It holds permissions only for one single world. * - * @author gabrielcouto + * @author gabrielcouto, ElgarL */ public class AnjoPermissionsHandler extends PermissionsReaderInterface { @@ -825,34 +824,13 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface { } /** - * Verifies if a given group has a variable. Including it's inheritance. - * - * it redirects to the other method now. This one was deprecated, and will - * be gone in a future release. - * - * @param start - * @param variable - * @param alreadyChecked - * @return returns the closest inherited group with the variable. - * @deprecated use now nextGroupWithVariable(Group start, String - * targetVariable) - */ - @Deprecated - public Group nextGroupWithVariable(Group start, String variable, List<Group> alreadyChecked) { - - return nextGroupWithVariable(start, variable); - } - - /** * Returns the next group, including inheritance, which contains that * variable name. * * It does Breadth-first search * - * @param start - * the starting group to look for - * @param targetVariable - * the variable name + * @param start the starting group to look for + * @param targetVariable the variable name * @return The group if found. Null if not. */ public Group nextGroupWithVariable(Group start, String targetVariable) { @@ -880,37 +858,14 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface { return null; } - /** - * Check if given group inherits another group. - * - * redirected to the other method. this is deprecated now. and will be gone - * in the future releases. - * - * @param start - * The group to start the search. - * @param askedGroup - * Name of the group you're looking for - * @param alreadyChecked - * groups to ignore(pass null on it, please) - * @return true if it inherits the group. - * @deprecated prefer using hasGroupInInheritance(Group start, String - * askedGroup) - */ - @Deprecated - public boolean searchGroupInInheritance(Group start, String askedGroup, List<Group> alreadyChecked) { - - return hasGroupInInheritance(start, askedGroup); - } /** * Check if given group inherits another group. * * It does Breadth-first search * - * @param start - * The group to start the search. - * @param askedGroup - * Name of the group you're looking for + * @param start The group to start the search. + * @param askedGroup Name of the group you're looking for * @return true if it inherits the group. */ public boolean hasGroupInInheritance(Group start, String askedGroup) { @@ -939,26 +894,6 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface { } /** - * Check if the group has given permission. Including it's inheritance - * - * @param start - * @param permission - * @param alreadyChecked - * @return true if PermissionCheckResult is EXCEPTION or FOUND - * @deprecated use the other checkGroupPermissionWithInheritance for - * everything - */ - @Deprecated - public boolean checkGroupPermissionWithInheritance(Group start, String permission, List<Group> alreadyChecked) { - - PermissionCheckResult result = checkGroupPermissionWithInheritance(start, permission); - if (result.resultType.equals(Type.EXCEPTION) || result.resultType.equals(Type.FOUND)) { - return true; - } - return false; - } - - /** * Returns the result of permission check. Including inheritance. If found * anything, the PermissionCheckResult that retuns will include the Group * name, and the result type. Result types will be EXCEPTION, NEGATION, @@ -1003,44 +938,6 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface { } /** - * It uses checkGroupPermissionWithInheritance and cast the owner to Group - * type if result type was EXCEPTION or FOUND. - * - * @param start - * @param permission - * @param alreadyChecked - * @return the group that passed on test. null if no group passed. - * @deprecated use checkGroupPermissionWithInheritance for everything now. - */ - @Deprecated - public Group nextGroupWithPermission(Group start, String permission, List<Group> alreadyChecked) { - - PermissionCheckResult result = checkGroupPermissionWithInheritance(start, permission); - if (result.resultType.equals(Type.EXCEPTION) || result.resultType.equals(Type.FOUND)) { - return (Group) checkGroupPermissionWithInheritance(start, permission).owner; - } - return null; - } - - /** - * Return whole list of names of groups in a inheritance chain. Including a - * starting group. - * - * it now redirects to the other method. but get away from this one, it will - * disappear in a future release. - * - * @param start - * @param alreadyChecked - * @return the group that passed on test. null if no group passed. - * @deprecated use the other method with same name, instead - */ - @Deprecated - public ArrayList<String> listAllGroupsInherited(Group start, ArrayList<String> alreadyChecked) { - - return listAllGroupsInherited(start); - } - - /** * Return whole list of names of groups in a inheritance chain. Including a * starting group. * |