+ * In order to register/provide it, you should use {@link IdentityEconomyWrapper#registerProviders()}
+ */
+public interface IdentityEconomy extends Economy {
+ /**
+ * Used to determine if IdentityEconomy was built through
+ * the EconomyWrapper as a LegacyEconomy.
+ * If false, method {@link #getAllRecords()} will not be work.
+ * This was made in order to support plugins which use older versions of VaultAPI/Vault.
+ * You can also use it / override it to disable previous mentioned methods!
+ *
+ * @return true if operation is supported
+ */
+ public boolean supportsAllRecordsOperation();
+
+ /**
+ * Used to determine if IdentityEconomy was built through
+ * the EconomyWrapper as a LegacyEconomy.
+ * If false, the method {@link #getAllOnline()} (UUID)} will not be work.
+ * This was made in order to support plugins which use older versions of VaultAPI/Vault.
+ * You can also use it / override it to disable previous mentioned methods!
+ *
+ * @return true if operation is supported
+ */
+ public boolean supportsAllOnlineOperation();
+
+ /**
+ * Used to determine if IdentityEconomy was built through
+ * the EconomyWrapper as a LegacyEconomy.
+ * If false, all operations must be done with players that
+ * are online/connected to the server in real time.
+ * If true, you should expect to call these operations
+ * asynchronously.
+ *
+ * @return true if operation is supported
+ */
+ public boolean supportsOfflineOperations();
+
+ /**
+ * Used to determine if IdentityEconomy was built through
+ * the EconomyWrapper as a LegacyEconomy.
+ * If false, you should expect UnsupportedOperationException
+ * being thrown when calling these methods.
+ *
+ * @return true if operation is supported
+ */
+ public boolean supportsUUIDOperations();
+
+ /*
+ * Account-related methods follow.
+ */
+
+ /**
+ * Attempts to create a account for the given uuid
+ *
+ * @param uuid associated with the account
+ * @param name associated with the account.
+ * @return if the account creation was successful
+ */
+ public boolean createAccount(UUID uuid, String name);
+
+ /**
+ * Attempts to create an account for the given UUID on the specified world
+ * IMPLEMENTATION SPECIFIC - if an economy plugin does not support this then
+ * false will always be returned.
+ *
+ * @param uuid associated with the account
+ * @param name associated with the account.
+ * @param worldName String name of the world
+ * @return if the account creation was successful
+ */
+ public boolean createAccount(UUID uuid, String name, String worldName);
+
+ /**
+ * Returns a map that represents all of the stored UUIDs which have accounts in the
+ * plugin (in the database, not memory), as well as their last-known-name. This is used for Vault's economy
+ * converter and should be given every account available.
+ * Needs IdentityEconomy#hasUUIDSupport() to be true.
+ *
+ * @return a {@link Map} composed of the accounts keyed by their UUID, along
+ * with their associated last-known-name.
+ */
+ public Map
+ * In order to register/provide it, you should use {@link MultiEconomyWrapper#registerProviders()}
+ * Inside this interface, we make use of the term "implementation" to refer to an actual currency.
+ * You should expect that these currencies/implementations might
+ * return false for both {@link IdentityEconomy#supportsAllRecordsOperation()} and
+ * {@link IdentityEconomy#supportsAllOnlineOperation()} in case of plugin's author preference!
+ */
+public interface MultiEconomy {
+
+ /**
+ * Checks if MultiEconomy method is enabled.
+ *
+ * @return Success or Failure
+ */
+ public boolean isEnabled();
+
+ /**
+ * Gets name of MultiEconomy method
+ *
+ * @return Name of Economy Method
+ */
+ public String getName();
+
+ /**
+ * Checks to see if a name of the implementation exists with this name.
+ *
+ * @param name The name of the name of the implementation to search for.
+ * @return True if the implementation exists, else false.
+ */
+ public boolean existsImplementation(String name);
+
+ /**
+ * Checks to see if a name of the implementation exists with this name.
+ *
+ * @param name The name of the name of the implementation to search for.
+ * @param world The name of the {@link World} to check for this name of the implementation in.
+ * @return True if the implementation exists, else false.
+ */
+ public boolean existsImplementation(String name, String world);
+
+ /**
+ * Used to get the implementation with the specified name.
+ *
+ * @param name The name of the implementation to get.
+ * @return The implementation with the specified name.
+ */
+ public IdentityEconomy getImplementation(String name);
+
+ /**
+ * Used to get the default implementation. This could be the default implementation for the server globally or
+ * for the default world if the implementation supports multi-world.
+ *
+ * @return The implementation that is the default for the server if multi-world support is not available
+ * otherwise the default for the default world.
+ */
+ public IdentityEconomy getDefault();
+
+ /**
+ * Checks to see if the default implementation is not null.
+ *
+ * @return True if the default implementation is not null, else false.
+ */
+ public default boolean hasDefault() {
+ return getDefault() != null;
+ }
+
+ /**
+ * Used to get the default implementation for the specified world if this implementation has multi-world
+ * support, otherwise the default implementation for the server.
+ *
+ * @param world The world to get the default implementation for.
+ * @return The default implementation for the specified world if this implementation has multi-world
+ * support, otherwise the default implementation for the server.
+ */
+ public IdentityEconomy getDefault(String world);
+
+ /**
+ * Checks to see if the default implementation for the specified world is not null.
+ *
+ * @param world The world to check the default implementation for.
+ * @return True if the default implementation for the specified world is not null, else false.
+ */
+ public default boolean hasDefault(String world) {
+ return getDefault(world) != null;
+ }
+
+ /**
+ * Used to get a collection of every implementation identifier for the server.
+ *
+ * @return A collection of every implementation identifier that is available for the server.
+ */
+ public Collection
* For easy checking of a commandsender
- * @param sender to check permissions on
+ *
+ * @param sender to check permissions on
* @param permission to check for
* @return true if the sender has the permission
*/
@@ -90,7 +101,8 @@ public boolean has(CommandSender sender, String permission) {
/**
* Checks if player has a permission node. (Short for playerHas(...)
- * @param player Player Object
+ *
+ * @param player Player Object
* @param permission Permission node
* @return Success or Failure
*/
@@ -99,12 +111,20 @@ public boolean has(Player player, String permission) {
}
/**
+ * @param world world name
+ * @param player player name
+ * @param permission permission node
+ * @return true if player has permission, false otherwise
* @deprecated As of VaultAPI 1.4 use {@link #playerHas(String, OfflinePlayer, String)} instead.
*/
@Deprecated
abstract public boolean playerHas(String world, String player, String permission);
/**
+ * @param world World object
+ * @param player player name
+ * @param permission permission node
+ * @return true if player has permission, false otherwise
* @deprecated As of VaultAPI 1.4 use {@link #playerHas(String, OfflinePlayer, String)} instead.
*/
@Deprecated
@@ -114,21 +134,21 @@ public boolean playerHas(World world, String player, String permission) {
}
return playerHas(world.getName(), player, permission);
}
-
+
/**
* Checks if player has a permission node.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
- *
- * @param world String world name
- * @param player to check
+ *
+ * @param world String world name
+ * @param player to check
* @param permission Permission node
* @return Success or Failure
*/
public boolean playerHas(String world, OfflinePlayer player, String permission) {
- if (world == null) {
- return has((String) null, player.getName(), permission);
- }
+ if (world == null) {
+ return has((String) null, player.getName(), permission);
+ }
return has(world, player.getName(), permission);
}
@@ -136,8 +156,8 @@ public boolean playerHas(String world, OfflinePlayer player, String permission)
* Checks if player has a permission node.
* Defaults to world-specific permission check if the permission system supports it.
* See {@link #playerHas(String, OfflinePlayer, String)} for explicit global or world checks.
- *
- * @param player Player Object
+ *
+ * @param player Player Object
* @param permission Permission node
* @return Success or Failure
*/
@@ -146,20 +166,23 @@ public boolean playerHas(Player player, String permission) {
}
/**
+ * @param world World name
+ * @param player Player name
+ * @param permission Permission node
+ * @return Success or Failure
* @deprecated As of VaultAPI 1.4 use {@link #playerAdd(String, OfflinePlayer, String)} instead.
* Add permission to a player.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
- *
- * @param world World name
- * @param player Player name
- * @param permission Permission node
- * @return Success or Failure
*/
@Deprecated
abstract public boolean playerAdd(String world, String player, String permission);
/**
+ * @param world World Object
+ * @param player Player name
+ * @param permission Permission node
+ * @return true if successful, false otherwise
* @deprecated As of VaultAPI 1.4 use {@link #playerAdd(String, OfflinePlayer, String)} instead.
*/
@Deprecated
@@ -174,9 +197,9 @@ public boolean playerAdd(World world, String player, String permission) {
* Add permission to a player.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
- *
- * @param world String world name
- * @param player to add to
+ *
+ * @param world String world name
+ * @param player to add to
* @param permission Permission node
* @return Success or Failure
*/
@@ -191,106 +214,110 @@ public boolean playerAdd(String world, OfflinePlayer player, String permission)
* Add permission to a player ONLY for the world the player is currently on.
* This is a world-specific operation, if you want to add global permission you must explicitly use NULL for the world.
* See {@link #playerAdd(String, OfflinePlayer, String)} for global permission use.
- *
- * @param player Player Object
+ *
+ * @param player Player Object
* @param permission Permission node
* @return Success or Failure
*/
public boolean playerAdd(Player player, String permission) {
return playerAdd(player.getWorld().getName(), player, permission);
}
-
+
/**
* Add transient permission to a player.
- * This implementation can be used by any subclass which implements a "pure" superperms plugin, i.e.
+ * This implementation can be used by any subclass which implements a "pure" superperms plugin, i.e.
* one that only needs the built-in Bukkit API to add transient permissions to a player.
- *
- * @param player to add to
+ *
+ * @param player to add to
* @param permission Permission node
* @return Success or Failure
*/
public boolean playerAddTransient(OfflinePlayer player, String permission) throws UnsupportedOperationException {
- if (player.isOnline()) {
- return playerAddTransient((Player) player, permission);
- }
- throw new UnsupportedOperationException(getName() + " does not support offline player transient permissions!");
- }
+ if (player.isOnline()) {
+ return playerAddTransient((Player) player, permission);
+ }
+ throw new UnsupportedOperationException(getName() + " does not support offline player transient permissions!");
+ }
/**
* Add transient permission to a player.
* This operation adds a permission onto the player object in bukkit via Bukkit's permission interface.
- *
- * @param player Player Object
+ *
+ * @param player Player Object
* @param permission Permission node
* @return Success or Failure
*/
public boolean playerAddTransient(Player player, String permission) {
- for (PermissionAttachmentInfo paInfo : player.getEffectivePermissions()) {
- if (paInfo.getAttachment() != null && paInfo.getAttachment().getPlugin().equals(plugin)) {
- paInfo.getAttachment().setPermission(permission, true);
- return true;
- }
- }
+ for (PermissionAttachmentInfo paInfo : player.getEffectivePermissions()) {
+ if (paInfo.getAttachment() != null && paInfo.getAttachment().getPlugin().equals(plugin)) {
+ paInfo.getAttachment().setPermission(permission, true);
+ return true;
+ }
+ }
- PermissionAttachment attach = player.addAttachment(plugin);
- attach.setPermission(permission, true);
+ PermissionAttachment attach = player.addAttachment(plugin);
+ attach.setPermission(permission, true);
- return true;
+ return true;
}
/**
* Adds a world specific transient permission to the player, may only work with some permission managers.
* Defaults to GLOBAL permissions for any permission system that does not support world-specific transient permissions!
- *
- * @param worldName to check on
- * @param player to add to
+ *
+ * @param worldName to check on
+ * @param player to add to
* @param permission to test
* @return Success or Failure
*/
public boolean playerAddTransient(String worldName, OfflinePlayer player, String permission) {
- return playerAddTransient(player, permission);
+ return playerAddTransient(player, permission);
}
-
+
/**
* Adds a world specific transient permission to the player, may only work with some permission managers.
* Defaults to GLOBAL permissions for any permission system that does not support world-specific transient permissions!
- *
- * @param worldName to check on
- * @param player to check
+ *
+ * @param worldName to check on
+ * @param player to check
* @param permission to check for
* @return Success or Failure
*/
public boolean playerAddTransient(String worldName, Player player, String permission) {
- return playerAddTransient(player, permission);
+ return playerAddTransient(player, permission);
}
-
+
/**
* Removes a world specific transient permission from the player, may only work with some permission managers.
* Defaults to GLOBAL permissions for any permission system that does not support world-specific transient permissions!
- *
- * @param worldName to remove for
- * @param player to remove for
+ *
+ * @param worldName to remove for
+ * @param player to remove for
* @param permission to remove
* @return Success or Failure
*/
public boolean playerRemoveTransient(String worldName, OfflinePlayer player, String permission) {
- return playerRemoveTransient(player, permission);
+ return playerRemoveTransient(player, permission);
}
-
+
/**
* Removes a world specific transient permission from the player, may only work with some permission managers.
* Defaults to GLOBAL permissions for any permission system that does not support world-specific transient permissions!
- *
- * @param worldName to check on
- * @param player to check
+ *
+ * @param worldName to check on
+ * @param player to check
* @param permission to check for
* @return Success or Failure
*/
public boolean playerRemoveTransient(String worldName, Player player, String permission) {
- return playerRemoveTransient((OfflinePlayer) player, permission);
+ return playerRemoveTransient((OfflinePlayer) player, permission);
}
-
+
/**
+ * @param world World name
+ * @param player player name
+ * @param permission Permission node
+ * @return true if successful, false otherwise
* @deprecated As of VaultAPI 1.4 use {@link #playerRemove(String, OfflinePlayer, String)} instead.
*/
@Deprecated
@@ -300,9 +327,9 @@ public boolean playerRemoveTransient(String worldName, Player player, String per
* Remove permission from a player.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
- *
- * @param world World name
- * @param player OfflinePlayer
+ *
+ * @param world World name
+ * @param player OfflinePlayer
* @param permission Permission node
* @return Success or Failure
*/
@@ -317,9 +344,9 @@ public boolean playerRemove(String world, OfflinePlayer player, String permissio
* Remove permission from a player.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
- *
- * @param world World name
- * @param player Player name
+ *
+ * @param world World name
+ * @param player Player name
* @param permission Permission node
* @return Success or Failure
*/
@@ -334,58 +361,58 @@ public boolean playerRemove(World world, String player, String permission) {
/**
* Remove permission from a player.
* Will attempt to remove permission from the player on the player's current world. This is NOT a global operation.
- *
- * @param player Player Object
+ *
+ * @param player Player Object
* @param permission Permission node
* @return Success or Failure
*/
public boolean playerRemove(Player player, String permission) {
return playerRemove(player.getWorld().getName(), player, permission);
}
-
+
/**
* Remove transient permission from a player.
- * This implementation can be used by any subclass which implements a "pure" superperms plugin, i.e.
+ * This implementation can be used by any subclass which implements a "pure" superperms plugin, i.e.
* one that only needs the built-in Bukkit API to remove transient permissions from a player. Any subclass
* implementing a plugin which provides its own API for this needs to override this method.
- *
- * @param player OfflinePlayer
+ *
+ * @param player OfflinePlayer
* @param permission Permission node
* @return Success or Failure
*/
- public boolean playerRemoveTransient(OfflinePlayer player, String permission) {
- if (player.isOnline()) {
- return playerRemoveTransient((Player) player, permission);
- } else {
- return false;
- }
- }
-
+ public boolean playerRemoveTransient(OfflinePlayer player, String permission) {
+ if (player.isOnline()) {
+ return playerRemoveTransient((Player) player, permission);
+ } else {
+ return false;
+ }
+ }
+
/**
* Remove transient permission from a player.
- *
- * @param player Player Object
+ *
+ * @param player Player Object
* @param permission Permission node
* @return Success or Failure
*/
public boolean playerRemoveTransient(Player player, String permission) {
- for (PermissionAttachmentInfo paInfo : player.getEffectivePermissions()) {
- if (paInfo.getAttachment() != null && paInfo.getAttachment().getPlugin().equals(plugin)) {
- paInfo.getAttachment().unsetPermission(permission);
- return true;
- }
- }
- return false;
+ for (PermissionAttachmentInfo paInfo : player.getEffectivePermissions()) {
+ if (paInfo.getAttachment() != null && paInfo.getAttachment().getPlugin().equals(plugin)) {
+ paInfo.getAttachment().unsetPermission(permission);
+ return true;
+ }
+ }
+ return false;
}
-
+
/**
* Checks if group has a permission node.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
- *
- * @param world World name
- * @param group Group name
+ *
+ * @param world World name
+ * @param group Group name
* @param permission Permission node
* @return Success or Failure
*/
@@ -395,9 +422,9 @@ public boolean playerRemoveTransient(Player player, String permission) {
* Checks if group has a permission node.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
- *
- * @param world World Object
- * @param group Group name
+ *
+ * @param world World Object
+ * @param group Group name
* @param permission Permission node
* @return Success or Failure
*/
@@ -412,9 +439,9 @@ public boolean groupHas(World world, String group, String permission) {
* Add permission to a group.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
- *
- * @param world World name
- * @param group Group name
+ *
+ * @param world World name
+ * @param group Group name
* @param permission Permission node
* @return Success or Failure
*/
@@ -424,9 +451,9 @@ public boolean groupHas(World world, String group, String permission) {
* Add permission to a group.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
- *
- * @param world World Object
- * @param group Group name
+ *
+ * @param world World Object
+ * @param group Group name
* @param permission Permission node
* @return Success or Failure
*/
@@ -441,9 +468,9 @@ public boolean groupAdd(World world, String group, String permission) {
* Remove permission from a group.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
- *
- * @param world World name
- * @param group Group name
+ *
+ * @param world World name
+ * @param group Group name
* @param permission Permission node
* @return Success or Failure
*/
@@ -453,9 +480,9 @@ public boolean groupAdd(World world, String group, String permission) {
* Remove permission from a group.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
- *
- * @param world World Object
- * @param group Group name
+ *
+ * @param world World Object
+ * @param group Group name
* @param permission Permission node
* @return Success or Failure
*/
@@ -467,12 +494,20 @@ public boolean groupRemove(World world, String group, String permission) {
}
/**
+ * @param world World name
+ * @param player player name
+ * @param group group name
+ * @return true if player is in group, false otherwise
* @deprecated As of VaultAPI 1.4 use {@link #playerInGroup(String, OfflinePlayer, String)} instead.
*/
@Deprecated
abstract public boolean playerInGroup(String world, String player, String group);
/**
+ * @param world World object
+ * @param player player name
+ * @param group group name
+ * @return true if player is in group, false otherwise
* @deprecated As of VaultAPI 1.4 use {@link #playerInGroup(String, OfflinePlayer, String)} instead.
*/
@Deprecated
@@ -482,15 +517,15 @@ public boolean playerInGroup(World world, String player, String group) {
}
return playerInGroup(world.getName(), player, group);
}
-
+
/**
* Check if player is member of a group.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
- *
- * @param world World Object
+ *
+ * @param world World Object
* @param player to check
- * @param group Group name
+ * @param group Group name
* @return Success or Failure
*/
public boolean playerInGroup(String world, OfflinePlayer player, String group) {
@@ -504,9 +539,9 @@ public boolean playerInGroup(String world, OfflinePlayer player, String group) {
* Check if player is member of a group.
* This method will ONLY check groups for which the player is in that are defined for the current world.
* This may result in odd return behaviour depending on what permission system has been registered.
- *
+ *
* @param player Player Object
- * @param group Group name
+ * @param group Group name
* @return Success or Failure
*/
public boolean playerInGroup(Player player, String group) {
@@ -514,12 +549,20 @@ public boolean playerInGroup(Player player, String group) {
}
/**
+ * @param world World name
+ * @param player player name
+ * @param group group name
+ * @return true if successful, false otherwise
* @deprecated As of VaultAPI 1.4 use {@link #playerAddGroup(String, OfflinePlayer, String)} instead.
*/
@Deprecated
abstract public boolean playerAddGroup(String world, String player, String group);
/**
+ * @param world World Object
+ * @param player player name
+ * @param group group name
+ * @return true if successful, false otherwise
* @deprecated As of VaultAPI 1.4 use {@link #playerAddGroup(String, OfflinePlayer, String)} instead.
*/
@Deprecated
@@ -534,10 +577,10 @@ public boolean playerAddGroup(World world, String player, String group) {
* Add player to a group.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
- *
- * @param world String world name
+ *
+ * @param world String world name
* @param player to add
- * @param group Group name
+ * @param group Group name
* @return Success or Failure
*/
public boolean playerAddGroup(String world, OfflinePlayer player, String group) {
@@ -546,14 +589,14 @@ public boolean playerAddGroup(String world, OfflinePlayer player, String group)
}
return playerAddGroup(world, player.getName(), group);
}
-
+
/**
* Add player to a group.
* This will add a player to the group on the current World. This may return odd results if the permission system
* being used on the server does not support world-specific groups, or if the group being added to is a global group.
- *
+ *
* @param player Player Object
- * @param group Group name
+ * @param group Group name
* @return Success or Failure
*/
public boolean playerAddGroup(Player player, String group) {
@@ -561,12 +604,20 @@ public boolean playerAddGroup(Player player, String group) {
}
/**
+ * @param world world name
+ * @param player player name
+ * @param group group name
+ * @return true if successful, false otherwise
* @deprecated As of VaultAPI 1.4 use {@link #playerRemoveGroup(String, OfflinePlayer, String)} instead.
*/
@Deprecated
abstract public boolean playerRemoveGroup(String world, String player, String group);
/**
+ * @param world World Object
+ * @param player name
+ * @param group Group name
+ * @return true if successful, false otherwise
* @deprecated As of VaultAPI 1.4 use {@link #playerRemoveGroup(String, OfflinePlayer, String)} instead.
*/
@Deprecated
@@ -576,15 +627,15 @@ public boolean playerRemoveGroup(World world, String player, String group) {
}
return playerRemoveGroup(world.getName(), player, group);
}
-
+
/**
* Remove player from a group.
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
- *
- * @param world World Object
+ *
+ * @param world World Object
* @param player to remove
- * @param group Group name
+ * @param group Group name
* @return Success or Failure
*/
public boolean playerRemoveGroup(String world, OfflinePlayer player, String group) {
@@ -598,9 +649,9 @@ public boolean playerRemoveGroup(String world, OfflinePlayer player, String grou
* Remove player from a group.
* This will add a player to the group on the current World. This may return odd results if the permission system
* being used on the server does not support world-specific groups, or if the group being added to is a global group.
- *
+ *
* @param player Player Object
- * @param group Group name
+ * @param group Group name
* @return Success or Failure
*/
public boolean playerRemoveGroup(Player player, String group) {
@@ -608,12 +659,18 @@ public boolean playerRemoveGroup(Player player, String group) {
}
/**
+ * @param world world name
+ * @param player player name
+ * @return Array of groups
* @deprecated As of VaultAPI 1.4 use {@link #getPlayerGroups(String, OfflinePlayer)} instead.
*/
@Deprecated
abstract public String[] getPlayerGroups(String world, String player);
/**
+ * @param world World Object
+ * @param player player name
+ * @return Array of groups
* @deprecated As of VaultAPI 1.4 use {@link #getPlayerGroups(String, OfflinePlayer)} instead.
*/
@Deprecated
@@ -623,25 +680,25 @@ public String[] getPlayerGroups(World world, String player) {
}
return getPlayerGroups(world.getName(), player);
}
-
+
/**
* Gets the list of groups that this player has
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
- *
- * @param world String world name
+ *
+ * @param world String world name
* @param player OfflinePlayer
* @return Array of groups
*/
public String[] getPlayerGroups(String world, OfflinePlayer player) {
- return getPlayerGroups(world, player.getName());
+ return getPlayerGroups(world, player.getName());
}
/**
* Returns a list of world-specific groups that this player is currently in. May return unexpected results if
* you are looking for global groups, or if the registered permission system does not support world-specific groups.
* See {@link #getPlayerGroups(String, OfflinePlayer)} for better control of World-specific or global groups.
- *
+ *
* @param player Player Object
* @return Array of groups
*/
@@ -665,13 +722,13 @@ public String getPrimaryGroup(World world, String player) {
}
return getPrimaryGroup(world.getName(), player);
}
-
+
/**
* Gets players primary group
* Supports NULL value for World if the permission system registered supports global permissions.
* But May return odd values if the servers registered permission system does not have a global permission store.
- *
- * @param world String world name
+ *
+ * @param world String world name
* @param player to get from
* @return Players primary group
*/
@@ -683,22 +740,24 @@ public String getPrimaryGroup(String world, OfflinePlayer player) {
* Get players primary group.
* Defaults to the players current world, so may return only world-specific groups.
* In most cases {@link #getPrimaryGroup(String, OfflinePlayer)} is preferable.
- *
+ *
* @param player Player Object
* @return Players primary group
*/
public String getPrimaryGroup(Player player) {
return getPrimaryGroup(player.getWorld().getName(), player);
}
-
+
/**
* Returns a list of all known groups
+ *
* @return an Array of String of all groups
*/
abstract public String[] getGroups();
-
+
/**
* Returns true if the given implementation supports groups.
+ *
* @return true if the implementation supports groups
*/
abstract public boolean hasGroupSupport();