mirror of
https://github.com/MilkBowl/Vault.git
synced 2024-11-14 06:36:43 +01:00
fix javadocs
This commit is contained in:
parent
24f2b98eba
commit
a45186c3ef
@ -54,7 +54,7 @@ public interface Economy {
|
|||||||
* Format amount into a human readable String This provides translation into
|
* Format amount into a human readable String This provides translation into
|
||||||
* economy specific formatting to improve consistency between plugins.
|
* economy specific formatting to improve consistency between plugins.
|
||||||
*
|
*
|
||||||
* @param amount
|
* @param amount to format
|
||||||
* @return Human readable string describing amount
|
* @return Human readable string describing amount
|
||||||
*/
|
*/
|
||||||
public String format(double amount);
|
public String format(double amount);
|
||||||
@ -80,7 +80,8 @@ public interface Economy {
|
|||||||
* Checks if this player has an account on the server yet
|
* Checks if this player has an account on the server yet
|
||||||
* This will always return true if the player has joined the server at least once
|
* This will always return true if the player has joined the server at least once
|
||||||
* as all major economy plugins auto-generate a player account when the player joins the server
|
* as all major economy plugins auto-generate a player account when the player joins the server
|
||||||
* @param playerName
|
*
|
||||||
|
* @param playerName to check
|
||||||
* @return if the player has an account
|
* @return if the player has an account
|
||||||
*/
|
*/
|
||||||
public boolean hasAccount(String playerName);
|
public boolean hasAccount(String playerName);
|
||||||
@ -89,14 +90,17 @@ public interface Economy {
|
|||||||
* Checks if this player has an account on the server yet on the given world
|
* Checks if this player has an account on the server yet on the given world
|
||||||
* This will always return true if the player has joined the server at least once
|
* This will always return true if the player has joined the server at least once
|
||||||
* as all major economy plugins auto-generate a player account when the player joins the server
|
* as all major economy plugins auto-generate a player account when the player joins the server
|
||||||
* @param playerName
|
*
|
||||||
|
* @param playerName to check in the world
|
||||||
|
* @param worldName world-specific account
|
||||||
* @return if the player has an account
|
* @return if the player has an account
|
||||||
*/
|
*/
|
||||||
public boolean hasAccount(String playerName, String worldName);
|
public boolean hasAccount(String playerName, String worldName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets balance of a player
|
* Gets balance of a player
|
||||||
* @param playerName
|
*
|
||||||
|
* @param playerName of the player
|
||||||
* @return Amount currently held in players account
|
* @return Amount currently held in players account
|
||||||
*/
|
*/
|
||||||
public double getBalance(String playerName);
|
public double getBalance(String playerName);
|
||||||
@ -113,8 +117,8 @@ public interface Economy {
|
|||||||
/**
|
/**
|
||||||
* Checks if the player account has the amount - DO NOT USE NEGATIVE AMOUNTS
|
* Checks if the player account has the amount - DO NOT USE NEGATIVE AMOUNTS
|
||||||
*
|
*
|
||||||
* @param playerName
|
* @param playerName to check
|
||||||
* @param amount
|
* @param amount to check for
|
||||||
* @return True if <b>playerName</b> has <b>amount</b>, False else wise
|
* @return True if <b>playerName</b> has <b>amount</b>, False else wise
|
||||||
*/
|
*/
|
||||||
public boolean has(String playerName, double amount);
|
public boolean has(String playerName, double amount);
|
||||||
@ -122,9 +126,10 @@ public interface Economy {
|
|||||||
/**
|
/**
|
||||||
* Checks if the player account has the amount in a given world - DO NOT USE NEGATIVE AMOUNTS
|
* Checks if the player account has the amount in a given world - DO NOT USE NEGATIVE AMOUNTS
|
||||||
* IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned.
|
* IMPLEMENTATION SPECIFIC - if an economy plugin does not support this the global balance will be returned.
|
||||||
* @param playerName
|
*
|
||||||
* @param worldName
|
* @param playerName to check
|
||||||
* @param amount
|
* @param worldName to check with
|
||||||
|
* @param amount to check for
|
||||||
* @return True if <b>playerName</b> has <b>amount</b>, False else wise
|
* @return True if <b>playerName</b> has <b>amount</b>, False else wise
|
||||||
*/
|
*/
|
||||||
public boolean has(String playerName, String worldName, double amount);
|
public boolean has(String playerName, String worldName, double amount);
|
||||||
@ -168,22 +173,22 @@ public interface Economy {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a bank account with the specified name and the player as the owner
|
* Creates a bank account with the specified name and the player as the owner
|
||||||
* @param name
|
* @param name of account
|
||||||
* @param player
|
* @param player the account should be linked to
|
||||||
* @return EconomyResponse Object
|
* @return EconomyResponse Object
|
||||||
*/
|
*/
|
||||||
public EconomyResponse createBank(String name, String player);
|
public EconomyResponse createBank(String name, String player);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes a bank account with the specified name.
|
* Deletes a bank account with the specified name.
|
||||||
* @param name
|
* @param name of the back to delete
|
||||||
* @return if the operation completed successfully
|
* @return if the operation completed successfully
|
||||||
*/
|
*/
|
||||||
public EconomyResponse deleteBank(String name);
|
public EconomyResponse deleteBank(String name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the amount the bank has
|
* Returns the amount the bank has
|
||||||
* @param name
|
* @param name of the account
|
||||||
* @return EconomyResponse Object
|
* @return EconomyResponse Object
|
||||||
*/
|
*/
|
||||||
public EconomyResponse bankBalance(String name);
|
public EconomyResponse bankBalance(String name);
|
||||||
@ -191,8 +196,8 @@ public interface Economy {
|
|||||||
/**
|
/**
|
||||||
* Returns true or false whether the bank has the amount specified - DO NOT USE NEGATIVE AMOUNTS
|
* Returns true or false whether the bank has the amount specified - DO NOT USE NEGATIVE AMOUNTS
|
||||||
*
|
*
|
||||||
* @param name
|
* @param name of the account
|
||||||
* @param amount
|
* @param amount to check for
|
||||||
* @return EconomyResponse Object
|
* @return EconomyResponse Object
|
||||||
*/
|
*/
|
||||||
public EconomyResponse bankHas(String name, double amount);
|
public EconomyResponse bankHas(String name, double amount);
|
||||||
@ -200,8 +205,8 @@ public interface Economy {
|
|||||||
/**
|
/**
|
||||||
* Withdraw an amount from a bank account - DO NOT USE NEGATIVE AMOUNTS
|
* Withdraw an amount from a bank account - DO NOT USE NEGATIVE AMOUNTS
|
||||||
*
|
*
|
||||||
* @param name
|
* @param name of the account
|
||||||
* @param amount
|
* @param amount to withdraw
|
||||||
* @return EconomyResponse Object
|
* @return EconomyResponse Object
|
||||||
*/
|
*/
|
||||||
public EconomyResponse bankWithdraw(String name, double amount);
|
public EconomyResponse bankWithdraw(String name, double amount);
|
||||||
@ -209,24 +214,26 @@ public interface Economy {
|
|||||||
/**
|
/**
|
||||||
* Deposit an amount into a bank account - DO NOT USE NEGATIVE AMOUNTS
|
* Deposit an amount into a bank account - DO NOT USE NEGATIVE AMOUNTS
|
||||||
*
|
*
|
||||||
* @param name
|
* @param name of the account
|
||||||
* @param amount
|
* @param amount to deposit
|
||||||
* @return EconomyResponse Object
|
* @return EconomyResponse Object
|
||||||
*/
|
*/
|
||||||
public EconomyResponse bankDeposit(String name, double amount);
|
public EconomyResponse bankDeposit(String name, double amount);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a player is the owner of a bank account
|
* Check if a player is the owner of a bank account
|
||||||
* @param name
|
*
|
||||||
* @param playerName
|
* @param name of the account
|
||||||
|
* @param playerName to check for ownership
|
||||||
* @return EconomyResponse Object
|
* @return EconomyResponse Object
|
||||||
*/
|
*/
|
||||||
public EconomyResponse isBankOwner(String name, String playerName);
|
public EconomyResponse isBankOwner(String name, String playerName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the player is a member of the bank account
|
* Check if the player is a member of the bank account
|
||||||
* @param name
|
*
|
||||||
* @param playerName
|
* @param name of the account
|
||||||
|
* @param playerName to check membership
|
||||||
* @return EconomyResponse Object
|
* @return EconomyResponse Object
|
||||||
*/
|
*/
|
||||||
public EconomyResponse isBankMember(String name, String playerName);
|
public EconomyResponse isBankMember(String name, String playerName);
|
||||||
|
@ -661,7 +661,7 @@ public class Items {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Searchs for an ItemInfo from the given ItemStack
|
* Searchs for an ItemInfo from the given ItemStack
|
||||||
* @param itemStack
|
* @param itemStack to search on
|
||||||
* @return ItemInfo found, or null
|
* @return ItemInfo found, or null
|
||||||
*/
|
*/
|
||||||
public static ItemInfo itemByStack(ItemStack itemStack) {
|
public static ItemInfo itemByStack(ItemStack itemStack) {
|
||||||
@ -691,8 +691,8 @@ public class Items {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a relevant ItemInfo by it's Material
|
* Gets a relevant ItemInfo by it's Material
|
||||||
* @param type
|
* @param type of Material
|
||||||
* @return ItemInfo
|
* @return ItemInfo record found or null if none
|
||||||
*/
|
*/
|
||||||
public static ItemInfo itemByType(Material type) {
|
public static ItemInfo itemByType(Material type) {
|
||||||
return itemByType(type, (short) 0);
|
return itemByType(type, (short) 0);
|
||||||
@ -700,9 +700,9 @@ public class Items {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Searches for an ItemInfo record by Material and SubTypeID
|
* Searches for an ItemInfo record by Material and SubTypeID
|
||||||
* @param type
|
* @param type of Material
|
||||||
* @param subType
|
* @param subType to check for
|
||||||
* @return
|
* @return ItemInfo record found or null if none
|
||||||
*/
|
*/
|
||||||
public static ItemInfo itemByType(Material type, short subType) {
|
public static ItemInfo itemByType(Material type, short subType) {
|
||||||
for (ItemInfo item : items) {
|
for (ItemInfo item : items) {
|
||||||
@ -768,8 +768,8 @@ public class Items {
|
|||||||
* Multi-Item return search for dumping all items with the search string to the player
|
* Multi-Item return search for dumping all items with the search string to the player
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @param searchString
|
* @param searchString to search for
|
||||||
* @param multi
|
* @param multi whether to return a list of items or just the first
|
||||||
* @return Array of items found
|
* @return Array of items found
|
||||||
*/
|
*/
|
||||||
public static ItemInfo[] itemsByName(String searchString, boolean multi) {
|
public static ItemInfo[] itemsByName(String searchString, boolean multi) {
|
||||||
@ -840,7 +840,7 @@ public class Items {
|
|||||||
/**
|
/**
|
||||||
* Single item search function, for when we only ever want to return 1 result
|
* Single item search function, for when we only ever want to return 1 result
|
||||||
*
|
*
|
||||||
* @param searchString
|
* @param searchString to search for
|
||||||
* @return ItemInfo Object
|
* @return ItemInfo Object
|
||||||
*/
|
*/
|
||||||
public static ItemInfo itemByName(String searchString) {
|
public static ItemInfo itemByName(String searchString) {
|
||||||
@ -916,8 +916,8 @@ public class Items {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Joins elements of a String array with the glue between them into a String.
|
* Joins elements of a String array with the glue between them into a String.
|
||||||
* @param array
|
* @param array of elements to join together
|
||||||
* @param glue
|
* @param glue what to put between each element
|
||||||
* @return Concacted Array combined with glue
|
* @return Concacted Array combined with glue
|
||||||
*/
|
*/
|
||||||
public static String join(String[] array, String glue) {
|
public static String join(String[] array, String glue) {
|
||||||
@ -939,8 +939,8 @@ public class Items {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Joins elements of a String array with the glue between them into a String.
|
* Joins elements of a String array with the glue between them into a String.
|
||||||
* @param list
|
* @param list of items to join together
|
||||||
* @param glue
|
* @param glue what to put between each element
|
||||||
* @return Concacted Array combined with glue
|
* @return Concacted Array combined with glue
|
||||||
*/
|
*/
|
||||||
public static String join(List<String> list, String glue) {
|
public static String join(List<String> list, String glue) {
|
||||||
|
@ -93,8 +93,8 @@ public abstract class Permission {
|
|||||||
* This method will explicitly fail if the registered permission system does not register permissions in bukkit.
|
* This method will explicitly fail if the registered permission system does not register permissions in bukkit.
|
||||||
*
|
*
|
||||||
* For easy checking of a commandsender
|
* For easy checking of a commandsender
|
||||||
* @param sender
|
* @param sender to check permissions on
|
||||||
* @param permission
|
* @param permission to check for
|
||||||
* @return true if the sender has the permission
|
* @return true if the sender has the permission
|
||||||
*/
|
*/
|
||||||
public boolean has(CommandSender sender, String permission) {
|
public boolean has(CommandSender sender, String permission) {
|
||||||
@ -246,7 +246,7 @@ public abstract class Permission {
|
|||||||
* 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.
|
* one that only needs the built-in Bukkit API to add transient permissions to a player.
|
||||||
*
|
*
|
||||||
* @param UUID playerId
|
* @param playerId UUID
|
||||||
* @param permission Permission node
|
* @param permission Permission node
|
||||||
* @return Success or Failure
|
* @return Success or Failure
|
||||||
*/
|
*/
|
||||||
@ -283,9 +283,9 @@ public abstract class Permission {
|
|||||||
/**
|
/**
|
||||||
* Adds a world specific transient permission to the player - ONLY WORKS IN PEX/P3 - otherwise it defaults to GLOBAL!
|
* Adds a world specific transient permission to the player - ONLY WORKS IN PEX/P3 - otherwise it defaults to GLOBAL!
|
||||||
*
|
*
|
||||||
* @param worldName
|
* @param worldName to check on
|
||||||
* @param playerId
|
* @param playerId UUID
|
||||||
* @param permission
|
* @param permission to test
|
||||||
* @return Success or Failure
|
* @return Success or Failure
|
||||||
*/
|
*/
|
||||||
public boolean playerAddTransient(String worldName, UUID playerId, String permission) {
|
public boolean playerAddTransient(String worldName, UUID playerId, String permission) {
|
||||||
@ -294,9 +294,9 @@ public abstract class Permission {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a world specific transient permission to the player - ONLY WORKS IN PEX/P3 - otherwise it defaults to GLOBAL!
|
* Adds a world specific transient permission to the player - ONLY WORKS IN PEX/P3 - otherwise it defaults to GLOBAL!
|
||||||
* @param worldName
|
* @param worldName to check on
|
||||||
* @param player
|
* @param player to check
|
||||||
* @param permission
|
* @param permission to check for
|
||||||
* @return Success or Failure
|
* @return Success or Failure
|
||||||
*/
|
*/
|
||||||
public boolean playerAddTransient(String worldName, Player player, String permission) {
|
public boolean playerAddTransient(String worldName, Player player, String permission) {
|
||||||
@ -305,9 +305,9 @@ public abstract class Permission {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a world specific transient permission to the player - ONLY WORKS IN PEX/P3 - otherwise it defaults to GLOBAL!
|
* Adds a world specific transient permission to the player - ONLY WORKS IN PEX/P3 - otherwise it defaults to GLOBAL!
|
||||||
* @param worldName
|
* @param worldName to check on
|
||||||
* @param player
|
* @param player to check
|
||||||
* @param permission
|
* @param permission to check
|
||||||
* @return Success or Failure
|
* @return Success or Failure
|
||||||
*/
|
*/
|
||||||
public boolean playerAddTransient(String worldName, String player, String permission) {
|
public boolean playerAddTransient(String worldName, String player, String permission) {
|
||||||
@ -320,9 +320,9 @@ public abstract class Permission {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes a world specific transient permission from the player - Only works in PEX/P3 - otherwise it defaults to Global!
|
* Removes a world specific transient permission from the player - Only works in PEX/P3 - otherwise it defaults to Global!
|
||||||
* @param worldName
|
* @param worldName to check on
|
||||||
* @param player
|
* @param player to check
|
||||||
* @param permission
|
* @param permission to check for
|
||||||
* @return Success or Failure
|
* @return Success or Failure
|
||||||
*/
|
*/
|
||||||
public boolean playerRemoveTransient(String worldName, String player, String permission) {
|
public boolean playerRemoveTransient(String worldName, String player, String permission) {
|
||||||
@ -335,9 +335,9 @@ public abstract class Permission {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes a world specific transient permission from the player - Only works in PEX/P3 - otherwise it defaults to Global!
|
* Removes a world specific transient permission from the player - Only works in PEX/P3 - otherwise it defaults to Global!
|
||||||
* @param worldName
|
* @param worldName to check on
|
||||||
* @param playerId
|
* @param playerId UUID to check
|
||||||
* @param permission
|
* @param permission to check for
|
||||||
* @return Success or Failure
|
* @return Success or Failure
|
||||||
*/
|
*/
|
||||||
public boolean playerRemoveTransient(String worldName, UUID playerId, String permission) {
|
public boolean playerRemoveTransient(String worldName, UUID playerId, String permission) {
|
||||||
@ -346,9 +346,9 @@ public abstract class Permission {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes a world specific transient permission from the player - Only works in PEX/P3 - otherwise it defaults to Global!
|
* Removes a world specific transient permission from the player - Only works in PEX/P3 - otherwise it defaults to Global!
|
||||||
* @param worldName
|
* @param worldName to check on
|
||||||
* @param player
|
* @param player to check
|
||||||
* @param permission
|
* @param permission to check for
|
||||||
* @return Success or Failure
|
* @return Success or Failure
|
||||||
*/
|
*/
|
||||||
public boolean playerRemoveTransient(String worldName, Player player, String permission) {
|
public boolean playerRemoveTransient(String worldName, Player player, String permission) {
|
||||||
@ -415,7 +415,7 @@ public abstract class Permission {
|
|||||||
/**
|
/**
|
||||||
* Remove transient permission from a player.
|
* Remove transient permission from a player.
|
||||||
*
|
*
|
||||||
* @param UUID playerId
|
* @param playerId UUID
|
||||||
* @param permission Permission node
|
* @param permission Permission node
|
||||||
* @return Success or Failure
|
* @return Success or Failure
|
||||||
*/
|
*/
|
||||||
@ -791,7 +791,7 @@ public abstract class Permission {
|
|||||||
* But May return odd values if the servers registered permission system does not have a global permission store.
|
* 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 Player name
|
* @param playerId UUID of the player
|
||||||
* @return Players primary group
|
* @return Players primary group
|
||||||
*/
|
*/
|
||||||
public String getPrimaryGroup(World world, UUID playerId) {
|
public String getPrimaryGroup(World world, UUID playerId) {
|
||||||
|
Loading…
Reference in New Issue
Block a user