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.

To download PHP Call file click on the button below !

Available method packages

Dependencies
  • JSONAPI
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 item
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.
String
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.
Dependencies
  • JSONAPI
  • Vault
Methods
Name
chat.getGroupPrefix
Description
Get group prefix
Arguments
String
World name
String
Group name
Returns
String Prefix
Name
chat.getGroupSuffix
Description
Get group suffix
Arguments
String
World name
String
Group name
Returns
String Suffix
Name
chat.getGroups
Description
Returns a list of all known groups
Arguments
None
Returns
String[] A list of all known groups.
Name
chat.getPlayerGroups
Description
Gets the list of groups that this player has
Arguments
String
World name
String
Player name
Returns
String[] A list of all known groups for a user.
Name
chat.getPlayerPrefix
Description
Get player prefix
Arguments
String
World name
String
Player name
Returns
String Prefix
Name
chat.getPlayerSuffix
Description
Get player suffix
Arguments
String
World name
String
Player name
Returns
String Suffix
Name
chat.getPrimaryGroup
Description
Get player primary group
Arguments
String
World name
String
Player name
Returns
String Group name
Name
chat.isEnabled
Description
Checks if chat methods are enabled.
Arguments
None
Returns
boolean Success or Failure
Name
chat.playerInGroup
Description
Check if player is member of a group.
Arguments
String
World name
String
Player name
String
Group name
Returns
boolean Success or Failure
Name
chat.setGroupPrefix
Description
Set group prefix
Arguments
String
World name
String
Group name
String
Prefix
Returns
String Prefix
Name
chat.setGroupSuffix
Description
Set group suffix
Arguments
String
World name
String
Group name
String
Suffix
Returns
String Suffix
Name
chat.setPlayerPrefix
Description
Set player prefix
Arguments
String
World name
String
Player name
String
Prefix
Returns
String Prefix
Name
chat.setPlayerSuffix
Description
Set player suffix
Arguments
String
World name
String
Player name
String
Suffix
Returns
String Suffix
Dependencies
  • dynmap
Methods
Name
dynmap.getHost
Description
Returns the IP/hostname that the dynmap webserver is running on.
Arguments
None
Returns
String The dynmap port as a string.
Name
dynmap.getPort
Description
Returns the port that the dynmap webserver is running on.
Arguments
None
Returns
String The dynmap port as an integer.
Dependencies
  • JSONAPI
  • Vault
Methods
Name
econ.bankBalance
Description
Returns the amount the bank has
Arguments
String
name -
Returns
EconomyResponse
Name
econ.bankDeposit
Description
Deposit an amount into a bank account
Arguments
String
name -
double
amount -
Returns
EconomyResponse
Name
econ.bankHas
Description
Returns true or false whether the bank has the amount specified
Arguments
String
name -
double
amount -
Returns
EconomyResponse
Name
econ.bankWithdraw
Description
Withdraw an amount from a bank account
Arguments
String
name -
double
amount -
Returns
EconomyResponse
Name
econ.createBank
Description
Creates a bank account with the specified name and the player as the owner
Arguments
String
name -
String
player -
Returns
EconomyResponse
Name
econ.createPlayerAccount
Description
Attempts to create a player account for the given player
Arguments
String
Returns
boolean if the account creation was successful
Name
econ.currencyNamePlural
Description
Returns the name of the currency in plural form. If the economy being used does not support currency names then an empty string will be returned.
Arguments
None
Returns
String name of the currency (plural)
Name
econ.currencyNameSingular
Description
Returns the name of the currency in singular form. If the economy being used does not support currency names then an empty string will be returned.
Arguments
None
Returns
String name of the currency (singular)
Name
econ.deleteBank
Description
Deletes a bank account with the specified name.
Arguments
String
name -
Returns
EconomyResponse if the operation completed successfully
Name
econ.depositPlayer
Description
Deposit an amount to a player
Arguments
String
playerName - Name of player
double
amount - Amount to deposit
Returns
EconomyResponse Detailed response of transaction
Name
econ.format
Description
Format amount into a human readable String This provides translation into economy specific formatting to improve consistency between plugins.
Arguments
double
amount -
Returns
String Human readable string describing amount
Name
econ.getBalance
Description
Gets balance of a player
Arguments
String
playerName -
Returns
double Amount currently held in players account
Name
econ.getBanks
Description
Gets the list of banks
Arguments
None
Returns
String[] the List of Banks
Name
econ.getName
Description
Gets name of permission method
Arguments
None
Returns
String Name of Permission Method
Name
econ.has
Description
Checks if the player account has the amount
Arguments
String
playerName -
double
amount -
Returns
boolean
Name
econ.hasAccount
Description
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 as all major economy plugins auto-generate a player account when the player joins the server
Arguments
String
playerName -
Returns
boolean if the player has an account
Name
econ.hasBankSupport
Description
Returns true if the given implementation supports banks.
Arguments
None
Returns
boolean true if the implementation supports banks
Name
econ.isBankMember
Description
Check if the player is a member of the bank account
Arguments
String
name -
String
playerName -
Returns
EconomyResponse
Name
econ.isBankOwner
Description
Check if a player is the owner of a bank account
Arguments
String
name -
String
playerName -
Returns
EconomyResponse
Name
econ.isEnabled
Description
Checks if economy method is enabled.
Arguments
None
Returns
boolean Success or Failure
Name
econ.withdrawPlayer
Description
Withdraw an amount from a player
Arguments
String
playerName - Name of player
double
amount - Amount to withdraw
Returns
EconomyResponse Detailed response of transaction
Dependencies
  • JSONAPI
Methods
Name
fs.append
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
fs.createFile
Description
Creates a empty file at the given path.
Arguments
String
Path to file
Returns
String Path to file
Name
fs.createFolder
Description
Makes a new folder.
Arguments
String
Path to file
Returns
String Path to folder
Name
fs.delete
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
fs.listDirectory
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
fs.move
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
fs.read
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
fs.readBinary
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
fs.write
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
fs.writeBinary
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.
Dependencies
  • JSONAPI
  • Vault
Methods
Name
permissions.addPermission
Description
Add a permission node for a player.
Arguments
String
The player's name.
String
The permission node.
Boolean
The value to assign to the node.
Returns
boolean Success?
Name
permissions.addPlayerToGroup
Description
Add a group for a player.
Arguments
String
The player's name.
String
The group name.
Returns
boolean Success?
Name
permissions.getAllGroups
Description
Retrieves all groups.
Arguments
None
Returns
String[] All the groups in use on the server.
Name
permissions.getAllPermissions
Description
Retrieves all permissions for all players.
Arguments
None
Returns
Object A map from player to a list of permission settings.
Name
permissions.getGroups
Description
Gets the groups for a specific player.
Arguments
String
The player's name.
Returns
String[] Gets all the groups for a player.
Name
permissions.getPermissions
Description
Gets the permissions for a specific player.
Arguments
String
The player's name.
Returns
Object[] Gets all the permissions and their values for a player.
Name
permissions.removePermission
Description
Removes a permission node for a player.
Arguments
String
The player's name.
String
The permission node.
Returns
boolean Success?
Name
permissions.removePlayerFromGroup
Description
Remove a group from a player.
Arguments
String
The player's name.
String
The group name.
Returns
boolean Success?
Dependencies
  • RemoteToolkitPlugin
Methods
Name
remotetoolkit.rescheduleServerRestart
Description
Reschedules the next server restart. The time parameter can either be in either the #h #m #s format, or the HH:MM format.
Arguments
String
Time in either the #h #m #s format, or the HH:MM format.
Returns
boolean False on error. Null otherwise.
Name
remotetoolkit.restartServer
Description
Restarts the Minecraft server. THIS WILL TAKE DOWN JSONAPI FOR A SHORT TIME.
Arguments
None
Returns
boolean False on error. Null otherwise.
Name
remotetoolkit.startServer
Description
Starts the Minecraft server. DO NOT CALL IF remotetookit.stopServer HAS NOT BEEN CALLED!
Arguments
None
Returns
boolean True if successful, false otherwise.
Name
remotetoolkit.stopServer
Description
Stops the Minecraft server. THIS WILL SHUT THE SERVER DOWN AND WILL NOT RESTART IT.
Arguments
None
Returns
boolean False on error. Null otherwise.
Dependencies
  • JSONAPI
Methods
Name
system.getCpuCores
Description
Returns cpu cores
Arguments
None
Returns
int Cpu cores
Name
system.getCpuCurrentFreq
Description
Returns current cpu frequency
Arguments
boolean
format
Returns
String Current cpu frequency
Name
system.getCpuFreq
Description
Returns cpu base frequency
Arguments
boolean
format
Returns
String Cpu base frequency
Name
system.getCpuModel
Description
Returns cpu model
Arguments
None
Returns
String Cpu model
Name
system.getCpuThreads
Description
Returns cpu threads
Arguments
None
Returns
int Cpu threads
Name
system.getDiskFreeSpace
Description
Returns the number of free byte on the disk that Minecraft is located on.
Arguments
None
Returns
int Disk free space in megabytes
Name
system.getDiskSize
Description
Gets the total size of the disk that Minecraft is located on.
Arguments
None
Returns
int Disk size in megabytes
Name
system.getDiskUsage
Description
Returns the number of bytes that have been used on the disk that Minecraft is located on.
Arguments
None
Returns
int Disk usage in megabytes
Name
system.getHostMaxMemory
Description
Returns maximum memory
Arguments
boolean
format
Returns
String host maximum memory
Name
system.getHostMemory
Description
Returns host memory
Arguments
boolean
format
Returns
String host memory
Name
system.getJavaMemoryTotal
Description
Gets the amount of memory available to Java/Bukkit/Minecraft. Note that is not a measurement of all the memory in the machine. To find system wide information look at getSystemMemoryTotal.
Arguments
None
Returns
int Java memory size in megabytes
Name
system.getJavaMemoryUsage
Description
Gets the amount of memory used by Java/Bukkit/Minecraft. Note that is not a measurement of all the memory used in the machine. To find system wide information look at getSystemMemoryUsage.
Arguments
None
Returns
int Java memory usage in megabytes
Name
system.getServerClockDebug
Description
Returns expectedTicks, elapsedTicks, C, expectedClockRate, expectedTime, elapsedTime and % error
Arguments
None
Returns
Object key value pairs with all the values in the descriptions
Dependencies
  • JSONAPI
Methods
Name
world.getChestContents
Description
Gets all the items in a chest.
Arguments
String
The world the chest is in.
int
The x-pos of the chest.
int
The y-pos of the chest.
int
The z-pos of the chest.
Returns
Object[] The chest's inventory.
Name
world.getSignText
Description
Gets all the lines of text on a sign.
Arguments
String
The world the sign is in.
int
The x-pos of the sign.
int
The y-pos of the sign.
int
The z-pos of the sign.
Returns
String[] The lines of text on a sign.
Name
world.setChestSlot
Description
Sets the specified quanity of the item id by placing it in the specified slot.
Arguments
String
The world the chest is in.
int
The x-pos of the chest.
int
The y-pos of the chest.
int
The z-pos of the chest.
int
Slot number
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 chest is not on the server.
Name
world.setChestSlotWithData
Description
Sets the specified quanity of the item id with the specified data by placing it in the specified slot.
Arguments
String
The world the chest is in.
int
The x-pos of the chest.
int
The y-pos of the chest.
int
The z-pos of the chest.
int
Slot number
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 set. False will be returned if the chest is not on the server. An exception could be thrown for invalid data (data < 0 or data > 15).
Name
world.setSignText
Description
Sets all the lines of text on a sign.
Arguments
String
The world the sign is in.
int
The x-pos of the sign.
int
The y-pos of the sign.
int
The z-pos of the sign.
String[]
4 lines of text for the sign.
Returns
boolean Success?
Name
world.setSignTextLine
Description
Sets a single line of text on a sign.
Arguments
String
The world the sign is in.
int
The x-pos of the sign.
int
The y-pos of the sign.
int
The z-pos of the sign.
int
The line of text to set.
String
The line.
Returns
boolean Success?
Name
world.spawn
Description
Spawn an entity at the given location in the give world.
Arguments
String
The world to spawn the entity into.
double
The x-pos for the entity
double
The y-pos for the entity
double
The z-pos for the entity
String
The name of the mob/entity to spawn. Comes from this list (case-sensitive): http://jd.bukkit.org/apidocs/org/bukkit/entity/EntityType.html#enum_constant_summary
Returns
boolean True if the entity was successfully spawned. False otherwise.