API

GoldBank Development API

Note: This page is out of date, as new methods have been implemented in light of Minecraft's new UUID system. They are not reflected here, because I'm too lazy to include them.

Classes

PlayerInv

getGoldInPlayerInv(Player p) - Attempts to find the amount of gold in a specfied player's inventory.
p: The player who's inventory should be searched
Returns: The amount of gold (in nuggets) in the player's inventory

addGoldToPlayerInv(Player p, int amount) - Attempts to add a specific amount of gold (defined in nuggets) to a player's inventory.[/color]
p: The player whose inventory should be modified
amount: The amount of gold (in nuggets) to be added to the player's inventory.
Returns: Whether or not the gold was successfully added (returns false if not enough space is available)

removeGoldFromPlayerInv(Player p, int amount) - Attempts to remove a specific amount of gold (defined in nuggets) from a player's inventory.
p: The player whose inventory should be modified
amount: The amount of gold (in nuggets) to be removed the player's inventory.
Returns: Whether or not the gold was successfully added (returns false if not enough gold is contained by the player's inventory)

BankInv

getGoldInBankInv(String p) - Attempts to get the amount of gold in a specified player's bank inventory.
p: The player who's bank inventory's gold should be counted.
Returns: The amount of gold (in nuggets) contained by the specified player's bank inventory. Note: this method will return -1 if the player's bank inventory cannot be loaded.

addGoldToBankInv(String p, int amount) - Attempts to add a specific amount of gold (defined in nuggets) to a player's bank inventory.
p: The player whose bank inventory should be modified.
amount: The amount of gold (in nuggets) to be added to the player's bank inventory.
Returns: Whether or not the gold was successfully added (returns false if not enough space is available or the player's bank inventory could not be loaded).

removeGoldFromBankInv(String p, int amount) - Attempts to remove a specific amount of gold (defined in nuggets) from a player's bank inventory.
p: The username of the player who's bank inventory should be modified.
amount: The amount of gold (in nuggets) to be removed the player's bank inventory.
Returns: Whether or not the gold was successfully added (returns false if not enough gold is contained by the player's bank inventory)

WalletInv

getGoldInWalletInv(String p, int walletIndex) - Attempts to get the amount of gold in a specified player's given wallet inventory.
p: The player who's wallet inventory should be searched.
walletIndex: The wallet number to be searched
Returns: The amount of gold (in nuggets) contained by the specified player's given wallet inventory. Note: this method will return -1 if the player's given wallet inventory cannot be loaded.

addGoldToWalletInv(String p, int walletIndex, int amount) - Attempts to add a specific amount of gold (defined in nuggets) to a player's given wallet inventory.
p: The player whose wallet inventory should be modified.
walletIndex: The wallet number to be modified.
amount: The amount of gold (in nuggets) to be added to the player's given wallet inventory.
Returns: Whether or not the gold was successfully added (returns false if not enough space is available or the player's given wallet inventory could not be loaded).

removeGoldFromWalletInv(String p, int walletIndex, int amount) - Attempts to remove a specific amount of gold (defined in nuggets) from a player's given wallet inventory.
p: The username of the player who's wallet inventory should be modified.
walletIndex: The wallet number to be modified.
amount: The amount of gold (in nuggets) to be removed the player's given wallet inventory.
Returns: Whether or not the gold was successfully added (returns false if not enough gold is contained by the player's given wallet inventory)


Comments

Posts Quoted:
Reply
Clear All Quotes