API Documentation for JSONAPI-RELOADED

This page documents all the methods that ship with JSONAPI-RELOADED. This includes the base method that work as long as JSONAPI-RELOADED is installed and enabled, along with the methods that require another plugin to be installed and enabled for them to work.

The methods that require another plugin to be installed simply do not work if that plugin is not installed and enabled.

Available method packages

Dependencies
  • JSONAPI-RELOADED
Methods
Name
addEnchantmentToPlayerInventorySlot
Description
Adds an enchantment to the specified slot in the specified player's inventory with the specified level.
Arguments
String
Player's name
int
Slot number
int
The enchantment ID (EID): http://www.minecraftwiki.net/wiki/Enchanting#Enchantment_Types
int
The enchantment level
Returns
boolean True if the enchanting process was successful. False is usually the restult will be returned if the player is not on the server.
Name
addEnchantmentsToPlayerEnderchestSlot
Description
Adds an enchantment to the specified slot in the specified player's enderchest with the specified level.
Arguments
String
Player's name
int
Slot number
Object[]
Array of {enchantment: 0, level: 1}-esque objects where enchantment is the EID-value from here: http://www.minecraftwiki.net/wiki/Enchanting#Enchantment_Types
Returns
boolean True if the enchanting process was successful. False is usually the restult will be returned if the player is not on the server.
Name
addEnchantmentsToPlayerInventorySlot
Description
Adds an enchantment to the specified slot in the specified player's inventory with the specified level.
Arguments
String
Player's name
int
Slot number
Object[]
Array of {enchantment: 0, level: 1}-esque objects where enchantment is the EID-value from here: http://www.minecraftwiki.net/wiki/Enchanting#Enchantment_Types
Returns
boolean True if the enchanting process was successful. False is usually the restult will be returned if the player is not on the server.
Name
addToWhitelist
Description
Adds the specified player to the whitelist.
Arguments
String
The name of the player to be added to the whitelist
Returns
void
Name
appendToFile
Description
Appends to the contents of the specified file. The file path is relative to the folder that the craftbukkit jar is in.
Arguments
String
The name of the file to read.
String
The content to append to the file.
Returns
boolean True if call succeeded. False will never be returned, instead an exception will be thrown and the call will not return as successful. This will occur if the specified file does not exist.
Name
ban
Description
Bans the specified player.
Arguments
String
The name of the player to be banned.
Returns
void
Name
banIP
Description
Bans the specified IP.
Arguments
String
The IP to be banned.
Returns
void
Name
banWithReason
Description
Bans the specified player with the specified reason.
Arguments
String
The name of the player to be banned.
String
The reason the player is being banned.
Returns
boolean Returns true if the player was banned while online; false if the player was offline when he/she was banned.
Name
broadcast
Description
Send a message to every player on the server.
Arguments
String
The message to broadcast
Returns
int The number of players the message was broadcast to.
Name
broadcastWithName
Description
Similar to broadcast, but lets you specify a name to chat as and displays the message with the proper format. Looks just like the person specified is on the esrver.
Arguments
String
The message.
String
The name to send as.
Returns
boolean True on success, false on failure.
Name
clearPlayerEnderchest
Description
Get enderchest of a player online/offline .
Arguments
String
Players' name
Returns
boolean Return true if enderchest cleared, return false if playername not exists
Name
clearPlayerEnderchestSlot
Description
Removes everything from the specified slot in the player's enderchest.
Arguments
String
Player's name
int
Slot number
Returns
boolean True if the slot was cleared. False will be returned if the player is not on the server.
Name
clearPlayerInventory
Description
Get inventory of a player online/offline .
Arguments
String
Players' name
Returns
boolean Return true if inventory cleared, return false if playername not exists
Name
clearPlayerInventorySlot
Description
Removes everything from the specified slot in the player's inventory.
Arguments
String
Player's name
int
Slot number
Returns
boolean True if the slot was cleared. False will be returned if the player is not on the server.
Name
deleteFileOrFolder
Description
Deletes the specified file or folder.
Arguments
String
The path to the file or folder relative to the server root.
Returns
boolean True if successful, false otherwise.
Name
deopPlayer
Description
Deops the specified player.
Arguments
String
The name of the player to be deopped.
Returns
void
Name
disablePlugin
Description
Disables the specified plugin. Attempting to disable a plugin that is not enabled will have no effect.
Arguments
String
The name of the plugin to disable
Returns
boolean True if the plugin was disabled. False will be returned if the plugin is not on the server.
Name
disablePlugins
Description
Disables all plugins on the server.
Arguments
None
Returns
void
Name
editPropertiesFile
Description
Sets the specified key of the specified file to the specified value with the specified type. The file path is relative to the folder that the craftbukkit jar is in.
Arguments
String
The name of the .properties file to edit WITHOUT the extentions. (server, not server.properties)
String
The type of value. Options are boolean, long, int, string and double.
String
The key that will have value set to it.
String
The value to set key to as A STRING. This means that true will be come "true" and 1.5 will become "1.5".
Returns
boolean True if call succeeded. False will never be returned, instead an exception will be thrown and the call will not return as successful. This will occur if the specified file does not exist.
Name
enablePlugin
Description
Enables the specified plugin. Attempting to enable a plugin that is already enabled will have no effect.
Arguments
String
The name of the plugin to enable
Returns
boolean True if the plugin was enabled. False will be returned if the plugin is not on the server.
Name
getBannedIPs
Description
Gets the IPs on the ban list.
Arguments
None
Returns
String[] Returns an array of strings; where each item in the array is a string that contains an IP address.
Name
getBannedPlayers
Description
Gets the players on the ban list.
Arguments
None
Returns
String[] Returns an array of strings; where each item in the array is a string that contains a player's name.
Name
getBinaryFileBase64
Description
Gets the binary contents of the specified file encoded in base64. The file path is relative to the folder that the craftbukkit jar is in.
Arguments
String
The name of the file to read.
Returns
String The file's contents.
Name
getBlock
Description
Retrieves the block in the specified world at the specified coordinate.
Arguments
String
The world name.
int
The x-coord of the block.
int
The y-coord of the block.
int
The z-coord of the block.
Returns
Object Information about the block.
Name
getBukkitVersion
Description
Gets the Bukkit version that this server is running.
Arguments
None
Returns
String A string representing the version.
Name
getDirectory
Description
Retrieves an array of files and directories that exist in the specified directory.
Arguments
String
The directory that will have its files listed, relative to the folder that contains the the plugins folder.
Returns
String[] The files in string format.
Name
getFileContents
Description
Gets the contents of the specified file. The file path is relative to the folder that the craftbukkit jar is in.
Arguments
String
The name of the file to read.
Returns
String The file's contents.
Name
getLatestChats
Description
Gets up to the last 50 lines in chat. Returned as an array of JSON stream objects.
Arguments
None
Returns
Object[] The array of objects
Name
getLatestChatsWithLimit
Description
Gets up to the last n lines in chat where n is the limit passed. Returned as an array of JSON stream objects.
Arguments
int
The maximum number of items to return.
Returns
Object[] The array of objects
Name
getLatestConnections
Description
Gets up to the last 50 connections/disconnections. Returned as an array of JSON stream objects.
Arguments
None
Returns
Object[] The array of objects
Name
getLatestConnectionsWithLimit
Description
Gets up to the last n connections/disconnections where n is the limit passed. Returned as an array of JSON stream objects.
Arguments
int
The maximum number of items to return.
Returns
Object[] The array of objects
Name
getLatestConsoleLogs
Description
Gets up to the last 50 lines in the console. Returned as an array of JSON stream objects.
Arguments
None
Returns
Object[] The array of objects
Name
getLatestConsoleLogsWithLimit
Description
Gets up to the last n lines in the console where n is the limit passed. Returned as an array of JSON stream objects.
Arguments
int
The maximum number of items to return.
Returns
Object[] The array of objects
Name
getMotd
Description
Gets server's MOTD
Arguments
None
Returns
String The MOTD
Name
getOfflinePlayer
Description
Gets an offlinePlayer object representing the specified person.
Arguments
String
Player name
Returns
OfflinePlayer A offlinePlayer object respresenting the specified person.
Name
getOfflinePlayerNames
Description
Retrieves an array of the names of all the players who have ever played on the server but are not currently on the server.
Arguments
None
Returns
String[] The offline players' names.
Name
getOfflinePlayers
Description
Retrieves an array of all the players who have ever played on the server but are not currently on the server.
Arguments
None
Returns
OfflinePlayer[] An array of offlinePlayers.
Name
getOnlinePlayerNamesInWorld
Description
Retrieves an array of the names of all the players currently in the given world.
Arguments
String
The world name
Returns
String[] The players' names.
Name
getOpList
Description
Gets the players who are opped.
Arguments
None
Returns
String[] Returns an array of strings; where each item in the array is a string that contains a player's name.
Name
getPlayer
Description
Gets a |player| object representing the specified person.
Arguments
String
Player name
Returns
Player A player object respresenting the specified person.
Name
getPlayerCount
Description
Gets the amount of players currently on the server.
Arguments
None
Returns
int The number of players on the server.
Name
getPlayerEnderchest
Description
Get enderchest of a player online/offline .
Arguments
String
Players' name
Returns
Inventory A enderchest object respresenting the specified person.
Name
getPlayerEnderchestSlot
Description
Get enderchest slot of a player online/offline .
Arguments
String
Players' name
int
Slot number
Returns
ItemStack A itemstack object respresenting the specified person.
Name
getPlayerInventory
Description
Get inventory of a player online/offline .
Arguments
String
Players' name
Returns
Inventory A inventory object respresenting the specified person.
Name
getPlayerInventorySlot
Description
Get inventory slot of a player online/offline .
Arguments
String
Players' name
int
Slot number
Returns
ItemStack A itemstack object respresenting the specified person.
Name
getPlayerLimit
Description
Gets the maximum amount of players allowed on the server.
Arguments
None
Returns
int The player limit.
Name
getPlayerNames
Description
Retrieves an array of the names of all the players currently on the server.
Arguments
None
Returns
String[] The players' names.
Name
getPlayers
Description
Gets an array of |player| objects that represent all of the players on the server.
Arguments
None
Returns
Player[] An array of |Player| objects
Name
getPlugin
Description
Gets the |plugin| object for the plugin with the given name.
Arguments
String
The name of the plugin to fetch
Returns
Plugin The specified plugin.
Name
getPluginFiles
Description
Retrives an array of files and directories that exist in the plugins data folder. Recursive.
Arguments
String
The plugin that will have its files listed.
Returns
String[] The files in string format.
Name
getPluginVersion
Description
Gets version of a plugin.
Arguments
String
Plugin name
Returns
String A string representing the version.
Name
getPlugins
Description
Gets an array of all loaded plugins.
Arguments
None
Returns
Plugin[] An array of |plugin| objects.
Name
getPropertiesFile
Description
Gets a key value set for the specified properties file. The file path is relative to the folder that the craftbukkit jar is in.
Arguments
String
The name of the properties file to read.
Returns
Object A key value set for the specified properties file.
Name
getServer
Description
Gets server information: maxPlayers, players, port, name, serverName, version, worlds.
Arguments
None
Returns
Object Key value object with information about the server.
Name
getServerIp
Description
Get the IP that this server is bound to or empty string if not specified.
Arguments
None
Returns
String The IP
Name
getServerPort
Description
Get the game port that the server runs on.
Arguments
None
Returns
int The port
Name
getServerVersion
Description
Gets the version string of this server implementation.
Arguments
None
Returns
String A string representing the version.
Name
getSingleDirectory
Description
Retrieves an array of files and directories that are direct children of the specified directory.
Arguments
String
The directory that will have its files listed, relative to the folder that contains the the plugins folder.
Returns
String[] The files in string format.
Name
getStream
Description
Returns all the messages in a stream with the given name.
Arguments
String
The name of the stream to fetch messages from.
Returns
Object[] An array of message objects which are different for each kind of stream.
Name
getStreamWithLimit
Description
Returns all the messages in a stream with the given name.
Arguments
String
The name of the stream to fetch messages from.
int
The number of messages to limit the results to.
Returns
Object[] An array of message objects which are different for each kind of stream.
Name
getWhitelist
Description
Gets the players on the whitelist.
Arguments
None
Returns
String[] Returns an array of strings; where each item in the array is a string that contains a player's name.
Name
getWorld
Description
Gets the |world| object with the given name.
Arguments
String
Name of the world to get
Returns
World The world with the given name.
Name
getWorldNames
Description
Gets an array of all the world names on the server.
Arguments
None
Returns
String[] All of the names of the worlds on the server.
Name
getWorlds
Description
Gets an array of all the |world| objects on the server.
Arguments
None
Returns
World[] All of the worlds on the server.
Name
givePlayerEnderchestItem
Description
Give item in enderchest of player
Arguments
String
Players' name
String
Name of item
int
Amount of items
Returns
boolean Return true if item given, return false if playername not exist or itemname not exist.
Name
givePlayerItem
Description
Gives the specified player the specified quanity of the item id by placing it in the first empty slot.
Arguments
String
Player's name
int
Id of item to give
int
Quantity of item to give
Returns
boolean True if the item was given. False will be returned if the player is not on the server.
Name
givePlayerItemDrop
Description
Gives the specified player the specified quanity of the item id by dropping it in front of them.
Arguments
String
Players' name
int
Id of item to drop
int
Quantity of item to drop
Returns
boolean True if the item was given. False will be returned if the player is not on the server.
Name
givePlayerItemDropWithData
Description
Gives the specified player the specified quanity of the item id with the specified data by dropping it in front of them.
Arguments
String
Player's name
int
Id of item to give
int
Quantity of item to give
int
Decimal representation of the data value.
Returns
boolean True if the item was given. False will be returned if the player is not on the server. An exception could be throw for invalid data (data < 0 or data > 15).
Name
givePlayerItemName
Description
Gives the specified player the specified quanity of the item id by placing it in the first empty slot.
Arguments
String
Player's name
String
Name of item to give
int
Quantity of item to give
Returns
boolean True if the item was given. False will be returned if the player is not on the server or name inccorect.
Name
givePlayerItemNameDrop
Description
Gives the specified player the specified quanity of the item id by dropping it in front of them.
Arguments
String
Players' name
String
String of item to drop
int
Quantity of item to drop
Returns
boolean True if the item was given. False will be returned if the player is not on the server or name inccorect.
Name
givePlayerItemWithData
Description
Gives the specified player the specified quanity of the item id with the specified data by placing it in the first empty slot.
Arguments
String
Player's name
int
Id of item to give
int
Quantity of item to give
int
Decimal representation of the data value.
Returns
boolean True if the item was given. False will be returned if the player is not on the server. An exception could be throw for invalid data (data < 0 or data > 15).
Name
kickPlayer
Description
Kick a player with the specified name and the optional message.
Arguments
String
Name of player to kick
String
Custom message to display to the player after they are kicked
Returns
void
Name
opPlayer
Description
Ops the specified player.
Arguments
String
The name of the player to be opped.
Returns
void
Name
reloadServer
Description
Reloads the server, refreshing settings and plugin information.
Arguments
None
Returns
void
Name
removeEnchantmentsFromPlayerEnderchestSlot
Description
Removes an enchantment to the specified slot in the specified player's enderchest with the specified level.
Arguments
String
Player's name
int
Slot number
Object[]
Array of EID-values from here: http://www.minecraftwiki.net/wiki/Enchanting#Enchantment_Types
Returns
boolean True if the de-enchanting process was successful. False is usually the restult will be returned if the player is not on the server.
Name
removeEnchantmentsFromPlayerInventorySlot
Description
Removes an enchantment to the specified slot in the specified player's inventory with the specified level.
Arguments
String
Player's name
int
Slot number
Object[]
Array of EID-values from here: http://www.minecraftwiki.net/wiki/Enchanting#Enchantment_Types
Returns
boolean True if the de-enchanting process was successful. False is usually the restult will be returned if the player is not on the server.
Name
removeFromWhitelist
Description
Removes the specified player from the whitelist.
Arguments
String
The name of the player to be removed from the whitelist
Returns
void
Name
removePlayerInventoryItem
Description
Removes all items of the given type from the given player's inventory.
Arguments
String
Player's name
int
Id of block type to remove
Returns
Object An object of all the things that couldn't be removed. This shouldn't happen though. Null will be returned if the player is not on the server.
Name
renameFileOrFolder
Description
Renames the specified file or folder.
Arguments
String
The old path to the file or folder relative to the server root.
String
The new path to the file or folder relative to the server root.
Returns
boolean True if successful, false otherwise.
Name
runConsoleCommand
Description
Runs a command in the console.
Arguments
String
Command to send
Returns
void
Name
saveMap
Description
Saves the map to the filesystem.
Arguments
None
Returns
void
Name
saveOff
Description
Disables automatic terrian saving.
Arguments
None
Returns
void
Name
saveOn
Description
Enables automatic terrian saving.
Arguments
None
Returns
void
Name
sendMessage
Description
Send a private message to the specified player.
Arguments
String
Player to whom the message is sent
String
The message to send
Returns
void
Name
setBlockData
Description
Set the data value of the block in the specified world at the specified coordinate.
Arguments
String
The world name.
int
The x-coord of the block.
int
The y-coord of the block.
int
The z-coord of the block.
int
The decimal representation of the data value to set on the block.
Returns
void
Name
setBlockType
Description
Set the type of the block in the specified world at the specified coordinate.
Arguments
String
The world name.
int
The x-coord of the block.
int
The y-coord of the block.
int
The z-coord of the block.
int
The type ID to change the block to.
Returns
void
Name
setFileBinaryBase64
Description
Sets (not appends to) the contents of the specified binary file. The file path is relative to the folder that the craftbukkit jar is in. The second argument is base64 decoded and then set as the file's contents.
Arguments
String
The name of the file to read.
String
The base64 encoded content to put in the file.
Returns
boolean True if call succeeded. False will never be returned, instead an exception will be thrown and the call will not return as successful. This will occur if the specified file does not exist.
Name
setFileContents
Description
Sets (not appends to) the contents of the specified file. The file path is relative to the folder that the craftbukkit jar is in.
Arguments
String
The name of the file to read.
String
The content to put in the file.
Returns
boolean True if call succeeded. False will never be returned, instead an exception will be thrown and the call will not return as successful. This will occur if the specified file does not exist.
Name
setPlayerEnderchestSlot
Description
Sets the specified slot in the specified player's enderchest to the specified type with the specified quantity.
Arguments
String
Player's name
int
Slot number
String
Name of item
int
Quantity to set
Returns
boolean True if the item was given. False will be returned if the player is not on the server.
Name
setPlayerEnderchestSlotWithDamage
Description
Sets the specified slot in the specified player's inventory to the specified type with the specified quantity and damage.
Arguments
String
Player's name
int
Slot number
String
Name of item
int
The damage of the item.
int
Quantity to set
Returns
boolean True if the item was given. False will be returned if the player is not on the server.
Name
setPlayerEnderchestSlotWithData
Description
Sets the specified slot in the specified player's enderchest to the specified type with the specified data and damage.
Arguments
String
Player's name
int
Slot number
String
Name of item
int
The data of the item.
int
Quantity to set
Returns
boolean True if the item was given. False will be returned if the player is not on the server.
Name
setPlayerEnderchestSlotWithDataAndDamage
Description
Sets the specified slot in the specified player's enderchest to the specified type with the specified data, quantity and damage.
Arguments
String
Player's name
int
Slot number
String
Name of item
int
The data of the item.
int
The damage of the item.
int
Quantity to set
Returns
boolean True if the item was given. False will be returned if the player is not on the server.
Name
setPlayerEnderchestSlotWithDataDamageAndEnchantments
Description
Sets the specified slot in the specified player's enderchest to the specified type with the specified data, quantity and damage.
Arguments
String
Player's name
int
Slot number
String
Name of item
int
The data of the item.
int
The damage of the item.
int
Quantity to set
Object[]
Array of {enchantment: 0, level: 1}-esque objects where enchantment is the EID-value from here: http://www.minecraftwiki.net/wiki/Enchanting#Enchantment_Types
Returns
boolean True if the item was given. False will be returned if the player is not on the server.
Name
setPlayerExperience
Description
Sets a player's health on a scale of 0-4625 (level 50).
Arguments
String
The player's name.
int
The amount of experience to set.
Returns
boolean True on succes, false if the player is not on the server.
Name
setPlayerFoodLevel
Description
Sets a player's food level on a scale of 0-20.
Arguments
String
The player's name.
int
The amount of food to set.
Returns
boolean True on succes, false if the player is not on the server.
Name
setPlayerGameMode
Description
Sets the game mode for a player. 0 is creative. 1 is survivial.
Arguments
String
The player's name.
int
The game mode.
Returns
boolean True on succes, false if the player is not on the server.
Name
setPlayerHealth
Description
Sets a player's health on a scale of 0-20.
Arguments
String
The player's name.
int
The amount of health to set.
Returns
boolean True on succes, false if the player is not on the server.
Name
setPlayerInventorySlot
Description
Sets the specified slot in the specified player's inventory to the specified type with the specified quantity.
Arguments
String
Player's name
int
Slot number
int
Id of block type to set
int
Quantity to set
Returns
boolean True if the item was given. False will be returned if the player is not on the server.
Name
setPlayerInventorySlotWithDamage
Description
Sets the specified slot in the specified player's inventory to the specified type with the specified quantity and damage.
Arguments
String
Player's name
int
Slot number
int
Id of block type to set
int
The damage of the item.
int
Quantity to set
Returns
boolean True if the item was given. False will be returned if the player is not on the server.
Name
setPlayerInventorySlotWithData
Description
Sets the specified slot in the specified player's inventory to the specified type with the specified data and damage.
Arguments
String
Player's name
int
Slot number
int
Id of block type to set
int
The data of the item.
int
Quantity to set
Returns
boolean True if the item was given. False will be returned if the player is not on the server.
Name
setPlayerInventorySlotWithDataAndDamage
Description
Sets the specified slot in the specified player's inventory to the specified type with the specified data, quantity and damage.
Arguments
String
Player's name
int
Slot number
int
Id of block type to set
int
The data of the item.
int
The damage of the item.
int
Quantity to set
Returns
boolean True if the item was given. False will be returned if the player is not on the server.
Name
setPlayerInventorySlotWithDataDamageAndEnchantments
Description
Sets the specified slot in the specified player's inventory to the specified type with the specified data, quantity and damage.
Arguments
String
Player's name
int
Slot number
int
Id of block type to set
int
The data of the item.
int
The damage of the item.
int
Quantity to set
Object[]
Array of {enchantment: 0, level: 1}-esque objects where enchantment is the EID-value from here: http://www.minecraftwiki.net/wiki/Enchanting#Enchantment_Types
Returns
boolean True if the item was given. False will be returned if the player is not on the server.
Name
setPlayerLevel
Description
Sets a player's level on a scale of 0-50.
Arguments
String
The player's name.
int
The level to set.
Returns
boolean True on succes, false if the player is not on the server.
Name
setWorldTime
Description
Sets the time for a given world.
Arguments
String
The world's name.
int
Time (from 0-24000), 6000 is dawn, 24000 is midnight.
Returns
boolean True on succes, false if the world does not exist.
Name
takePlayerEnderchest
Description
Take an item of a player enderchest when it online/offline .
Arguments
String
Players' name
String
Item Name
int
Quantity of items
Returns
boolean Return true if item taken from enderchest, return false if playername not exists or item not available or itemname not exist
Name
takePlayerInventory
Description
Take an item of a player inventory when it online/offline .
Arguments
String
Players' name
String
Item Name
int
Quantity of items
Returns
boolean Return true if item taken from inventory, return false if playername not exists or item not available or itemname not exist
Name
teleport
Description
Teleports the first specified player to the second specified player.
Arguments
String
The name of the player to be teleported.
String
The name of the player to teleport to.
Returns
R e
Name
teleportPlayerToLocation
Description
Teleports the specified player to the specified x, y and z co-ordinates.
Arguments
String
The player name.
int
The x-coord of the block.
int
The y-coord of the block.
int
The z-coord of the block.
Returns
boolean True if successful, false otherwise.
Name
teleportPlayerToWorldLocation
Description
Teleports the specified player to the specified world and xyz co-ordinates.
Arguments
String
The player name.
String
The world name.
int
The x-coord of the block.
int
The y-coord of the block.
int
The z-coord of the block.
Returns
boolean True if successful, false otherwise.
Name
unban
Description
Unbans the specified player.
Arguments
String
The name of the player to be unbanned.
Returns
void
Name
unbanIP
Description
Bans the specified IP.
Arguments
String
The IP to be unbanned.
Returns
void
Name
updatePlayerEnderchestSlot
Description
Changes the number of items in a player's enderchest slot.
Arguments
String
Player's name
int
Slot number
int
New amount
Returns
boolean True if the slot was update. False will be returned if the player is not on the server.
Name
updatePlayerInventorySlot
Description
Changes the number of items in a player's inventory slot.
Arguments
String
Player's name
int
Slot number
int
New amount
Returns
boolean True if the slot was update. False will be returned if the player is not on the server.