CountNonAirBlocks={Params="",Return="number",Notes="Returns the count of blocks that are not air. Returns 0 if blocktypes not available. Block metas are ignored (if present, air with any meta is still considered air)."},
{Params="BlockType",Return="number",Notes="Counts the number of occurences of the specified blocktype contained in the area."},
{Params="BlockType, BlockMeta",Return="number",Notes="Counts the number of occurrences of the specified blocktype + blockmeta combination contained in the area."},
Create={Params="SizeX, SizeY, SizeZ, [DataTypes]",Return="",Notes="Initializes this BlockArea to an empty area of the specified size and origin of {0, 0, 0}. Any previous contents are lost."},
Crop={Params="AddMinX, SubMaxX, AddMinY, SubMaxY, AddMinZ, SubMaxZ",Return="",Notes="Crops the specified number of blocks from each border. Modifies the size of this blockarea object."},
DumpToRawFile={Params="FileName",Return="",Notes="Dumps the raw data into a file. For debugging purposes only."},
Expand={Params="SubMinX, AddMaxX, SubMinY, AddMaxY, SubMinZ, AddMaxZ",Return="",Notes="Expands the specified number of blocks from each border. Modifies the size of this blockarea object. New blocks created with this operation are filled with zeroes."},
Fill={Params="DataTypes, BlockType, [BlockMeta], [BlockLight], [BlockSkyLight]",Return="",Notes="Fills the entire block area with the same values, specified. Uses the DataTypes param to determine which content types are modified."},
{Params="{{cCuboid|RelCuboid}}, DataTypes, BlockType, [BlockMeta], [BlockLight], [BlockSkyLight]",Return="",Notes="Fills the specified cuboid (in relative coords) with the same values (like Fill() )."},
{Params="MinRelX, MaxRelX, MinRelY, MaxRelY, MinRelZ, MaxRelZ, DataTypes, BlockType, [BlockMeta], [BlockLight], [BlockSkyLight]",Return="",Notes="Fills the specified cuboid with the same values (like Fill() )."},
GetBlockLight={Params="BlockX, BlockY, BlockZ",Return="NIBBLETYPE",Notes="Returns the blocklight at the specified absolute coords"},
GetBlockMeta={Params="BlockX, BlockY, BlockZ",Return="NIBBLETYPE",Notes="Returns the block meta at the specified absolute coords"},
GetBlockSkyLight={Params="BlockX, BlockY, BlockZ",Return="NIBBLETYPE",Notes="Returns the skylight at the specified absolute coords"},
GetBlockType={Params="BlockX, BlockY, BlockZ",Return="BLOCKTYPE",Notes="Returns the block type at the specified absolute coords"},
GetBlockTypeMeta={Params="BlockX, BlockY, BlockZ",Return="BLOCKTYPE, NIBBLETYPE",Notes="Returns the block type and meta at the specified absolute coords"},
GetNonAirCropRelCoords={Params="[IgnoreBlockType]",Return="MinRelX, MinRelY, MinRelZ, MaxRelX, MaxRelY, MaxRelZ",Notes="Returns the minimum and maximum coords in each direction for the first non-ignored block in each direction. If there are no non-ignored blocks within the area, or blocktypes are not present, the returned values are reverse-ranges (MinX <- m_RangeX, MaxX <- 0 etc.). IgnoreBlockType defaults to air."},
GetRelBlockTypeMeta={Params="RelBlockX, RelBlockY, RelBlockZ",Return="BLOCKTYPE, NIBBLETYPE",Notes="Returns the block type and meta at the specified relative coords"},
GetWEOffset={Params="",Return="{{Vector3i}}",Notes="Returns the WE offset, a data value sometimes stored in the schematic files. Cuberite doesn't use this value, but provides access to it using this method. The default is {0, 0, 0}."},
HasBlockLights={Params="",Return="bool",Notes="Returns true if current datatypes include blocklight"},
HasBlockMetas={Params="",Return="bool",Notes="Returns true if current datatypes include block metas"},
HasBlockSkyLights={Params="",Return="bool",Notes="Returns true if current datatypes include skylight"},
HasBlockTypes={Params="",Return="bool",Notes="Returns true if current datatypes include block types"},
LoadFromSchematicFile={Params="FileName",Return="",Notes="Clears current content and loads new content from the specified schematic file. Returns true if successful. Returns false and logs error if unsuccessful, old content is preserved in such a case."},
LoadFromSchematicString={Params="SchematicData",Return="",Notes="Clears current content and loads new content from the specified string (assumed to contain .schematic data). Returns true if successful. Returns false and logs error if unsuccessful, old content is preserved in such a case."},
{Params="BlockAreaSrc, {{Vector3i|RelMinCoords}}, Strategy",Return="",Notes="Merges BlockAreaSrc into this object at the specified relative coords, using the specified strategy"},
{Params="BlockAreaSrc, RelX, RelY, RelZ, Strategy",Return="",Notes="Merges BlockAreaSrc into this object at the specified relative coords, using the specified strategy"},
MirrorXY={Params="",Return="",Notes="Mirrors this block area around the XY plane. Modifies blocks' metas (if present) to match (i. e. furnaces facing the opposite direction)."},
MirrorXYNoMeta={Params="",Return="",Notes="Mirrors this block area around the XY plane. Doesn't modify blocks' metas."},
MirrorXZ={Params="",Return="",Notes="Mirrors this block area around the XZ plane. Modifies blocks' metas (if present)"},
MirrorXZNoMeta={Params="",Return="",Notes="Mirrors this block area around the XZ plane. Doesn't modify blocks' metas."},
MirrorYZ={Params="",Return="",Notes="Mirrors this block area around the YZ plane. Modifies blocks' metas (if present)"},
MirrorYZNoMeta={Params="",Return="",Notes="Mirrors this block area around the YZ plane. Doesn't modify blocks' metas."},
{Params="World, {{cCuboid|Cuboid}}, DataTypes",Return="bool",Notes="Reads the area from World, returns true if successful"},
{Params="World, {{Vector3i|Point1}}, {{Vector3i|Point2}}, DataTypes",Return="bool",Notes="Reads the area from World, returns true if successful"},
{Params="World, X1, X2, Y1, Y2, Z1, Z2, DataTypes",Return="bool",Notes="Reads the area from World, returns true if successful"},
},
RelLine=
{
{Params="{{Vector3i|RelPoint1}}, {{Vector3i|RelPoint2}}, DataTypes, BlockType, [BlockMeta], [BlockLight], [BlockSkyLight]",Return="",Notes="Draws a line between the two specified points. Sets only datatypes specified by DataTypes (baXXX constants)."},
{Params="RelX1, RelY1, RelZ1, RelX2, RelY2, RelZ2, DataTypes, BlockType, [BlockMeta], [BlockLight], [BlockSkyLight]",Return="",Notes="Draws a line between the two specified points. Sets only datatypes specified by DataTypes (baXXX constants)."},
RotateCCW={Params="",Return="",Notes="Rotates the block area around the Y axis, counter-clockwise (east -> north). Modifies blocks' metas (if present) to match."},
RotateCCWNoMeta={Params="",Return="",Notes="Rotates the block area around the Y axis, counter-clockwise (east -> north). Doesn't modify blocks' metas."},
RotateCW={Params="",Return="",Notes="Rotates the block area around the Y axis, clockwise (north -> east). Modifies blocks' metas (if present) to match."},
RotateCWNoMeta={Params="",Return="",Notes="Rotates the block area around the Y axis, clockwise (north -> east). Doesn't modify blocks' metas."},
SaveToSchematicFile={Params="FileName",Return="",Notes="Saves the current contents to a schematic file. Returns true if successful."},
SaveToSchematicString={Params="",Return="string",Notes="Saves the current contents to a string (in a .schematic file format). Returns the data if successful, nil if failed."},
SetBlockTypeMeta={Params="BlockX, BlockY, BlockZ, BlockType, BlockMeta",Return="",Notes="Sets the block type and meta at the specified absolute coords"},
{Params="{{Vector3i|Origin}}",Return="",Notes="Resets the origin for the absolute coords. Only affects how absolute coords are translated into relative coords."},
{Params="OriginX, OriginY, OriginZ",Return="",Notes="Resets the origin for the absolute coords. Only affects how absolute coords are translated into relative coords."},
SetRelBlockTypeMeta={Params="RelBlockX, RelBlockY, RelBlockZ, BlockType, BlockMeta",Return="",Notes="Sets the block type and meta at the specified relative coords"},
{Params="{{Vector3i|Offset}}",Return="",Notes="Sets the WE offset, a data value sometimes stored in the schematic files. Mostly used for WorldEdit. Cuberite doesn't use this value, but provides access to it using this method."},
{Params="OffsetX, OffsetY, OffsetZ",Return="",Notes="Sets the WE offset, a data value sometimes stored in the schematic files. Mostly used for WorldEdit. Cuberite doesn't use this value, but provides access to it using this method."},
{Params="World, {{Vector3i|MinPoint}}, DataTypes",Return="bool",Notes="Writes the area into World at the specified coords, returns true if successful"},
{Params="World, MinX, MinY, MinZ, DataTypes",Return="bool",Notes="Writes the area into World at the specified coords, returns true if successful"},
{Params="{{cCuboid|RelCuboid}}, BlockType, BlockMeta",Return="",Notes="Fills the cuboid, specified in relative coords, by the specified block type and block meta. The cuboid may reach outside of the chunk, only the part intersecting with this chunk is filled."},
{Params="MinRelX, MaxRelX, MinRelY, MaxRelY, MinRelZ, MaxRelZ, BlockType, BlockMeta",Return="",Notes="Fills the cuboid, specified in relative coords, by the specified block type and block meta. The cuboid may reach outside of the chunk, only the part intersecting with this chunk is filled."},
},
FloorRelCuboid=
{
{Params="{{cCuboid|RelCuboid}}, BlockType, BlockMeta",Return="",Notes="Fills those blocks of the cuboid (specified in relative coords) that are considered non-floor (air, water) with the specified block type and meta. Cuboid may reach outside the chunk, only the part intersecting with this chunk is filled."},
{Params="MinRelX, MaxRelX, MinRelY, MaxRelY, MinRelZ, MaxRelZ, BlockType, BlockMeta",Return="",Notes="Fills those blocks of the cuboid (specified in relative coords) that are considered non-floor (air, water) with the specified block type and meta. Cuboid may reach outside the chunk, only the part intersecting with this chunk is filled."},
GetBlockEntity={Params="RelX, RelY, RelZ",Return="{{cBlockEntity}} descendant",Notes="Returns the block entity for the block at the specified coords. Creates it if it doesn't exist. Returns nil if the block has no block entity capability."},
{Params="{{cCuboid|RelCuboid}}, BlockType, BlockMeta, RandomSeed, ChanceOutOf10k",Return="",Notes="Fills the specified relative cuboid with block type and meta in random locations. RandomSeed is used for the random number genertion (same seed produces same results); ChanceOutOf10k specifies the density (how many out of every 10000 blocks should be filled). Cuboid may reach outside the chunk, only the part intersecting with this chunk is filled."},
{Params="MinRelX, MaxRelX, MinRelY, MaxRelY, MinRelZ, MaxRelZ, BlockType, BlockMeta, RandomSeed, ChanceOutOf10k",Return="",Notes="Fills the specified relative cuboid with block type and meta in random locations. RandomSeed is used for the random number genertion (same seed produces same results); ChanceOutOf10k specifies the density (how many out of every 10000 blocks should be filled). Cuboid may reach outside the chunk, only the part intersecting with this chunk is filled."},
},
ReadBlockArea={Params="{{cBlockArea|BlockArea}}, MinRelX, MaxRelX, MinRelY, MaxRelY, MinRelZ, MaxRelZ",Return="",Notes="Reads data from the chunk into the block area object. Block types and metas are processed."},
ReplaceRelCuboid=
{
{Params="{{cCuboid|RelCuboid}}, SrcType, SrcMeta, DstType, DstMeta",Return="",Notes="Replaces all SrcType+SrcMeta blocks in the cuboid (specified in relative coords) with DstType+DstMeta blocks. Cuboid may reach outside the chunk, only the part intersecting with this chunk is filled."},
{Params="MinRelX, MaxRelX, MinRelY, MaxRelY, MinRelZ, MaxRelZ, SrcType, SrcMeta, DstType, DstMeta",Return="",Notes="Replaces all SrcType+SrcMeta blocks in the cuboid (specified in relative coords) with DstType+DstMeta blocks. Cuboid may reach outside the chunk, only the part intersecting with this chunk is filled."},
UpdateHeightmap={Params="",Return="",Notes="Updates the heightmap to match current contents. The plugins should do that if they modify the contents and don't modify the heightmap accordingly; Cuberite expects (and checks in Debug mode) that the heightmap matches the contents when the cChunkDesc is returned from a plugin."},
GenerateOfflineUUID={Params="Username",Return="string",Notes="(STATIC) Generates an UUID based on the player name provided. This is used for the offline (non-auth) mode, when there's no UUID source. Each username generates a unique and constant UUID, so that when the player reconnects with the same name, their UUID is the same. Returns a 32-char UUID (no dashes)."},
GetIPString={Params="",Return="string",Notes="Returns the IP address of the connection, as a string. Only the address part is returned, without the port number."},
GetLocale={Params="",Return="Locale",Notes="Returns the locale string that the client sends as part of the protocol handshake. Can be used to provide localized strings."},
GetPlayer={Params="",Return="{{cPlayer|cPlayer}}",Notes="Returns the player object connected to this client. Note that this may be nil, for example if the player object is not yet spawned."},
GetProtocolVersion={Params="",Return="number",Notes="Returns the protocol version number of the protocol that the client is talking. Returns zero if the protocol version is not (yet) known."},
GetUUID={Params="",Return="string",Notes="Returns the authentication-based UUID of the client. This UUID should be used to identify the player when persisting any player-related data. Returns a 32-char UUID (no dashes)"},
HasPluginChannel={Params="ChannelName",Return="bool",Notes="Returns true if the client has registered to receive messages on the specified plugin channel."},
IsUUIDOnline={Params="UUID",Return="bool",Notes="(STATIC) Returns true if the UUID is generated by online auth, false if it is an offline-generated UUID. We use Version-3 UUIDs for offline UUIDs, online UUIDs are Version-4, thus we can tell them apart. Accepts both 32-char and 36-char UUIDs (with and without dashes). If the string given is not a valid UUID, returns false."},
SetClientBrand={Params="ClientBrand",Return="",Notes="Sets the value of the client's brand. Normally this value is received from the client by a MC|Brand plugin message, this function lets plugins overwrite the value."},
SetLocale={Params="Locale",Return="",Notes="Sets the locale that Cuberite keeps on record. Initially the locale is initialized in protocol handshake, this function allows plugins to override the stored value (but only server-side and only until the user disconnects)."},
SendBlockChange={Params="BlockX, BlockY, BlockZ, BlockType, BlockMeta",Return="",Notes="Sends a BlockChange packet to the client. This can be used to create fake blocks only for that player."},
SendEntityAnimation={Params="{{cEntity|Entity}}, AnimationNumber",Return="",Notes="Sends the specified animation of the specified entity to the client. The AnimationNumber is protocol-specific."},
SendSoundEffect={Params="SoundName, X, Y, Z, Volume, Pitch",Return="",Notes="Sends a sound effect request to the client. The sound is played at the specified coords, with the specified volume (a float, 1.0 is full volume, can be more) and pitch (0-255, 63 is 100%)"},
SendTimeUpdate={Params="WorldAge, TimeOfDay, DoDaylightCycle",Return="",Notes="Sends the specified time update to the client. WorldAge is the total age of the world, in ticks. TimeOfDay is the current day's time, in ticks (0 - 24000). DoDaylightCycle is a bool that specifies whether the client should automatically move the sun (true) or keep it in the same place (false)."},
{Params="",Return="",Notes="Creates an empty chat message"},
{Params="Text",Return="",Notes="Creates a chat message containing the specified text, parsed by the ParseText() function. This allows easy migration from old chat messages."},
},
AddRunCommandPart={Params="Text, Command, [Style]",Return="self",Notes="Adds a text which, when clicked, runs the specified command. Chaining."},
AddSuggestCommandPart={Params="Text, Command, [Style]",Return="self",Notes="Adds a text which, when clicked, puts the specified command into the player's chat input area. Chaining."},
AddTextPart={Params="Text, [Style]",Return="self",Notes="Adds a regular text. Chaining."},
AddUrlPart={Params="Text, Url, [Style]",Return="self",Notes="Adds a text which, when clicked, opens up a browser at the specified URL. Chaining."},
Clear={Params="",Return="",Notes="Removes all parts from this object"},
CreateJsonString={Params="[AddPrefixes]",Return="string",Notes="Returns the entire object serialized into JSON, as it would be sent to a client. AddPrefixes specifies whether the chat prefixes should be prepended to the message, true by default."},
ExtractText={Params="",Return="string",Notes="Returns the text from the parts that comprises the human-readable data. Used for older protocols that don't support composite chat and for console-logging."},
GetAdditionalMessageTypeData={Params="",Return="string",Notes="Returns the AdditionalData associated with the message, such as the sender's name for mtPrivateMessage"},
GetMessageType={Params="",Return="MessageType",Notes="Returns the MessageType (mtXXX constant) that is associated with this message. When sent to a player, the message will be formatted according to this message type and the player's settings (adding \"[INFO]\" prefix etc.)"},
ParseText={Params="Text",Return="self",Notes="Adds text, while recognizing http and https URLs and old-style formatting codes (\"@2\"). Chaining."},
SetMessageType={Params="MessageType, AdditionalData",Return="self",Notes="Sets the MessageType (mtXXX constant) that is associated with this message. Also sets the additional data (string) associated with the message, which is specific for the message type - such as the sender's name for mtPrivateMessage. When sent to a player, the message will be formatted according to this message type and the player's settings (adding \"[INFO]\" prefix etc.). Chaining."},
UnderlineUrls={Params="",Return="self",Notes="Makes all URL parts contained in the message underlined. Doesn't affect parts added in the future. Chaining."},
constructor={Params="Width, Height",Return="cCraftingGrid",Notes="Creates a new CraftingGrid object. This new crafting grid is not related to any player, but may be needed for {{cCraftingRecipe}}'s ConsumeIngredients function."},
ConsumeGrid={Params="{{cCraftingGrid|CraftingGrid}}",Return="",Notes="Consumes items specified in CraftingGrid from the current contents. Used internally by {{cCraftingRecipe}}'s ConsumeIngredients() function, but available to plugins, too."},
md5={Params="Data",Return="string",Notes="(STATIC) Calculates the md5 hash of the data, returns it as a raw (binary) string of 16 characters."},
md5HexString={Params="Data",Return="string",Notes="(STATIC) Calculates the md5 hash of the data, returns it as a hex-encoded string of 32 characters."},
sha1={Params="Data",Return="string",Notes="(STATIC) Calculates the sha1 hash of the data, returns it as a raw (binary) string of 20 characters."},
sha1HexString={Params="Data",Return="string",Notes="(STATIC) Calculates the sha1 hash of the data, returns it as a hex-encoded string of 40 characters."},
{Params="",Return="cEnchantments",Notes="Creates a new empty cEnchantments object"},
{Params="StringSpec",Return="cEnchantments",Notes="Creates a new cEnchantments object filled with enchantments based on the string description"},
},
operator_eq={Params="OtherEnchantments",Return="bool",Notes="Returns true if this enchantments object has the same enchantments as OtherEnchantments."},
AddFromString={Params="StringSpec",Return="",Notes="Adds the enchantments in the string description into the object. If a specified enchantment already existed, it is overwritten."},
Clear={Params="",Return="",Notes="Removes all enchantments"},
GetLevel={Params="EnchantmentNumID",Return="number",Notes="Returns the level of the specified enchantment stored in this object; 0 if not stored"},
IsEmpty={Params="",Return="bool",Notes="Returns true if the object stores no enchantments"},
SetLevel={Params="EnchantmentNumID, Level",Return="",Notes="Sets the level for the specified enchantment, adding it if not stored before or removing it if level < = 0"},
StringToEnchantmentID={Params="EnchantmentTextID",Return="number",Notes="(static) Returns the enchantment numerical ID, -1 if not understood. Case insensitive. Also understands plain numbers."},
ArmorCoversAgainst={Params="{{cEntity|AttackerEntity}}, DamageType, RawDamage",Return="number",Notes="Returns the points out of a_RawDamage that the currently equipped armor would cover."},
GetAirLevel={Params="",Return="number",Notes="Returns the air level (number of ticks of air left). Note, this function is only updated with mobs or players."},
GetArmorCoverAgainst={Params="AttackerEntity, DamageType, RawDamage",Return="number",Notes="Returns the number of hitpoints out of RawDamage that the currently equipped armor would cover. See {{TakeDamageInfo}} for more information on attack damage."},
GetClassStatic={Params="",Return="string",Notes="Returns the entity classname that this class implements. Each descendant overrides this function. Is static"},
GetEntityType={Params="",Return="{{cEntity#EntityType|EntityType}}",Notes="Returns the type of the entity, one of the {{cEntity#EntityType|etXXX}} constants. Note that to check specific entity type, you should use one of the IsXXX functions instead of comparing the value returned by this call."},
GetEquippedBoots={Params="",Return="{{cItem}}",Notes="Returns the boots that the entity has equipped. Returns an empty cItem if no boots equipped or not applicable."},
GetEquippedChestplate={Params="",Return="{{cItem}}",Notes="Returns the chestplate that the entity has equipped. Returns an empty cItem if no chestplate equipped or not applicable."},
GetEquippedHelmet={Params="",Return="{{cItem}}",Notes="Returns the helmet that the entity has equipped. Returns an empty cItem if no helmet equipped or not applicable."},
GetEquippedLeggings={Params="",Return="{{cItem}}",Notes="Returns the leggings that the entity has equipped. Returns an empty cItem if no leggings equipped or not applicable."},
GetEquippedWeapon={Params="",Return="{{cItem}}",Notes="Returns the weapon that the entity has equipped. Returns an empty cItem if no weapon equipped or not applicable."},
GetGravity={Params="",Return="number",Notes="Returns the number that is used as the gravity for physics simulation. 1G (9.78) by default."},
GetHeadYaw={Params="",Return="number",Notes="Returns the pitch of the entity's head (FIXME: Rename to GetHeadPitch() )."},
GetHealth={Params="",Return="number",Notes="Returns the current health of the entity."},
GetHeight={Params="",Return="number",Notes="Returns the height (Y size) of the entity"},
GetInvulnerableTicks={Params="",Return="number",Notes="Returns the number of ticks that this entity will be invulnerable for. This is used for after-hit recovery - the entities are invulnerable for half a second after being hit."},
GetKnockbackAmountAgainst={Params="ReceiverEntity",Return="number",Notes="Returns the amount of knockback that the currently equipped items would cause when attacking the ReceiverEntity."},
GetPitch={Params="",Return="number",Notes="Returns the pitch (nose-down rotation) of the entity. Measured in degrees, normal values range from -90 to +90. +90 means looking down, 0 means looking straight ahead, -90 means looking up."},
GetRawDamageAgainst={Params="ReceiverEntity",Return="number",Notes="Returns the raw damage that this entity's equipment would cause when attacking the ReceiverEntity. This includes this entity's weapon {{cEnchantments|enchantments}}, but excludes the receiver's armor or potion effects. See {{TakeDamageInfo}} for more information on attack damage."},
GetRoll={Params="",Return="number",Notes="Returns the roll (sideways rotation) of the entity. Currently unused."},
GetUniqueID={Params="",Return="number",Notes="Returns the ID that uniquely identifies the entity within the running server. Note that this ID is not persisted to the data files."},
GetWidth={Params="",Return="number",Notes="Returns the width (X and Z size) of the entity."},
GetYaw={Params="",Return="number",Notes="Returns the yaw (direction) of the entity. Measured in degrees, values range from -180 to +180. 0 means ZP, 90 means XM, -180 means ZM, -90 means XP."},
HandleSpeedFromAttachee={Params="ForwardAmount, SidewaysAmount",Return="",Notes="Updates the entity's speed based on the attachee exerting the specified force forward and sideways. Used for entities being driven by other entities attached to them - usually players driving minecarts and boats."},
IsA={Params="ClassName",Return="bool",Notes="Returns true if the entity class is a descendant of the specified class name, or the specified class itself"},
IsSubmerged={Params="",Return="bool",Notes="Returns true if the mob or player is submerged in water (head is in a water block). Note, this function is only updated with mobs or players."},
IsSwimming={Params="",Return="bool",Notes="Returns true if the mob or player is swimming in water (feet are in a water block). Note, this function is only updated with mobs or players."},
Killed={Params="{{cEntity|Victim}}",Return="",Notes="This entity has killed another entity (the Victim). For players, adds the scoreboard statistics about the kill."},
{Params="{{cWorld|World}}, [ShouldSendRespawn]",Return="bool",Notes="Removes the entity from this world and starts moving it to the specified world. Note that to avoid deadlocks, the move is asynchronous - the entity is moved into a queue and will be moved from that queue into the destination world at some (unpredictable) time in the future. ShouldSendRespawn is used only for players, it specifies whether the player should be sent a Repawn packet upon leaving the world (The client handles respawns only between different dimensions)."},
{Params="WorldName, [ShouldSendRespawn]",Return="bool",Notes="Removes the entity from this world and starts moving it to the specified world. Note that to avoid deadlocks, the move is asynchronous - the entity is moved into a queue and will be moved from that queue into the destination world at some (unpredictable) time in the future. ShouldSendRespawn is used only for players, it specifies whether the player should be sent a Repawn packet upon leaving the world (The client handles respawns only between different dimensions)."},
SetGravity={Params="Gravity",Return="",Notes="Sets the number that is used as the gravity for physics simulation. 1G (9.78) by default."},
SetHeadYaw={Params="HeadPitch",Return="",Notes="Sets the head pitch (FIXME: Rename to SetHeadPitch() )."},
SetHealth={Params="Hitpoints",Return="",Notes="Sets the entity's health to the specified amount of hitpoints. Doesn't broadcast any hurt animation. Doesn't kill the entity if health drops below zero. Use the TakeDamage() function instead for taking damage."},
SetHeight={Params="",Return="",Notes="FIXME: Remove this from API"},
SetInvulnerableTicks={Params="NumTicks",Return="",Notes="Sets the amount of ticks for which the entity will not receive any damage from other entities."},
SetIsFireproof={Params="IsFireproof",Return="",Notes="Sets whether the entity receives damage from being on fire."},
SetMass={Params="Mass",Return="",Notes="Sets the mass of the entity. Currently unused."},
SetMaxHealth={Params="MaxHitpoints",Return="",Notes="Sets the maximum hitpoints of the entity. If current health is above MaxHitpoints, it is capped to MaxHitpoints."},
StartBurning={Params="NumTicks",Return="",Notes="Sets the entity on fire for the specified number of ticks. If entity is on fire already, makes it burn for either NumTicks or the number of ticks left from the previous fire, whichever is larger."},
SteerVehicle={Params="ForwardAmount, SidewaysAmount",Return="",Notes="Applies the specified steering to the vehicle this entity is attached to. Ignored if not attached to any entity."},
StopBurning={Params="",Return="",Notes="Extinguishes the entity fire, cancels all fire timers."},
TakeDamage=
{
{Params="AttackerEntity",Return="",Notes="Causes this entity to take damage that AttackerEntity would inflict. Includes their weapon and this entity's armor."},
{Params="DamageType, AttackerEntity, RawDamage, KnockbackAmount",Return="",Notes="Causes this entity to take damage of the specified type, from the specified attacker (may be nil). The final damage is calculated from RawDamage using the currently equipped armor."},
{Params="DamageType, ArrackerEntity, RawDamage, FinalDamage, KnockbackAmount",Return="",Notes="Causes this entity to take damage of the specified type, from the specified attacker (may be nil). The values are wrapped into a {{TakeDamageInfo}} structure and applied directly."},
TeleportToCoords={Params="PosX, PosY, PosZ",Return="",Notes="Teleports the entity to the specified coords. Asks plugins if the teleport is allowed."},
TeleportToEntity={Params="DestEntity",Return="",Notes="Teleports this entity to the specified destination entity. Asks plugins if the teleport is allowed."},
ChangeFileExt={Params="FileName, NewExt",Return="string",Notes="(STATIC) Returns FileName with its extension changed to NewExt. NewExt may begin with a dot, but needn't, the result is the same in both cases (the first dot, if present, is ignored). FileName may contain path elements, extension is recognized as the last dot after the last path separator in the string."},
Copy={Params="SrcFileName, DstFileName",Return="bool",Notes="(STATIC) Copies a single file to a new destination. Returns true if successful. Fails if the destination already exists."},
CreateFolder={Params="FolderPath",Return="bool",Notes="(STATIC) Creates a new folder. Returns true if successful. Only a single level can be created at a time, use CreateFolderRecursive() to create multiple levels of folders at once."},
CreateFolderRecursive={Params="FolderPath",Return="bool",Notes="(STATIC) Creates a new folder, creating its parents if needed. Returns true if successful."},
Delete={Params="Path",Return="bool",Notes="(STATIC) Deletes the specified file or folder. Returns true if successful. Only deletes folders that are empty.<br/><b>NOTE</b>: If you already know if the object is a file or folder, use DeleteFile() or DeleteFolder() explicitly."},
DeleteFile={Params="FilePath",Return="bool",Notes="(STATIC) Deletes the specified file. Returns true if successful."},
DeleteFolder={Params="FolderPath",Return="bool",Notes="(STATIC) Deletes the specified file or folder. Returns true if successful. Only deletes folders that are empty."},
DeleteFolderContents={Params="FolderPath",Return="bool",Notes="(STATIC) Deletes everything from the specified folder, recursively. The specified folder stays intact. Returns true if successful."},
Exists={Params="Path",Return="bool",Notes="(STATIC) Returns true if the specified file or folder exists.<br/><b>OBSOLETE</b>, use IsFile() or IsFolder() instead"},
GetExecutableExt={Params="",Return="string",Notes="(STATIC) Returns the customary executable extension (including the dot) used by the current platform (\".exe\" on Windows, empty string on Linux). "},
GetFolderContents={Params="FolderName",Return="array table of strings",Notes="(STATIC) Returns the contents of the specified folder, as an array table of strings. Each filesystem object is listed. Use the IsFile() and IsFolder() functions to determine the object type."},
GetLastModificationTime={Params="Path",Return="number",Notes="(STATIC) Returns the last modification time (in current timezone) of the specified file or folder. Returns zero if file not found / not accessible. The returned value is in the same units as values returned by os.time()."},
GetPathSeparator={Params="",Return="string",Notes="(STATIC) Returns the primary path separator used by the current platform. Returns \"\\\" on Windows and \"/\" on Linux. Note that the platform or CRT may support additional path separators, those are not reported."},
ReadWholeFile={Params="FileName",Return="string",Notes="(STATIC) Returns the entire contents of the specified file. Returns an empty string if the file cannot be opened."},
Rename={Params="OrigPath, NewPath",Return="bool",Notes="(STATIC) Renames a file or a folder. Returns true if successful. Undefined result if NewPath already exists."},
CanPickup={Params="",Return="bool",Notes="Returns true if the floater gives an item when the player right clicks."},
GetAttachedMobID={Params="",Return="EntityID",Notes="A floater can get attached to an mob. When it is and this functions gets called it returns the mob ID. If it isn't attached to a mob it returns -1"},
GetOwnerID={Params="",Return="EntityID",Notes="Returns the EntityID of the player who owns the floater."},
AddValue={Params="KeyName, ValueName, Value",Return="",Notes="Adds a new value of the specified name to the specified key. If another value of the same name exists in the key, both are kept (nonstandard INI file)"},
AddValueB={Params="KeyName, ValueName, Value",Return="",Notes="Adds a new bool value of the specified name to the specified key. If another value of the same name exists in the key, both are kept (nonstandard INI file)"},
AddValueF={Params="KeyName, ValueName, Value",Return="",Notes="Adds a new float value of the specified name to the specified key. If another value of the same name exists in the key, both are kept (nonstandard INI file)"},
AddValueI={Params="KeyName, ValueName, Value",Return="",Notes="Adds a new integer value of the specified name to the specified key. If another value of the same name exists in the key, both are kept (nonstandard INI file)"},
CaseInsensitive={Params="",Return="",Notes="Sets key names' and value names' comparisons to case insensitive (default)."},
CaseSensitive={Params="",Return="",Notes="Sets key names and value names comparisons to case sensitive."},
Clear={Params="",Return="",Notes="Removes all the in-memory data. Note that , like all the other operations, this doesn't affect any file data."},
DeleteHeaderComment={Params="CommentID",Return="bool",Notes="Deletes the specified header comment. Returns true if successful."},
DeleteHeaderComments={Params="",Return="",Notes="Deletes all headers comments."},
DeleteKey={Params="KeyName",Return="bool",Notes="Deletes the specified key, and all values in that key. Returns true if successful."},
DeleteKeyComment=
{
{Params="KeyID, CommentID",Return="bool",Notes="Deletes the specified key comment. Returns true if successful."},
{Params="KeyName, CommentID",Return="bool",Notes="Deletes the specified key comment. Returns true if successful."},
},
DeleteKeyComments=
{
{Params="KeyID",Return="bool",Notes="Deletes all comments for the specified key. Returns true if successful."},
{Params="KeyName",Return="bool",Notes="Deletes all comments for the specified key. Returns true if successful."},
},
DeleteValue={Params="KeyName, ValueName",Return="bool",Notes="Deletes the specified value. Returns true if successful."},
DeleteValueByID={Params="KeyID, ValueID",Return="bool",Notes="Deletes the specified value. Returns true if successful."},
FindKey={Params="KeyName",Return="number",Notes="Returns the KeyID for the specified key name, or the noID constant if the key doesn't exist."},
FindValue={Params="KeyID, ValueName",Return="numebr",Notes="Returns the ValueID for the specified value name, or the noID constant if the specified key doesn't contain a value of that name."},
GetHeaderComment={Params="CommentID",Return="string",Notes="Returns the specified header comment, or an empty string if such comment doesn't exist"},
GetKeyComment=
{
{Params="KeyID, CommentID",Return="string",Notes="Returns the specified key comment, or an empty string if such a comment doesn't exist"},
{Params="KeyName, CommentID",Return="string",Notes="Returns the specified key comment, or an empty string if such a comment doesn't exist"},
},
GetKeyName={Params="KeyID",Return="string",Notes="Returns the key name for the specified key ID. Inverse for FindKey()."},
GetNumHeaderComments={Params="",Return="number",Notes="Retuns the number of header comments."},
GetNumKeyComments=
{
{Params="KeyID",Return="number",Notes="Returns the number of comments under the specified key"},
{Params="KeyName",Return="number",Notes="Returns the number of comments under the specified key"},
},
GetNumKeys={Params="",Return="number",Notes="Returns the total number of keys. This is the range for the KeyID (0 .. GetNumKeys() - 1)"},
{Params="KeyName, ValueName",Return="string",Notes="Returns the value of the specified name under the specified key. Returns an empty string if the value doesn't exist."},
{Params="KeyID, ValueID",Return="string",Notes="Returns the value of the specified name under the specified key. Returns an empty string if the value doesn't exist."},
},
GetValueB={Params="KeyName, ValueName",Return="bool",Notes="Returns the value of the specified name under the specified key, as a bool. Returns false if the value doesn't exist."},
GetValueF={Params="KeyName, ValueName",Return="number",Notes="Returns the value of the specified name under the specified key, as a floating-point number. Returns zero if the value doesn't exist."},
GetValueI={Params="KeyName, ValueName",Return="number",Notes="Returns the value of the specified name under the specified key, as an integer. Returns zero if the value doesn't exist."},
{Params="KeyID, ValueID",Return="string",Notes="Returns the name of the specified value Inverse for FindValue()."},
{Params="KeyName, ValueID",Return="string",Notes="Returns the name of the specified value Inverse for FindValue()."},
},
GetValueSet={Params="KeyName, ValueName, Default",Return="string",Notes="Returns the value of the specified name under the specified key. If the value doesn't exist, creates it with the specified default."},
GetValueSetB={Params="KeyName, ValueName, Default",Return="bool",Notes="Returns the value of the specified name under the specified key, as a bool. If the value doesn't exist, creates it with the specified default."},
GetValueSetF={Params="KeyName, ValueName, Default",Return="number",Notes="Returns the value of the specified name under the specified key, as a floating-point number. If the value doesn't exist, creates it with the specified default."},
GetValueSetI={Params="KeyName, ValueName, Default",Return="number",Notes="Returns the value of the specified name under the specified key, as an integer. If the value doesn't exist, creates it with the specified default."},
ReadFile={Params="FileName, [AllowExampleFallback]",Return="bool",Notes="Reads the values from the specified file. Previous in-memory contents are lost. If the file cannot be opened, and AllowExample is true, another file, \"filename.example.ini\", is loaded and then saved as \"filename.ini\". Returns true if successful, false if not."},
{Params="KeyID, ValueID, NewValue",Return="bool",Notes="Overwrites the specified value with a new value. If the specified value doesn't exist, returns false (doesn't add)."},
{Params="KeyName, ValueName, NewValue, [CreateIfNotExists]",Return="bool",Notes="Overwrites the specified value with a new value. If CreateIfNotExists is true (default) and the value doesn't exist, it is first created. Returns true if the value was successfully set, false if not (didn't exists, CreateIfNotExists false)."},
},
SetValueB={Params="KeyName, ValueName, NewValueBool, [CreateIfNotExists]",Return="bool",Notes="Overwrites the specified value with a new bool value. If CreateIfNotExists is true (default) and the value doesn't exist, it is first created. Returns true if the value was successfully set, false if not (didn't exists, CreateIfNotExists false)."},
SetValueF={Params="KeyName, ValueName, NewValueFloat, [CreateIfNotExists]",Return="bool",Notes="Overwrites the specified value with a new floating-point number value. If CreateIfNotExists is true (default) and the value doesn't exist, it is first created. Returns true if the value was successfully set, false if not (didn't exists, CreateIfNotExists false)."},
SetValueI={Params="KeyName, ValueName, NewValueInt, [CreateIfNotExists]",Return="bool",Notes="Overwrites the specified value with a new integer value. If CreateIfNotExists is true (default) and the value doesn't exist, it is first created. Returns true if the value was successfully set, false if not (didn't exists, CreateIfNotExists false)."},
WriteFile={Params="FileName",Return="bool",Notes="Writes the current in-memory data into the specified file. Returns true if successful, false if not."},
AddItem={Params="{{cItem|cItem}}, [AllowNewStacks]",Return="number",Notes="Adds an item to the storage; if AllowNewStacks is true (default), will also create new stacks in empty slots. Returns the number of items added"},
AddItems={Params="{{cItems|cItems}}, [AllowNewStacks]",Return="number",Notes="Same as AddItem, but for several items at once"},
ChangeSlotCount={Params="SlotNum, AddToCount",Return="number",Notes="Adds AddToCount to the count of items in the specified slot. If the slot was empty, ignores the call. Returns the new count in the slot, or -1 if invalid SlotNum"},
Clear={Params="",Return="",Notes="Empties all slots"},
CopyToItems={Params="{{cItems|cItems}}",Return="",Notes="Copies all non-empty slots into the cItems object provided; original cItems contents are preserved"},
DamageEquippedItem={Params="[DamageAmount]",Return="bool",Notes="Adds the specified damage (1 by default) to the currently equipped it"},
DamageItem={Params="SlotNum, [DamageAmount]",Return="bool",Notes="Adds the specified damage (1 by default) to the specified item, returns true if the item reached its max damage and should be destroyed"},
GetArmorGrid={Params="",Return="{{cItemGrid|cItemGrid}}",Notes="Returns the ItemGrid representing the armor grid (1 x 4 slots)"},
GetArmorSlot={Params="ArmorSlotNum",Return="{{cItem|cItem}}",Notes="Returns the specified armor slot contents. Note that the returned item is read-only"},
GetEquippedBoots={Params="",Return="{{cItem|cItem}}",Notes="Returns the item in the \"boots\" slot of the armor grid. Note that the returned item is read-only"},
GetEquippedChestplate={Params="",Return="{{cItem|cItem}}",Notes="Returns the item in the \"chestplate\" slot of the armor grid. Note that the returned item is read-only"},
GetEquippedHelmet={Params="",Return="{{cItem|cItem}}",Notes="Returns the item in the \"helmet\" slot of the armor grid. Note that the returned item is read-only"},
GetEquippedItem={Params="",Return="{{cItem|cItem}}",Notes="Returns the currently selected item from the hotbar. Note that the returned item is read-only"},
GetEquippedLeggings={Params="",Return="{{cItem|cItem}}",Notes="Returns the item in the \"leggings\" slot of the armor grid. Note that the returned item is read-only"},
GetEquippedSlotNum={Params="",Return="number",Notes="Returns the hotbar slot number for the currently selected item"},
GetHotbarGrid={Params="",Return="{{cItemGrid|cItemGrid}}",Notes="Returns the ItemGrid representing the hotbar grid (9 x 1 slots)"},
GetHotbarSlot={Params="HotBarSlotNum",Return="{{cItem|cItem}}",Notes="Returns the specified hotbar slot contents. Note that the returned item is read-only"},
GetInventoryGrid={Params="",Return="{{cItemGrid|cItemGrid}}",Notes="Returns the ItemGrid representing the main inventory (9 x 3 slots)"},
GetInventorySlot={Params="InventorySlotNum",Return="{{cItem|cItem}}",Notes="Returns the specified main inventory slot contents. Note that the returned item is read-only"},
GetOwner={Params="",Return="{{cPlayer|cPlayer}}",Notes="Returns the player whose inventory this object represents"},
GetSlot={Params="SlotNum",Return="{{cItem|cItem}}",Notes="Returns the contents of the specified slot. Note that the returned item is read-only"},
HasItems={Params="{{cItem|cItem}}",Return="bool",Notes="Returns true if there are at least as many items of the specified type as in the parameter"},
HowManyCanFit={Params="{{cItem|cItem}}",Return="number",Notes="Returns the number of the specified items that can fit in the storage, including empty slots"},
HowManyItems={Params="{{cItem|cItem}}",Return="number",Notes="Returns the number of the specified items that are currently stored"},
RemoveItem={Params="{{cItem}}",Return="number",Notes="Removes the specified item from the inventory, as many as possible, up to the item's m_ItemCount. Returns the number of items that were removed."},
{Params="ItemType, Count, Damage, EnchantmentString, CustomName, Lore",Return="cItem",Notes="Creates a new cItem object of the specified type, count (1 by default), damage (0 by default), enchantments (non-enchanted by default), CustomName (empty by default) and Lore (string, empty by default)"},
Clear={Params="",Return="",Notes="Resets the instance to an empty item"},
CopyOne={Params="",Return="cItem",Notes="Creates a copy of this object, with its count set to 1"},
DamageItem={Params="[Amount]",Return="bool",Notes="Adds the specified damage. Returns true when damage reaches max value and the item should be destroyed (but doesn't destroy the item)"},
Empty={Params="",Return="",Notes="Resets the instance to an empty item"},
GetMaxDamage={Params="",Return="number",Notes="Returns the maximum value for damage that this item can get before breaking; zero if damage is not accounted for for this item type"},
IsEqual={Params="cItem",Return="bool",Notes="Returns true if the item in the parameter is the same as the one stored in the object (type, damage, lore, name and enchantments)"},
IsSameType={Params="cItem",Return="bool",Notes="Returns true if the item in the parameter is of the same ItemType as the one stored in the object. This is true even if the two items have different enchantments"},
GetEnchantability={Params="",Return="number",Notes="Returns the enchantability of the item. When the item hasn't a enchantability, it will returns 0"},
EnchantByXPLevels={Params="NumXPLevels",Return="bool",Notes="Enchants the item using the specified number of XP levels. Returns true if item enchanted, false if not."},
IsEnchantable={Params="ItemType, WithBook",Return="bool",Notes="(STATIC) Returns true if the specified item type is enchantable. If WithBook is true, the function is used in the anvil inventory with book enchantments. So it checks the \"only book enchantments\" too. Example: You can only enchant a hoe with a book."},
Desc="This class represents a painting in the world. These paintings are special and different from Vanilla in that they can be critical-hit.",
Functions=
{
GetDirection={Params="",Return="number",Notes="Returns the direction the painting faces. Directions: ZP - 0, ZM - 2, XM - 1, XP - 3. Note that these are not the BLOCK_FACE constants."},
GetName={Params="",Return="string",Notes="Returns the name of the painting"},
AddItem={Params="{{cItem|cItem}}, [AllowNewStacks]",Return="number",Notes="Adds an item to the storage; if AllowNewStacks is true (default), will also create new stacks in empty slots. Returns the number of items added"},
AddItems={Params="{{cItems|cItems}}, [AllowNewStacks]",Return="number",Notes="Same as AddItem, but for several items at once"},
{Params="SlotNum, AddToCount",Return="number",Notes="Adds AddToCount to the count of items in the specified slot. If the slot was empty, ignores the call. Returns the new count in the slot, or -1 if invalid SlotNum"},
{Params="X, Y, AddToCount",Return="number",Notes="Adds AddToCount to the count of items in the specified slot. If the slot was empty, ignores the call. Returns the new count in the slot, or -1 if invalid slot coords"},
Clear={Params="",Return="",Notes="Empties all slots"},
CopyToItems={Params="{{cItems|cItems}}",Return="",Notes="Copies all non-empty slots into the cItems object provided; original cItems contents are preserved"},
{Params="SlotNum, [DamageAmount]",Return="bool",Notes="Adds the specified damage (1 by default) to the specified item, returns true if the item reached its max damage and should be destroyed"},
{Params="X, Y, [DamageAmount]",Return="bool",Notes="Adds the specified damage (1 by default) to the specified item, returns true if the item reached its max damage and should be destroyed"},
},
EmptySlot=
{
{Params="SlotNum",Return="",Notes="Destroys the item in the specified slot"},
{Params="X, Y",Return="",Notes="Destroys the item in the specified slot"},
GetNextEmptySlot={Params="StartFrom",Return="number",Notes="Returns the SlotNumber of the first empty slot following StartFrom, -1 if all the following slots are full"},
GetNextUsedSlot={Params="StartFrom",Return="number",Notes="Returns the SlotNumber of the first non-empty slot following StartFrom, -1 if all the following slots are full"},
GetSlotCoords={Params="SlotNum",Return="number, number",Notes="Returns the X and Y coords for the specified SlotNumber. Returns \"-1, -1\" on invalid SlotNumber"},
GetSlotNum={Params="X, Y",Return="number",Notes="Returns the SlotNumber for the specified slot coords. Returns -1 on invalid coords"},
GetWidth={Params="",Return="number",Notes="Returns the X dimension of the grid"},
HasItems={Params="{{cItem|cItem}}",Return="bool",Notes="Returns true if there are at least as many items of the specified type as in the parameter"},
HowManyCanFit={Params="{{cItem|cItem}}",Return="number",Notes="Returns the number of the specified items that can fit in the storage, including empty slots"},
HowManyItems={Params="{{cItem|cItem}}",Return="number",Notes="Returns the number of the specified items that are currently stored"},
RemoveItem={Params="{{cItem}}",Return="number",Notes="Removes the specified item from the grid, as many as possible, up to the item's m_ItemCount. Returns the number of items that were removed."},
{Params="SlotNum",Return="{{cItem|cItem}}",Notes="Removes one item from the stack in the specified slot and returns it as a single cItem. Empty slots are skipped and an empty item is returned"},
{Params="X, Y",Return="{{cItem|cItem}}",Notes="Removes one item from the stack in the specified slot and returns it as a single cItem. Empty slots are skipped and an empty item is returned"},
},
SetSlot=
{
{Params="SlotNum, {{cItem|cItem}}",Return="",Notes="Sets the specified slot to the specified item"},
{Params="X, Y, {{cItem|cItem}}",Return="",Notes="Sets the specified slot to the specified item"},
<p>Thisclassinheritsfromthe{{cWindow|cWindow}}class,soallcWindow's functions and constants can be used, in addition to the cLuaWindow-specific functions listed below.
<p>WhencreatinganewcLuaWindowobject,youneedtospecifyboththewindowtypeandthecontents' width and height. Note that Cuberite accepts any combination of these, but opening a window for a player may crash their client if the contents'dimensionsdon't match the client'sexpectations.
Thiscallback,settableviatheSetOnSlotChanged()function,willbecalledwheneverthecontentsofanyslotinthewindow's contents (i. e. NOT in the player inventory!) changes.</p>
<p>Thea_WindowparameteristhecLuaWindowobjectrepresentingthewindow,a_SlotNumistheslotnumber.Thereisnoreferencetoa{{cPlayer}},becausetheslotchangeneedn't originate from the player action. To get or set the slot, you'llneedtoretrieveacPlayerobject,forexamplebycalling{{cWorld|cWorld}}:DoWithPlayer().
DoWithMap={Params="ID, CallbackFunction",Return="bool",Notes="If a map with the specified ID exists, calls the CallbackFunction for that map. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cMap|Map}})</pre> Returns true if the map was found and the callback called, false if map not found."},
AddPlayerNameToUUIDMapping={Params="PlayerName, UUID",Return="",Notes="(STATIC) Adds the specified PlayerName-to-UUID mapping into the cache, with current timestamp. Accepts both short or dashed UUIDs. "},
GetPlayerNameFromUUID={Params="UUID, [UseOnlyCached]",Return="PlayerName",Notes="(STATIC) Returns the playername that corresponds to the given UUID, or an empty string on error. If UseOnlyCached is false (the default), queries the Mojang servers if the UUID is not in the cache. The UUID can be either short or dashed. <br /><b>WARNING</b>: Do NOT use this function with UseOnlyCached set to false while the server is running. Only use it when the server is starting up (inside the Initialize() method), otherwise you will lag the server severely."},
GetUUIDFromPlayerName={Params="PlayerName, [UseOnlyCached]",Return="UUID",Notes="(STATIC) Returns the (short) UUID that corresponds to the given playername, or an empty string on error. If UseOnlyCached is false (the default), queries the Mojang servers if the playername is not in the cache. <br /><b>WARNING</b>: Do NOT use this function with UseOnlyCached set to false while the server is running. Only use it when the server is starting up (inside the Initialize() method), otherwise you will lag the server severely."},
GetUUIDsFromPlayerNames={Params="PlayerNames, [UseOnlyCached]",Return="table",Notes="(STATIC) Returns a table that contains the map, 'PlayerName' -> '(short) UUID', for all valid playernames in the input array-table. PlayerNames not recognized will not be set in the returned map. If UseOnlyCached is false (the default), queries the Mojang servers for the results that are not in the cache. <br /><b>WARNING</b>: Do NOT use this function with UseOnlyCached set to false while the server is running. Only use it when the server is starting up (inside the Initialize() method), otherwise you will lag the server severely."},
MakeUUIDDashed={Params="UUID",Return="DashedUUID",Notes="(STATIC) Converts the UUID to a dashed format (\"01234567-8901-2345-6789-012345678901\"). Accepts both dashed or short UUIDs. Logs a warning and returns an empty string if UUID format not recognized."},
MakeUUIDShort={Params="UUID",Return="ShortUUID",Notes="(STATIC) Converts the UUID to a short format (without dashes, \"01234567890123456789012345678901\"). Accepts both dashed or short UUIDs. Logs a warning and returns an empty string if UUID format not recognized."},
HasCustomName={Params="",Return="bool",Notes="Returns true if the monster has a custom name."},
GetCustomName={Params="",Return="string",Notes="Gets the custom name of the monster. If no custom name is set, the function returns an empty string."},
SetCustomName={Params="string",Return="",Notes="Sets the custom name of the monster. You see the name over the monster. If you want to disable the custom name, simply set an empty string."},
IsCustomNameAlwaysVisible={Params="",Return="bool",Notes="Is the custom name of this monster always visible? If not, you only see the name when you sight the mob."},
SetCustomNameAlwaysVisible={Params="bool",Return="",Notes="Sets the custom name visiblity of this monster. If it's false, you only see the name when you sight the mob. If it's true, you always see the custom name."},
FamilyFromType={Params="{{Globals#MobType|MobType}}",Return="{{cMonster#MobFamily|MobFamily}}",Notes="(STATIC) Returns the mob family ({{cMonster#MobFamily|mfXXX}} constants) based on the mob type ({{Globals#MobType|mtXXX}} constants)"},
GetSpawnDelay={Params="{{cMonster#MobFamily|MobFamily}}",Return="number",Notes="(STATIC) Returns the spawn delay - the number of game ticks between spawn attempts - for the specified mob family."},
MobTypeToString={Params="{{Globals#MobType|MobType}}",Return="string",Notes="(STATIC) Returns the string representing the given mob type ({{Globals#MobType|mtXXX}} constant), or empty string if unknown type."},
MobTypeToVanillaName={Params="{{Globals#MobType|MobType}}",Return="string",Notes="(STATIC) Returns the vanilla name of the given mob type, or empty string if unknown type."},
StringToMobType={Params="string",Return="{{Globals#MobType|MobType}}",Notes="(STATIC) Returns the mob type ({{Globals#MobType|mtXXX}} constant) parsed from the string type (\"creeper\"), or mtInvalidType if unrecognized."},
CollectedBy={Params="{{cPlayer}}",Return="bool",Notes="Tries to make the player collect the pickup. Returns true if the pickup was collected, at least partially."},
GetAge={Params="",Return="number",Notes="Returns the number of ticks that the pickup has existed."},
GetItem={Params="",Return="{{cItem|cItem}}",Notes="Returns the item represented by this pickup"},
IsCollected={Params="",Return="bool",Notes="Returns true if this pickup has already been collected (is waiting to be destroyed)"},
CalcLevelFromXp={Params="XPAmount",Return="number",Notes="(STATIC) Returns the level which is reached with the specified amount of XP. Inverse of XpForLevel()."},
CloseWindow={Params="[CanRefuse]",Return="",Notes="Closes the currently open UI window. If CanRefuse is true (default), the window may refuse the closing."},
CloseWindowIfID={Params="WindowID, [CanRefuse]",Return="",Notes="Closes the currently open UI window if its ID matches the given ID. If CanRefuse is true (default), the window may refuse the closing."},
DeltaExperience={Params="DeltaXP",Return="",Notes="Adds or removes XP from the current XP amount. Won't allow XP to go negative. Returns the new experience, -1 on error (XP overflow)."},
Feed={Params="AddFood, AddSaturation",Return="bool",Notes="Tries to add the specified amounts to food level and food saturation level (only positive amounts expected). Returns true if player was hungry and the food was consumed, false if too satiated."},
FoodPoison={Params="NumTicks",Return="",Notes="Starts the food poisoning for the specified amount of ticks; if already foodpoisoned, sets FoodPoisonedTicksRemaining to the larger of the two"},
GetClientHandle={Params="",Return="{{cClientHandle}}",Notes="Returns the client handle representing the player's connection. May be nil (AI players)."},
GetColor={Return="string",Notes="Returns the full color code to be used for this player's messages (based on their rank). Prefix player messages with this code."},
GetCustomName={Params="",Return="string",Notes="Returns the custom name of this player. If the player hasn't a custom name, it will return an empty string."},
GetEffectiveGameMode={Params="",Return="{{Globals#GameMode|GameMode}}",Notes="(OBSOLETE) Returns the current resolved game mode of the player. If the player is set to inherit the world's gamemode, returns that instead. See also GetGameMode() and IsGameModeXXX() functions. Note that this function is the same as GetGameMode(), use that function instead."},
GetFloaterID={Params="",Return="number",Notes="Returns the Entity ID of the fishing hook floater that belongs to the player. Returns -1 if no floater is associated with the player. FIXME: Undefined behavior when the player has used multiple fishing rods simultanously."},
GetFlyingMaxSpeed={Params="",Return="number",Notes="Returns the maximum flying speed, relative to the default game flying speed. Defaults to 1, but plugins may modify it for faster or slower flying."},
GetFoodExhaustionLevel={Params="",Return="number",Notes="Returns the food exhaustion level"},
GetFoodLevel={Params="",Return="number",Notes="Returns the food level (number of half-drumsticks on-screen)"},
GetFoodPoisonedTicksRemaining={Params="",Return="",Notes="Returns the number of ticks left for the food posoning effect"},
GetFoodSaturationLevel={Params="",Return="number",Notes="Returns the food saturation (overcharge of the food level, is depleted before food level)"},
GetFoodTickTimer={Params="",Return="",Notes="Returns the number of ticks past the last food-based heal or damage action; when this timer reaches 80, a new heal / damage is applied."},
GetGameMode={Return="{{Globals#GameMode|GameMode}}",Notes="Returns the player's gamemode. The player may have their gamemode unassigned, in which case they inherit the gamemode from the current {{cWorld|world}}.<br /> <b>NOTE:</b> Instead of comparing the value returned by this function to the gmXXX constants, use the IsGameModeXXX() functions. These functions handle the gamemode inheritance automatically."},
GetLastBedPos={Params="",Return="{{Vector3i}}",Notes="Returns the position of the last bed the player has slept in, or the world's spawn if no such position was recorded."},
GetMaxSpeed={Params="",Return="number",Notes="Returns the player's current maximum speed, relative to the game default speed. Takes into account the sprinting / flying status."},
GetNormalMaxSpeed={Params="",Return="number",Notes="Returns the player's maximum walking speed, relative to the game default speed. Defaults to 1, but plugins may modify it for faster or slower walking."},
GetPermissions={Params="",Return="array-table of strings",Notes="Returns the list of all permissions that the player has assigned to them through their rank."},
GetPlayerListName={Return="string",Notes="Returns the name that is used in the playerlist."},
GetResolvedPermissions={Return="array-table of string",Notes="Returns all the player's permissions, as a table. The permissions are stored in the array part of the table, beginning with index 1."},
GetSprintingMaxSpeed={Params="",Return="number",Notes="Returns the player's maximum sprinting speed, relative to the game default speed. Defaults to 1.3, but plugins may modify it for faster or slower sprinting."},
GetThrowSpeed={Params="SpeedCoeff",Return="{{Vector3d}}",Notes="Returns the speed vector for an object thrown with the specified speed coeff. Basically returns the normalized look vector multiplied by the coeff, with a slight random variation."},
GetThrowStartPos={Params="",Return="{{Vector3d}}",Notes="Returns the position where the projectiles should start when thrown by this player."},
GetUUID={Params="",Return="string",Notes="Returns the (short) UUID that the player is using. Could be empty string for players that don't have a Mojang account assigned to them (in the future, bots for example)."},
GetWindow={Params="",Return="{{cWindow}}",Notes="Returns the currently open UI window. If the player doesn't have any UI window open, returns the inventory window."},
GetXpLevel={Params="",Return="number",Notes="Returns the current XP level (based on current XP amount)."},
GetXpLifetimeTotal={Params="",Return="number",Notes="Returns the amount of XP that has been accumulated throughout the player's lifetime."},
GetXpPercentage={Params="",Return="number",Notes="Returns the percentage of the experience bar - the amount of XP towards the next XP level. Between 0 and 1."},
HasPermission={Params="PermissionString",Return="bool",Notes="Returns true if the player has the specified permission"},
Heal={Params="HitPoints",Return="",Notes="Heals the player by the specified amount of HPs. Only positive amounts are expected. Sends a health update to the client."},
IsEating={Params="",Return="bool",Notes="Returns true if the player is currently eating the item in their hand."},
IsGameModeAdventure={Params="",Return="bool",Notes="Returns true if the player is in the gmAdventure gamemode, or has their gamemode unset and the world is a gmAdventure world."},
IsGameModeCreative={Params="",Return="bool",Notes="Returns true if the player is in the gmCreative gamemode, or has their gamemode unset and the world is a gmCreative world."},
IsGameModeSpectator={Params="",Return="bool",Notes="Returns true if the player is in the gmSpectator gamemode, or has their gamemode unset and the world is a gmSpectator world."},
IsGameModeSurvival={Params="",Return="bool",Notes="Returns true if the player is in the gmSurvival gamemode, or has their gamemode unset and the world is a gmSurvival world."},
LoadRank={Params="",Return="",Notes="Reloads the player's rank, message visuals and permissions from the {{cRankManager}}, based on the player's current rank."},
PermissionMatches={Params="Permission, Template",Return="bool",Notes="(STATIC) Returns true if the specified permission matches the specified template. The template may contain wildcards."},
PlaceBlock={Params="BlockX, BlockY, BlockZ, BlockType, BlockMeta",Return="bool",Notes="Places a block while impersonating the player. The {{OnPlayerPlacingBlock|HOOK_PLAYER_PLACING_BLOCK}} hook is called before the placement, and if it succeeds, the block is placed and the {{OnPlayerPlacedBlock|HOOK_PLAYER_PLACED_BLOCK}} hook is called. Returns true iff the block is successfully placed. Assumes that the block is in a currently loaded chunk."},
SendBlocksAround={Params="BlockX, BlockY, BlockZ, [Range]",Return="",Notes="Sends all the world's blocks in Range from the specified coords to the player, as a BlockChange packet. Range defaults to 1 (only one block sent)."},
SendMessage={Params="Message",Return="",Notes="Sends the specified message to the player."},
SendMessageFailure={Params="Message",Return="",Notes="Prepends Rose [INFO] / colours entire text (depending on ShouldUseChatPrefixes()) and sends message to player. For a command that failed to run because of insufficient permissions, etc."},
SendMessageFatal={Params="Message",Return="",Notes="Prepends Red [FATAL] / colours entire text (depending on ShouldUseChatPrefixes()) and sends message to player. For something serious, such as a plugin crash, etc."},
SendMessageInfo={Params="Message",Return="",Notes="Prepends Yellow [INFO] / colours entire text (depending on ShouldUseChatPrefixes()) and sends message to player. Informational message, such as command usage, etc."},
SendMessagePrivateMsg={Params="Message, SenderName",Return="",Notes="Prepends Light Blue [MSG: *SenderName*] / prepends SenderName and colours entire text (depending on ShouldUseChatPrefixes()) and sends message to player. For private messaging."},
SendMessageSuccess={Params="Message",Return="",Notes="Prepends Green [INFO] / colours entire text (depending on ShouldUseChatPrefixes()) and sends message to player. Success notification."},
SendMessageWarning={Params="Message, Sender",Return="",Notes="Prepends Rose [WARN] / colours entire text (depending on ShouldUseChatPrefixes()) and sends message to player. Denotes that something concerning, such as plugin reload, is about to happen."},
SendAboveActionBarMessage={Params="Message",Return="",Notes="Sends the specified message to the player (shows above action bar, doesn't show for < 1.8 clients)."},
SendSystemMessage={Params="Message",Return="",Notes="Sends the specified message to the player (doesn't show for < 1.8 clients)."},
SendRotation={Params="YawDegrees, PitchDegrees",Return="",Notes="Sends the specified rotation to the player, forcing them to look that way"},
SetBedPos={Params="{{Vector3i|Position}}",Return="",Notes="Sets the internal representation of the last bed position the player has slept in. The player will respawn at this position if they die."},
SetCustomName={Params="string",Return="",Notes="Sets the custom name of this player. If you want to disable the custom name, simply set an empty string. The custom name will be used in the tab-list, in the player nametag and in the tab-completion."},
SetFlyingMaxSpeed={Params="FlyingMaxSpeed",Return="",Notes="Sets the flying maximum speed, relative to the game default speed. The default value is 1. Sends the updated speed to the client."},
SetFoodExhaustionLevel={Params="ExhaustionLevel",Return="",Notes="Sets the food exhaustion to the specified level."},
SetFoodLevel={Params="FoodLevel",Return="",Notes="Sets the food level (number of half-drumsticks on-screen)"},
SetFoodPoisonedTicksRemaining={Params="FoodPoisonedTicksRemaining",Return="",Notes="Sets the number of ticks remaining for food poisoning. Doesn't send foodpoisoning effect to the client, use FoodPoison() for that."},
SetFoodSaturationLevel={Params="FoodSaturationLevel",Return="",Notes="Sets the food saturation (overcharge of the food level)."},
SetFoodTickTimer={Params="FoodTickTimer",Return="",Notes="Sets the number of ticks past the last food-based heal or damage action; when this timer reaches 80, a new heal / damage is applied."},
SetGameMode={Params="{{Globals#GameMode|NewGameMode}}",Return="",Notes="Sets the gamemode for the player. The new gamemode overrides the world's default gamemode, unless it is set to gmInherit."},
SetIsFishing={Params="IsFishing, [FloaterEntityID]",Return="",Notes="Sets the 'IsFishing' flag for the player. The floater entity ID is expected for the true variant, it can be omitted when IsFishing is false. FIXME: Undefined behavior when multiple fishing rods are used simultanously"},
SetName={Params="Name",Return="",Notes="Sets the player name. This rename will NOT be visible to any players already in the server who are close enough to see this player."},
SetNormalMaxSpeed={Params="NormalMaxSpeed",Return="",Notes="Sets the normal (walking) maximum speed, relative to the game default speed. The default value is 1. Sends the updated speed to the client, if appropriate."},
SetSprintingMaxSpeed={Params="SprintingMaxSpeed",Return="",Notes="Sets the sprinting maximum speed, relative to the game default speed. The default value is 1.3. Sends the updated speed to the client, if appropriate."},
XpForLevel={Params="XPLevel",Return="number",Notes="(STATIC) Returns the total amount of XP needed for the specified XP level. Inverse of CalcLevelFromXp()."},
AddGroup={Params="GroupName",Return="",Notes="Adds the group of the specified name. Logs a warning and does nothing if the group already exists."},
AddGroupToRank={Params="GroupName, RankName",Return="bool",Notes="Adds the specified group to the specified rank. Returns true on success, false on failure - if the group name or the rank name is not found."},
AddPermissionToGroup={Params="Permission, GroupName",Return="bool",Notes="Adds the specified permission to the specified group. Returns true on success, false on failure - if the group name is not found."},
AddRank={Params="RankName, MsgPrefix, MsgSuffix, MsgNameColorCode",Return="",Notes="Adds a new rank of the specified name and with the specified message visuals. Logs an info message and does nothing if the rank already exists."},
ClearPlayerRanks={Params="",Return="",Notes="Removes all player ranks from the database. Note that this doesn't change the cPlayer instances for the already connected players, you need to update all the instances manually."},
GetAllGroups={Params="",Return="array-table of groups' names",Notes="Returns an array-table containing the names of all the groups that are known to the manager."},
GetAllPermissions={Params="",Return="array-table of permissions",Notes="Returns an array-table containing all the permissions that are known to the manager."},
GetAllPlayerUUIDs={Params="",Return="array-table of uuids",Notes="Returns the short uuids of all players stored in the rank DB, sorted by the players' names (case insensitive)."},
GetAllRanks={Params="",Return="array-table of ranks' names",Notes="Returns an array-table containing the names of all the ranks that are known to the manager."},
GetGroupPermissions={Params="GroupName",Return="array-table of permissions",Notes="Returns an array-table containing the permissions that the specified group contains."},
GetPlayerGroups={Params="PlayerUUID",Return="array-table of groups' names",Notes="Returns an array-table of the names of the groups that are assigned to the specified player through their rank. Returns an empty table if the player is not known or has no rank or groups assigned to them."},
GetPlayerMsgVisuals={Params="PlayerUUID",Return="MsgPrefix, MsgSuffix, MsgNameColorCode",Notes="Returns the message visuals assigned to the player. If the player is not explicitly assigned a rank, the default rank's visuals are returned. If there is an error, no value is returned at all."},
GetPlayerPermissions={Params="PlayerUUID",Return="array-table of permissions",Notes="Returns the permissions that the specified player is assigned through their rank. Returns the default rank's permissions if the player has no explicit rank assigned to them. Returns an empty array on error."},
GetPlayerRankName={Params="PlayerUUID",Return="RankName",Notes="Returns the name of the rank that is assigned to the specified player. An empty string (NOT the default rank) is returned if the player has no rank assigned to them."},
GetPlayerName={Params="PlayerUUID",Return="PlayerName",Notes="Returns the last name that the specified player has, for a player in the ranks database. An empty string is returned if the player isn't in the database."},
GetRankGroups={Params="RankName",Return="array-table of groups' names",Notes="Returns an array-table of the names of all the groups that are assigned to the specified rank. Returns an empty table if there is no such rank."},
GetRankPermissions={Params="RankName",Return="array-table of permissions",Notes="Returns an array-table of all the permissions that are assigned to the specified rank through its groups. Returns an empty table if there is no such rank."},
GetRankVisuals={Params="RankName",Return="MsgPrefix, MsgSuffix, MsgNameColorCode",Notes="Returns the message visuals for the specified rank. Returns no value if the specified rank does not exist."},
GroupExists={Params="GroupName",Return="bool",Notes="Returns true iff the specified group exists."},
IsGroupInRank={Params="GroupName, RankName",Return="bool",Notes="Returns true iff the specified group is assigned to the specified rank."},
IsPermissionInGroup={Params="Permission, GroupName",Return="bool",Notes="Returns true iff the specified permission is assigned to the specified group."},
IsPlayerRankSet={Params="PlayerUUID",Return="bool",Notes="Returns true iff the specified player has a rank assigned to them."},
RankExists={Params="RankName",Return="bool",Notes="Returns true iff the specified rank exists."},
RemoveGroup={Params="GroupName",Return="",Notes="Removes the specified group completely. The group will be removed from all the ranks using it and then erased from the manager. Logs an info message and does nothing if the group doesn't exist."},
RemoveGroupFromRank={Params="GroupName, RankName",Return="",Notes="Removes the specified group from the specified rank. The group will still exist, even if it isn't assigned to any rank. Logs an info message and does nothing if the group or rank doesn't exist."},
RemovePermissionFromGroup={Params="Permission, GroupName",Return="",Notes="Removes the specified permission from the specified group. Logs an info message and does nothing if the group doesn't exist."},
RemovePlayerRank={Params="PlayerUUID",Return="",Notes="Removes the player's rank; the player's left without a rank. Note that this doesn't change the {{cPlayer}} instances for the already connected players, you need to update all the instances manually. No action if the player has no rank assigned to them already."},
RemoveRank={Params="RankName, [ReplacementRankName]",Return="",Notes="Removes the specified rank. If ReplacementRankName is given, the players that have RankName will get their rank set to ReplacementRankName. If it isn't given, or is an invalid rank, the players will be removed from the manager, their ranks will be unset completely. Logs an info message and does nothing if the rank is not found."},
RenameGroup={Params="OldName, NewName",Return="",Notes="Renames the specified group. Logs an info message and does nothing if the group is not found or the new name is already used."},
RenameRank={Params="OldName, NewName",Return="",Notes="Renames the specified rank. Logs an info message and does nothing if the rank is not found or the new name is already used."},
SetDefaultRank={Params="RankName",Return="bool",Notes="Sets the specified rank as the default rank. Returns true on success, false on failure (rank doesn't exist)."},
SetPlayerRank={Params="PlayerUUID, PlayerName, RankName",Return="",Notes="Updates the rank for the specified player. The player name is provided for reference, the UUID is used for identification. Logs a warning and does nothing if the rank is not found."},
SetRankVisuals={Params="RankName, MsgPrefix, MsgSuffix, MsgNameColorCode",Return="",Notes="Updates the rank's message visuals. Logs an info message and does nothing if rank not found."},
{Params="MessageText, MessageType",Return="",Notes="Broadcasts a message to all players, with its message type set to MessageType (default: mtCustom)."},
BroadcastChatDeath={Params="MessageText",Return="",Notes="Broadcasts the specified message to all players, with its message type set to mtDeath. Use for when a player has died."},
BroadcastChatFailure={Params="MessageText",Return="",Notes="Broadcasts the specified message to all players, with its message type set to mtFailure. Use for a command that failed to run because of insufficient permissions, etc."},
BroadcastChatFatal={Params="MessageText",Return="",Notes="Broadcasts the specified message to all players, with its message type set to mtFatal. Use for a plugin that crashed, or similar."},
BroadcastChatInfo={Params="MessageText",Return="",Notes="Broadcasts the specified message to all players, with its message type set to mtInfo. Use for informational messages, such as command usage."},
BroadcastChatJoin={Params="MessageText",Return="",Notes="Broadcasts the specified message to all players, with its message type set to mtJoin. Use for players joining the server."},
BroadcastChatLeave={Params="MessageText",Return="",Notes="Broadcasts the specified message to all players, with its message type set to mtLeave. Use for players leaving the server."},
BroadcastChatSuccess={Params="MessageText",Return="",Notes="Broadcasts the specified message to all players, with its message type set to mtSuccess. Use for success messages."},
BroadcastChatWarning={Params="MessageText",Return="",Notes="Broadcasts the specified message to all players, with its message type set to mtWarning. Use for concerning events, such as plugin reload etc."},
CreateAndInitializeWorld={Params="WorldName",Return="{{cWorld|cWorld}}",Notes="Creates a new world and initializes it. If there is a world whith the same name it returns nil.<br><br><b>NOTE:</b> This function is currently unsafe, do not use!"},
FindAndDoWithPlayer={Params="PlayerName, CallbackFunction",Return="bool",Notes="Calls the given callback function for the player with the name best matching the name string provided.<br>This function is case-insensitive and will match partial names.<br>Returns false if player not found or there is ambiguity, true otherwise. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cPlayer|Player}})</pre>"},
DoWithPlayerByUUID={Params="PlayerUUID, CallbackFunction",Return="bool",Notes="If there is the player with the uuid, calls the CallbackFunction with the {{cPlayer}} parameter representing the player. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cPlayer|Player}})</pre> The function returns false if the player was not found, or whatever bool value the callback returned if the player was found."},
ForEachPlayer={Params="CallbackFunction",Return="",Notes="Calls the given callback function for each player. The callback function has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cPlayer|cPlayer}})</pre>"},
ForEachWorld={Params="CallbackFunction",Return="",Notes="Calls the given callback function for each world. The callback function has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cWorld|cWorld}})</pre>"},
Get={Params="",Return="Root object",Notes="(STATIC) This function returns the cRoot object."},
GetBuildCommitID={Params="",Return="string",Notes="(STATIC) For official builds (Travis CI / Jenkins) it returns the exact commit hash used for the build. For unofficial local builds, returns the approximate commit hash (since the true one cannot be determined), formatted as \"approx: <CommitHash>\"."},
GetBuildDateTime={Params="",Return="string",Notes="(STATIC) For official builds (Travic CI / Jenkins) it returns the date and time of the build. For unofficial local builds, returns the approximate datetime of the commit (since the true one cannot be determined), formatted as \"approx: <DateTime-iso8601>\"."},
GetBuildID={Params="",Return="string",Notes="(STATIC) For official builds (Travis CI / Jenkins) it returns the unique ID of the build, as recognized by the build system. For unofficial local builds, returns the string \"Unknown\"."},
GetBuildSeriesName={Params="",Return="string",Notes="(STATIC) For official builds (Travis CI / Jenkins) it returns the series name of the build (for example \"Cuberite Windows x64 Master\"). For unofficial local builds, returns the string \"local build\"."},
GetFurnaceFuelBurnTime={Params="{{cItem|Fuel}}",Return="number",Notes="(STATIC) Returns the number of ticks for how long the item would fuel a furnace. Returns zero if not a fuel."},
GetFurnaceRecipe={Params="{{cItem|InItem}}",Return="{{cItem|OutItem}}, NumTicks, {{cItem|InItem}}",Notes="(STATIC) Returns the furnace recipe for smelting the specified input. If a recipe is found, returns the smelted result, the number of ticks required for the smelting operation, and the input consumed (note that Cuberite supports smelting M items into N items and different smelting rates). If no recipe is found, returns no value."},
GetPhysicalRAMUsage={Params="",Return="number",Notes="Returns the amount of physical RAM that the entire Cuberite process is using, in KiB. Negative if the OS doesn't support this query."},
GetPluginManager={Params="",Return="{{cPluginManager|cPluginManager}}",Notes="Returns the cPluginManager object."},
GetPrimaryServerVersion={Params="",Return="number",Notes="Returns the servers primary server version."},
GetProtocolVersionTextFromInt={Params="Protocol Version",Return="string",Notes="Returns the Minecraft version from the given Protocol. If there is no version found, it returns 'Unknown protocol(Parameter)'"},
GetServer={Params="",Return="{{cServer|cServer}}",Notes="Returns the cServer object."},
GetVirtualRAMUsage={Params="",Return="number",Notes="Returns the amount of virtual RAM that the entire Cuberite process is using, in KiB. Negative if the OS doesn't support this query."},
GetWebAdmin={Params="",Return="{{cWebAdmin|cWebAdmin}}",Notes="Returns the cWebAdmin object."},
GetWorld={Params="WorldName",Return="{{cWorld|cWorld}}",Notes="Returns the cWorld object of the given world. It returns nil if there is no world with the given name."},
QueueExecuteConsoleCommand={Params="Message",Return="",Notes="Queues a console command for execution through the cServer class. The command will be executed in the tick thread. The command's output will be sent to console."},
SaveAllChunks={Params="",Return="",Notes="Saves all the chunks in all the worlds. Note that the saving is queued on each world's tick thread and this functions returns before the chunks are actually saved."},
ForEachObjective={Params="CallBackFunction",Return="bool",Notes="Calls the specified callback for each objective in the scoreboard. Returns true if all objectives have been processed (including when there are zero objectives), or false if the callback function has aborted the enumeration by returning true. The callback function has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cObjective|Objective}})</pre> The callback should return false or no value to continue with the next objective, or true to abort the enumeration."},
ForEachTeam={Params="CallBackFunction",Return="bool",Notes="Calls the specified callback for each team in the scoreboard. Returns true if all teams have been processed (including when there are zero teams), or false if the callback function has aborted the enumeration by returning true. The callback function has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cObjective|Objective}})</pre> The callback should return false or no value to continue with the next team, or true to abort the enumeration."},
GetNumObjectives={Params="",Return="number",Notes="Returns the nuber of registered objectives."},
GetNumTeams={Params="",Return="number",Notes="Returns the number of registered teams."},
GetObjective={Params="string",Return="{{cObjective}}",Notes="Returns the objective with the specified name."},
GetObjectiveIn={Params="DisplaySlot",Return="{{cObjective}}",Notes="Returns the objective in the specified display slot. Can be nil."},
GetTeam={Params="string",Return="{{cTeam}}",Notes="Returns the team with the specified name."},
RegisterObjective={Params="Name, DisplayName, Type",Return="{{cObjective}}",Notes="Registers a new scoreboard objective. Returns the {{cObjective}} instance, nil on error."},
RegisterTeam={Params="Name, DisplayName, Prefix, Suffix",Return="{{cTeam}}",Notes="Registers a new team. Returns the {{cTeam}} instance, nil on error."},
RemoveObjective={Params="string",Return="bool",Notes="Removes the objective with the specified name. Returns true if operation was successful."},
RemoveTeam={Params="string",Return="bool",Notes="Removes the team with the specified name. Returns true if operation was successful."},
SetDisplay={Params="Name, DisplaySlot",Return="",Notes="Updates the currently displayed objective."},
CompressStringZLIB={Params="string, factor",Return="string",Notes="Compresses a string using ZLIB. Factor 0 is no compression and factor 9 is maximum compression"},
AddPlayer={Params="string",Returns="bool",Notes="Adds a player to this team. Returns true if the operation was successful."},
AllowsFriendlyFire={Params="",Return="bool",Notes="Returns whether team friendly fire is allowed."},
CanSeeFriendlyInvisible={Params="",Return="bool",Notes="Returns whether players can see invisible teammates."},
HasPlayer={Params="string",Returns="bool",Notes="Returns whether the specified player is a member of this team."},
GetDisplayName={Params="",Return="string",Notes="Returns the display name of the team."},
GetName={Params="",Return="string",Notes="Returns the internal name of the team."},
GetNumPlayers={Params="",Return="number",Notes="Returns the number of registered players."},
GetPrefix={Params="",Return="string",Notes="Returns the prefix prepended to the names of the members of this team."},
RemovePlayer={Params="string",Returns="bool",Notes="Removes the player with the specified name from this team. Returns true if the operation was successful."},
Reset={Params="",Returns="",Notes="Removes all players from this team."},
GetSuffix={Params="",Return="string",Notes="Returns the suffix appended to the names of the members of this team."},
SetCanSeeFriendlyInvisible={Params="bool",Return="",Notes="Set whether players can see invisible teammates."},
SetDisplayName={Params="string",Return="",Notes="Sets the display name of this team. (i.e. what will be shown to the players)"},
SetFriendlyFire={Params="bool",Return="",Notes="Sets whether team friendly fire is allowed."},
SetPrefix={Params="string",Return="",Notes="Sets the prefix prepended to the names of the members of this team."},
SetSuffix={Params="string",Return="",Notes="Sets the suffix appended to the names of the members of this team."},
GetSlot={Params="{{cPlayer|Player}}, SlotNumber",Return="{{cItem}}",Notes="Returns the item at the specified slot for the specified player. Returns nil and logs to server console on error."},
IsSlotInPlayerHotbar={Params="SlotNum",Return="bool",Notes="Returns true if the specified slot number is in the player hotbar"},
IsSlotInPlayerInventory={Params="SlotNum",Return="bool",Notes="Returns true if the specified slot number is in the player's main inventory or in the hotbar. Note that this returns false for armor slots!"},
IsSlotInPlayerMainInventory={Params="SlotNum",Return="bool",Notes="Returns true if the specified slot number is in the player's main inventory"},
SetProperty={Params="PropertyID, PropartyValue, {{cPlayer|Player}}",Return="",Notes="Sends the UpdateWindowProperty (0x69) packet to the specified player; or to all players who are viewing this window if Player is not specified or nil."},
SetSlot={Params="{{cPlayer|Player}}, SlotNum, {{cItem|cItem}}",Return="",Notes="Sets the contents of the specified slot for the specified player. Ignored if the slot number is invalid"},
BroadcastBlockAction={Params="BlockX, BlockY, BlockZ, ActionByte1, ActionByte2, BlockType, [{{cClientHandle|ExcludeClient}}]",Return="",Notes="Broadcasts the BlockAction packet to all clients who have the appropriate chunk loaded (except ExcludeClient). The contents of the packet are specified by the parameters for the call, the blocktype needn't match the actual block that is present in the world data at the specified location."},
BroadcastChat={Params="Message, [{{cClientHandle|ExcludeClient}}]",Return="",Notes="Sends the Message to all players in this world, except the optional ExcludeClient. No formatting is done by the server."},
BroadcastChatDeath={Params="Message, [{{cClientHandle|ExcludeClient}}]",Return="",Notes="Prepends Gray [DEATH] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For when a player dies."},
BroadcastChatFailure={Params="Message, [{{cClientHandle|ExcludeClient}}]",Return="",Notes="Prepends Rose [INFO] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For a command that failed to run because of insufficient permissions, etc."},
BroadcastChatFatal={Params="Message, [{{cClientHandle|ExcludeClient}}]",Return="",Notes="Prepends Red [FATAL] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For a plugin that crashed, or similar."},
BroadcastChatInfo={Params="Message, [{{cClientHandle|ExcludeClient}}]",Return="",Notes="Prepends Yellow [INFO] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For informational messages, such as command usage."},
BroadcastChatSuccess={Params="Message, [{{cClientHandle|ExcludeClient}}]",Return="",Notes="Prepends Green [INFO] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For success messages."},
BroadcastChatWarning={Params="Message, [{{cClientHandle|ExcludeClient}}]",Return="",Notes="Prepends Rose [WARN] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For concerning events, such as plugin reload etc."},
BroadcastEntityAnimation={Params="{{cEntity|TargetEntity}}, Animation, [{{cClientHandle|ExcludeClient}}]",Return="",Notes="Sends an animation of an entity to all clienthandles (except ExcludeClient if given)"},
BroadcastParticleEffect={Params="ParticleName, X, Y, Z, OffSetX, OffSetY, OffSetZ, ParticleData, ParticleAmmount, [{{cClientHandle|ExcludeClient}}]",Return="",Notes="Spawns the specified particles to all players in the world exept the optional ExeptClient. A list of available particles by thinkofdeath can be found {{https://gist.github.com/thinkofdeath/5110835|Here}}"},
BroadcastSoundEffect={Params="SoundName, X, Y, Z, Volume, Pitch, [{{cClientHandle|ExcludeClient}}]",Return="",Notes="Sends the specified sound effect to all players in this world, except the optional ExceptClient"},
BroadcastSoundParticleEffect={Params="EffectID, X, Y, Z, EffectData, [{{cClientHandle|ExcludeClient}}]",Return="",Notes="Sends the specified effect to all players in this world, except the optional ExceptClient"},
CastThunderbolt={Params="X, Y, Z",Return="",Notes="Creates a thunderbolt at the specified coords"},
ChangeWeather={Params="",Return="",Notes="Forces the weather to change in the next game tick. Weather is changed according to the normal rules: wSunny <-> wRain <-> wStorm"},
ChunkStay={Params="ChunkCoordTable, OnChunkAvailable, OnAllChunksAvailable",Return="",Notes="Queues the specified chunks to be loaded or generated and calls the specified callbacks once they are loaded. ChunkCoordTable is an arra-table of chunk coords, each coord being a table of 2 numbers: { {Chunk1x, Chunk1z}, {Chunk2x, Chunk2z}, ...}. When any of those chunks are made available (including being available at the start of this call), the OnChunkAvailable() callback is called. When all the chunks are available, the OnAllChunksAvailable() callback is called. The function signatures are: <pre class=\"prettyprint lang-lua\">function OnChunkAvailable(ChunkX, ChunkZ)\nfunction OnAllChunksAvailable()</pre> All return values from the callbacks are ignored."},
CreateProjectile={Params="X, Y, Z, {{cProjectileEntity|ProjectileKind}}, {{cEntity|Creator}}, {{cItem|Originating Item}}, [{{Vector3d|Speed}}]",Return="",Notes="Creates a new projectile of the specified kind at the specified coords. The projectile's creator is set to Creator (may be nil). The item that created the projectile entity, commonly the {{cPlayer|player}}'s currently equipped item, is used at present for fireworks to correctly set their entity metadata. It is not used for any other projectile. Optional speed indicates the initial speed for the projectile."},
DigBlock={Params="X, Y, Z",Return="",Notes="Replaces the specified block with air, without dropping the usual pickups for the block. Wakes up the simulators for the block and its neighbors."},
DoExplosionAt={Params="Force, X, Y, Z, CanCauseFire, Source, SourceData",Return="",Notes="Creates an explosion of the specified relative force in the specified position. If CanCauseFire is set, the explosion will set blocks on fire, too. The Source parameter specifies the source of the explosion, one of the esXXX constants. The SourceData parameter is specific to each source type, usually it provides more info about the source."},
DoWithBlockEntityAt={Params="BlockX, BlockY, BlockZ, CallbackFunction",Return="bool",Notes="If there is a block entity at the specified coords, calls the CallbackFunction with the {{cBlockEntity}} parameter representing the block entity. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cBlockEntity|BlockEntity}})</pre> The function returns false if there is no block entity, or if there is, it returns the bool value that the callback has returned. Use {{tolua}}.cast() to cast the Callback's BlockEntity parameter to the correct {{cBlockEntity}} descendant."},
DoWithBeaconAt={Params="BlockX, BlockY, BlockZ, CallbackFunction",Return="bool",Notes="If there is a beacon at the specified coords, calls the CallbackFunction with the {{cBeaconEntity}} parameter representing the beacon. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cBeaconEntity|BeaconEntity}})</pre> The function returns false if there is no beacon, or if there is, it returns the bool value that the callback has returned."},
DoWithChestAt={Params="BlockX, BlockY, BlockZ, CallbackFunction",Return="bool",Notes="If there is a chest at the specified coords, calls the CallbackFunction with the {{cChestEntity}} parameter representing the chest. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cChestEntity|ChestEntity}})</pre> The function returns false if there is no chest, or if there is, it returns the bool value that the callback has returned."},
DoWithCommandBlockAt={Params="BlockX, BlockY, BlockZ, CallbackFunction",Return="bool",Notes="If there is a command block at the specified coords, calls the CallbackFunction with the {{cCommandBlockEntity}} parameter representing the command block. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cCommandBlockEntity|CommandBlockEntity}})</pre> The function returns false if there is no command block, or if there is, it returns the bool value that the callback has returned."},
DoWithDispenserAt={Params="BlockX, BlockY, BlockZ, CallbackFunction",Return="bool",Notes="If there is a dispenser at the specified coords, calls the CallbackFunction with the {{cDispenserEntity}} parameter representing the dispenser. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cDispenserEntity|DispenserEntity}})</pre> The function returns false if there is no dispenser, or if there is, it returns the bool value that the callback has returned."},
DoWithDropSpenserAt={Params="BlockX, BlockY, BlockZ, CallbackFunction",Return="bool",Notes="If there is a dropper or a dispenser at the specified coords, calls the CallbackFunction with the {{cDropSpenserEntity}} parameter representing the dropper or dispenser. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cDropSpenserEntity|DropSpenserEntity}})</pre> Note that this can be used to access both dispensers and droppers in a similar way. The function returns false if there is neither dispenser nor dropper, or if there is, it returns the bool value that the callback has returned."},
DoWithDropperAt={Params="BlockX, BlockY, BlockZ, CallbackFunction",Return="bool",Notes="If there is a dropper at the specified coords, calls the CallbackFunction with the {{cDropperEntity}} parameter representing the dropper. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cDropperEntity|DropperEntity}})</pre> The function returns false if there is no dropper, or if there is, it returns the bool value that the callback has returned."},
DoWithEntityByID={Params="EntityID, CallbackFunction",Return="bool",Notes="If an entity with the specified ID exists, calls the callback with the {{cEntity}} parameter representing the entity. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cEntity|Entity}})</pre> The function returns false if the entity was not found, and it returns the same bool value that the callback has returned if the entity was found."},
DoWithFlowerPotAt={Params="BlockX, BlockY, BlockZ, CallbackFunction",Return="bool",Notes="If there is a flower pot at the specified coords, calls the CallbackFunction with the {{cFlowerPotEntity}} parameter representing the flower pot. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cFlowerPotEntity|FlowerPotEntity}})</pre> The function returns false if there is no flower pot, or if there is, it returns the bool value that the callback has returned."},
DoWithFurnaceAt={Params="BlockX, BlockY, BlockZ, CallbackFunction",Return="bool",Notes="If there is a furnace at the specified coords, calls the CallbackFunction with the {{cFurnaceEntity}} parameter representing the furnace. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cFurnaceEntity|FurnaceEntity}})</pre> The function returns false if there is no furnace, or if there is, it returns the bool value that the callback has returned."},
DoWithMobHeadAt={Params="BlockX, BlockY, BlockZ, CallbackFunction",Return="bool",Notes="If there is a mob head at the specified coords, calls the CallbackFunction with the {{cMobHeadEntity}} parameter representing the furnace. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cMobHeadEntity|MobHeadEntity}})</pre> The function returns false if there is no mob head, or if there is, it returns the bool value that the callback has returned."},
DoWithNoteBlockAt={Params="BlockX, BlockY, BlockZ, CallbackFunction",Return="bool",Notes="If there is a note block at the specified coords, calls the CallbackFunction with the {{cNoteEntity}} parameter representing the note block. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cNoteEntity|NoteEntity}})</pre> The function returns false if there is no note block, or if there is, it returns the bool value that the callback has returned."},
DoWithPlayer={Params="PlayerName, CallbackFunction",Return="bool",Notes="If there is a player of the specified name (exact match), calls the CallbackFunction with the {{cPlayer}} parameter representing the player. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cPlayer|Player}})</pre> The function returns false if the player was not found, or whatever bool value the callback returned if the player was found."},
DoWithPlayerByUUID={Params="PlayerUUID, CallbackFunction",Return="bool",Notes="If there is the player with the uuid, calls the CallbackFunction with the {{cPlayer}} parameter representing the player. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cPlayer|Player}})</pre> The function returns false if the player was not found, or whatever bool value the callback returned if the player was found."},
{Params="BlockX, BlockY, BlockZ, BlockType, BlockMeta",Return="",Notes="Sets the block at the specified coords, without waking up the simulators or replacing the block entities for the previous block type. Do not use if the block being replaced has a block entity tied to it!"},
{Params="{{Vector3i|BlockCoords}}, BlockType, BlockMeta",Return="",Notes="Sets the block at the specified coords, without waking up the simulators or replacing the block entities for the previous block type. Do not use if the block being replaced has a block entity tied to it!"},
FindAndDoWithPlayer={Params="PlayerName, CallbackFunction",Return="bool",Notes="Calls the given callback function for the player with the name best matching the name string provided.<br>This function is case-insensitive and will match partial names.<br>Returns false if player not found or there is ambiguity, true otherwise. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cPlayer|Player}})</pre>"},
ForEachBlockEntityInChunk={Params="ChunkX, ChunkZ, CallbackFunction",Return="bool",Notes="Calls the specified callback for each block entity in the chunk. Returns true if all block entities in the chunk have been processed (including when there are zero block entities), or false if the callback has aborted the enumeration by returning true. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cBlockEntity|BlockEntity}})</pre> The callback should return false or no value to continue with the next block entity, or true to abort the enumeration. Use {{tolua}}.cast() to cast the Callback's BlockEntity parameter to the correct {{cBlockEntity}} descendant."},
ForEachChestInChunk={Params="ChunkX, ChunkZ, CallbackFunction",Return="bool",Notes="Calls the specified callback for each chest in the chunk. Returns true if all chests in the chunk have been processed (including when there are zero chests), or false if the callback has aborted the enumeration by returning true. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cChestEntity|ChestEntity}})</pre> The callback should return false or no value to continue with the next chest, or true to abort the enumeration."},
ForEachEntity={Params="CallbackFunction",Return="bool",Notes="Calls the specified callback for each entity in the loaded world. Returns true if all the entities have been processed (including when there are zero entities), or false if the callback function has aborted the enumeration by returning true. The callback function has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cEntity|Entity}})</pre> The callback should return false or no value to continue with the next entity, or true to abort the enumeration."},
ForEachEntityInBox={Params="{{cBoundingBox|Box}}, CallbackFunction",Return="bool",Notes="Calls the specified callback for each entity in the specified bounding box. Returns true if all the entities have been processed (including when there are zero entities), or false if the callback function has aborted the enumeration by returning true. If any chunk within the bounding box is not valid, it is silently skipped without any notification. The callback function has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cEntity|Entity}})</pre> The callback should return false or no value to continue with the next entity, or true to abort the enumeration."},
ForEachEntityInChunk={Params="ChunkX, ChunkZ, CallbackFunction",Return="bool",Notes="Calls the specified callback for each entity in the specified chunk. Returns true if all the entities have been processed (including when there are zero entities), or false if the chunk is not loaded or the callback function has aborted the enumeration by returning true. The callback function has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cEntity|Entity}})</pre> The callback should return false or no value to continue with the next entity, or true to abort the enumeration."},
ForEachFurnaceInChunk={Params="ChunkX, ChunkZ, CallbackFunction",Return="bool",Notes="Calls the specified callback for each furnace in the chunk. Returns true if all furnaces in the chunk have been processed (including when there are zero furnaces), or false if the callback has aborted the enumeration by returning true. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cFurnaceEntity|FurnaceEntity}})</pre> The callback should return false or no value to continue with the next furnace, or true to abort the enumeration."},
ForEachPlayer={Params="CallbackFunction",Return="bool",Notes="Calls the specified callback for each player in the loaded world. Returns true if all the players have been processed (including when there are zero players), or false if the callback function has aborted the enumeration by returning true. The callback function has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cPlayer|Player}})</pre> The callback should return false or no value to continue with the next player, or true to abort the enumeration."},
GenerateChunk={Params="ChunkX, ChunkZ",Return="",Notes="Queues the specified chunk in the chunk generator. Ignored if the chunk is already generated (use RegenerateChunk() to force chunk re-generation)."},
GetBiomeAt={Params="BlockX, BlockZ",Return="eBiome",Notes="Returns the biome at the specified coords. Reads the biome from the chunk, if it is loaded, otherwise it uses the chunk generator to provide the biome value."},
{Params="BlockX, BlockY, BlockZ",Return="BLOCKTYPE",Notes="Returns the block type of the block at the specified coords, or 0 if the appropriate chunk is not loaded."},
{Params="{{Vector3i|BlockCoords}}",Return="BLOCKTYPE",Notes="Returns the block type of the block at the specified coords, or 0 if the appropriate chunk is not loaded."},
GetBlockBlockLight={Params="BlockX, BlockY, BlockZ",Return="number",Notes="Returns the amount of block light at the specified coords, or 0 if the appropriate chunk is not loaded."},
GetBlockInfo={Params="BlockX, BlockY, BlockZ",Return="BlockValid, BlockType, BlockMeta, BlockSkyLight, BlockBlockLight",Notes="Returns the complete block info for the block at the specified coords. The first value specifies if the block is in a valid loaded chunk, the other values are valid only if BlockValid is true."},
{Params="BlockX, BlockY, BlockZ",Return="number",Notes="Returns the block metadata of the block at the specified coords, or 0 if the appropriate chunk is not loaded."},
{Params="{{Vector3i|BlockCoords}}",Return="number",Notes="Returns the block metadata of the block at the specified coords, or 0 if the appropriate chunk is not loaded."},
GetBlockSkyLight={Params="BlockX, BlockY, BlockZ",Return="number",Notes="Returns the block skylight of the block at the specified coords, or 0 if the appropriate chunk is not loaded."},
GetBlockTypeMeta={Params="BlockX, BlockY, BlockZ",Return="BlockValid, BlockType, BlockMeta",Notes="Returns the block type and metadata for the block at the specified coords. The first value specifies if the block is in a valid loaded chunk, the other values are valid only if BlockValid is true."},
GetDefaultWeatherInterval={Params="eWeather",Return="",Notes="Returns the default weather interval for the specific weather type. Returns -1 for any unknown weather."},
GetDimension={Params="",Return="eDimension",Notes="Returns the dimension of the world - dimOverworld, dimNether or dimEnd."},
GetGameMode={Params="",Return="eGameMode",Notes="Returns the gamemode of the world - gmSurvival, gmCreative or gmAdventure."},
GetGeneratorQueueLength={Params="",Return="number",Notes="Returns the number of chunks that are queued in the chunk generator."},
GetHeight={Params="BlockX, BlockZ",Return="number",Notes="Returns the maximum height of the particula block column in the world. If the chunk is not loaded, it waits for it to load / generate. <b>WARNING</b>: Do not use, Use TryGetHeight() instead for a non-waiting version, otherwise you run the risk of a deadlock!"},
GetIniFileName={Params="",Return="string",Notes="Returns the name of the world.ini file that the world uses to store the information."},
GetMaxViewDistance={Params="",Return="number",Notes="Returns the maximum viewdistance that players can see in this world. The view distance is the amount of chunks around the player that the player can see."},
GetSignLines={Params="BlockX, BlockY, BlockZ",Return="IsValid, [Line1, Line2, Line3, Line4]",Notes="Returns true and the lines of a sign at the specified coords, or false if there is no sign at the coords."},
GetSpawnX={Params="",Return="number",Notes="Returns the X coord of the default spawn"},
GetSpawnY={Params="",Return="number",Notes="Returns the Y coord of the default spawn"},
GetSpawnZ={Params="",Return="number",Notes="Returns the Z coord of the default spawn"},
GetStorageLoadQueueLength={Params="",Return="number",Notes="Returns the number of chunks queued up for loading"},
GetStorageSaveQueueLength={Params="",Return="number",Notes="Returns the number of chunks queued up for saving"},
GetTicksUntilWeatherChange={Params="",Return="number",Notes="Returns the number of ticks that will pass before the weather is changed"},
GetTimeOfDay={Params="",Return="number",Notes="Returns the number of ticks that have passed from the sunrise, 0 .. 24000."},
GetTNTShrapnelLevel={Params="",Return="{{Globals#ShrapnelLevel|ShrapnelLevel}}",Notes="Returns the shrapnel level, representing the block types that are propelled outwards following an explosion. Based on this value and a random picker, blocks are selectively converted to physics entities (FallingSand) and flung outwards."},
GetWeather={Params="",Return="eWeather",Notes="Returns the current weather in the world (wSunny, wRain, wStorm). To check for weather, use IsWeatherXXX() functions instead."},
GetWorldAge={Params="",Return="number",Notes="Returns the total age of the world, in ticks. The age always grows, cannot be set by plugins and is unrelated to TimeOfDay."},
GrowCactus={Params="BlockX, BlockY, BlockZ, NumBlocksToGrow",Return="",Notes="Grows a cactus block at the specified coords, by up to the specified number of blocks. Adheres to the world's maximum cactus growth (GetMaxCactusHeight())."},
GrowMelonPumpkin={Params="BlockX, BlockY, BlockZ, StemType",Return="",Notes="Grows a melon or pumpkin, based on the stem type specified (assumed to be in the coords provided). Checks for normal melon / pumpkin growth conditions - stem not having another produce next to it and suitable ground below."},
GrowRipePlant={Params="BlockX, BlockY, BlockZ, IsByBonemeal",Return="bool",Notes="Grows the plant at the specified coords. If IsByBonemeal is true, checks first if the specified plant type is bonemealable in the settings. Returns true if the plant was grown, false if not."},
GrowSugarcane={Params="BlockX, BlockY, BlockZ, NumBlocksToGrow",Return="",Notes="Grows a sugarcane block at the specified coords, by up to the specified number of blocks. Adheres to the world's maximum sugarcane growth (GetMaxSugarcaneHeight())."},
GrowTree={Params="BlockX, BlockY, BlockZ",Return="",Notes="Grows a tree based at the specified coords. If there is a sapling there, grows the tree based on that sapling, otherwise chooses a tree image based on the biome."},
GrowTreeByBiome={Params="BlockX, BlockY, BlockZ",Return="",Notes="Grows a tree based at the specified coords. The tree type is picked from types available for the biome at those coords."},
GrowTreeFromSapling={Params="BlockX, BlockY, BlockZ, SaplingMeta",Return="",Notes="Grows a tree based at the specified coords. The tree type is determined from the sapling meta (the sapling itself needn't be present)."},
IsBlockDirectlyWatered={Params="BlockX, BlockY, BlockZ",Return="bool",Notes="Returns true if the specified block has a water block right next to it (on the X/Z axes)"},
IsTrapdoorOpen={Params="BlockX, BlockY, BlockZ",Return="bool",Notes="Returns false if there is no trapdoor there or if the block isn't a trapdoor or if the chunk wasn't loaded. Returns true if trapdoor is open."},
IsWeatherSunnyAt={Params="BlockX, BlockZ",Return="bool",Notes="Returns true if the current weather is sunny at the specified location (takes into account biomes)."},
IsWeatherWet={Params="",Return="bool",Notes="Returns true if the current world has any precipitation (rain or storm)."},
IsWeatherWetAt={Params="BlockX, BlockZ",Return="bool",Notes="Returns true if the specified location has any precipitation (rain or storm) (takes into account biomes)."},
PrepareChunk={Params="ChunkX, ChunkZ, [Callback]",Return="",Notes="Queues the chunk for preparing - making sure that it's generated and lit. It is legal to call with no callback. The callback function has the following signature: <pre class=\"prettyprint lang-lua\">function Callback(ChunkX, ChunkZ)</pre>"},
QueueBlockForTick={Params="BlockX, BlockY, BlockZ, TicksToWait",Return="",Notes="Queues the specified block to be ticked after the specified number of gameticks."},
QueueSaveAllChunks={Params="",Return="",Notes="Queues all chunks to be saved in the world storage thread"},
QueueSetBlock={Params="BlockX, BlockY, BlockZ, BlockType, BlockMeta, TickDelay",Return="",Notes="Queues the block to be set to the specified blocktype and meta after the specified amount of game ticks. Uses SetBlock() for the actual setting, so simulators are woken up and block entities are handled correctly."},
QueueTask={Params="TaskFunction",Return="",Notes="Queues the specified function to be executed in the tick thread. This is the primary means of interaction with a cWorld from the WebAdmin page handlers (see {{WebWorldThreads}}). The function signature is <pre class=\"pretty-print lang-lua\">function()</pre>All return values from the function are ignored. Note that this function is actually called *after* the QueueTask() function returns. Note that it is unsafe to store references to Cuberite objects, such as entities, across from the caller to the task handler function; store the EntityID instead."},
RegenerateChunk={Params="ChunkX, ChunkZ",Return="",Notes="Queues the specified chunk to be re-generated, overwriting the current data. To queue a chunk for generating only if it doesn't exist, use the GenerateChunk() instead."},
ScheduleTask={Params="DelayTicks, TaskFunction",Return="",Notes="Queues the specified function to be executed in the world's tick thread after a the specified number of ticks. This enables operations to be queued for execution in the future. The function signature is <pre class=\"pretty-print lang-lua\">function({{cWorld|World}})</pre>All return values from the function are ignored. Note that it is unsafe to store references to Cuberite objects, such as entities, across from the caller to the task handler function; store the EntityID instead."},
SendBlockTo={Params="BlockX, BlockY, BlockZ, {{cPlayer|Player}}",Return="",Notes="Sends the block at the specified coords to the specified player's client, as an UpdateBlock packet."},
{Params="MinX, MaxX, MinZ, MaxZ, EMCSBiome",Return="bool",Notes="Sets the biome in the rectangular area specified. Returns true if successful, false if any of the chunks were unloaded."},
{Params="{{cCuboid|Cuboid}}, EMCSBiome",Return="bool",Notes="Sets the biome in the cuboid specified. Returns true if successful, false if any of the chunks were unloaded. The cuboid needn't be sorted."},
},
SetBiomeAt={Params="BlockX, BlockZ, EMCSBiome",Return="bool",Notes="Sets the biome at the specified block coords. Returns true if successful, false otherwise."},
SetBlock={Params="BlockX, BlockY, BlockZ, BlockType, BlockMeta",Return="",Notes="Sets the block at the specified coords, replaces the block entities for the previous block type, creates a new block entity for the new block, if appropriate, and wakes up the simulators. This is the preferred way to set blocks, as opposed to FastSetBlock(), which is only to be used under special circumstances."},
SetBlockMeta=
{
{Params="BlockX, BlockY, BlockZ, BlockMeta",Return="",Notes="Sets the meta for the block at the specified coords."},
{Params="{{Vector3i|BlockCoords}}, BlockMeta",Return="",Notes="Sets the meta for the block at the specified coords."},
SetChunkAlwaysTicked={Params="ChunkX, ChunkZ, IsAlwaysTicked",Return="",Notes="Sets the chunk to always be ticked even when it doesn't contain any clients. IsAlwaysTicked set to true turns forced ticking on, set to false turns it off. Every call with 'true' should be paired with a later call with 'false', otherwise the ticking won't stop. Multiple actions can request ticking independently, the ticking will continue until the last call with 'false'. Note that when the chunk unloads, it loses the value of this flag."},
SetCommandBlockCommand={Params="BlockX, BlockY, BlockZ, Command",Return="bool",Notes="Sets the command to be executed in a command block at the specified coordinates. Returns if command was changed."},
SetCommandBlocksEnabled={Params="IsEnabled (bool)",Return="",Notes="Sets whether command blocks should be enabled on the (entire) server."},
SetShouldUseChatPrefixes={Params="",Return="ShouldUse (bool)",Notes="Sets whether coloured chat prefixes such as [INFO] is used with the SendMessageXXX() or BroadcastChatXXX(), or simply the entire message is coloured in the respective colour."},
SetSignLines={Params="X, Y, Z, Line1, Line2, Line3, Line4, [{{cPlayer|Player}}]",Return="",Notes="Sets the sign text at the specified coords. The sign-updating hooks are called for the change. The Player parameter is used to indicate the player from whom the change has come, it may be nil."},
SetWeather={Params="Weather",Return="",Notes="Sets the current weather (wSunny, wRain, wStorm) and resets the TicksUntilWeatherChange to the default value for the new weather. The normal weather-changing hooks are called for the change."},
ShouldBroadcastAchievementMessages={Params="",Return="bool",Notes="Returns true if the server should broadcast achievement messages in this world."},
ShouldBroadcastDeathMessages={Params="",Return="bool",Notes="Returns true if the server should broadcast death messages in this world."},
ShouldUseChatPrefixes={Params="",Return="bool",Notes="Returns whether coloured chat prefixes are prepended to chat messages or the entire message is simply coloured."},
ShouldLavaSpawnFire={Params="",Return="bool",Notes="Returns true if the world is configured to spawn fires near lava (world.ini: [Physics].ShouldLavaSpawnFire value)"},
{Params="{{cItems|Pickups}}, X, Y, Z, FlyAwaySpeed",Return="",Notes="Spawns the specified pickups at the position specified. The FlyAway speed is used to initialize the random speed in which the pickups fly away from the spawn position."},
{Params="{{cItems|Pickups}}, X, Y, Z, SpeedX, SpeedY, SpeedZ",Return="",Notes="Spawns the specified pickups at the position specified. All the pickups fly away from the spawn position using the specified speed."},
SpawnMinecart={Params="X, Y, Z, MinecartType, Item, BlockHeight",Return="number",Notes="Spawns a minecart at the specific coordinates. MinecartType is the item type of the minecart. If the minecart is an empty minecart then the given item is the block inside the minecart, and blockheight is the distance of the block and the minecart."},
SpawnMob={Params="X, Y, Z, {{cMonster|MonsterType}}, [Baby]",Return="EntityID",Notes="Spawns the specified type of mob at the specified coords. If the Baby parameter is true, the mob will be a baby. Returns the EntityID of the creates entity, or -1 on failure. "},
SpawnFallingBlock={Params="X, Y, Z, BlockType, BlockMeta",Return="EntityID",Notes="Spawns an {{cFallingBlock|Falling Block}} entity at the specified coords with the given block type/meta"},
SpawnExperienceOrb={Params="X, Y, Z, Reward",Return="EntityID",Notes="Spawns an {{cExpOrb|experience orb}} at the specified coords, with the given reward"},
SpawnPrimedTNT={Params="X, Y, Z, FuseTicks, InitialVelocityCoeff",Return="",Notes="Spawns a {{cTNTEntity|primed TNT entity}} at the specified coords, with the given fuse ticks. The entity gets a random speed multiplied by the InitialVelocityCoeff, 1 being the default value."},
TryGetHeight={Params="BlockX, BlockZ",Return="IsValid, Height",Notes="Returns true and height of the highest non-air block if the chunk is loaded, or false otherwise."},
UseBlockEntity={Params="{{cPlayer|Player}}, BlockX, BlockY, BlockZ",Return="",Notes="Makes the specified Player use the block entity at the specified coords (open chest UI, etc.) If the cords are in an unloaded chunk or there's no block entity, ignores the call."},
WakeUpSimulators={Params="BlockX, BlockY, BlockZ",Return="",Notes="Wakes up the simulators for the specified block."},
WakeUpSimulatorsInArea={Params="MinBlockX, MaxBlockX, MinBlockY, MaxBlockY, MinBlockZ, MaxBlockZ",Return="",Notes="Wakes up the simulators for all the blocks in the specified area (edges inclusive)."},
IsArmor={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of an armor."},
IsAxe={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of an axe."},
IsBoots={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of boots."},
IsChestPlate={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of a chestplate."},
IsHelmet={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of a helmet."},
IsHoe={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of a hoe."},
IsLeggings={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of a leggings."},
IsPickaxe={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of a pickaxe."},
IsShovel={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of a shovel."},
IsSword={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of a sword."},
IsTool={Params="ItemType",Return="bool",Notes="(STATIC) Returns true if the specified item type is any kind of a tool (axe, hoe, pickaxe, shovel or FIXME: sword)"},
new={Params="CallbacksTable, [SeparatorChar]",Return="XMLParser object",Notes="Creates a new XML parser object, with the specified callbacks table and optional separator character."},
<tr><td>StartElement</td><td>Parser,ElementName,AttributesTable</td><td>CalledwhentheparserdetectsthestartofanXMLelement.TheAttributesTableisaLuatablecontainingalltheelement's attributes, both in the array section (in the order received) and in the dictionary section.</td></tr>
open_memory={Return="DBClass",Notes="Opens an SQLite database in memory and returns its handle as userdata. In case of an error, the function returns nil, an error code and an error message. (In-memory databases are volatile as they are never stored on disk.)"},
Attacker={Type="{{cEntity}}",Notes="The entity who is attacking. Only valid if dtAttack."},
DamageType={Type="eDamageType",Notes="Source of the damage. One of the dtXXX constants."},
FinalDamage={Type="number",Notes=" The final amount of damage that will be applied to the Receiver. It is the RawDamage minus any Receiver's armor-protection "},
Knockback={Type="{{Vector3d}}",Notes="Vector specifying the amount and direction of knockback that will be applied to the Receiver "},
RawDamage={Type="number",Notes="Amount of damage that the attack produces on the Receiver, including the Attacker's equipped weapon, but excluding the Receiver's armor."},
cast={Params="Object, TypeStr",Return="Object",Notes="Casts the object to the specified type.<br/><b>Note:</b> This is a potentially unsafe operation and it could crash the server. There is normally no need to use this function at all, so don't use it unless you know exactly what you're doing."},
type={Params="Object",Return="TypeStr",Notes="Returns a string representing the type of the object. This works similar to Lua's built-in type() function, but recognizes the underlying C++ classes, too."},
AddFaceDirection={Params="BlockX, BlockY, BlockZ, BlockFace, [IsInverse]",Return="BlockX, BlockY, BlockZ",Notes="Returns the coords of a block adjacent to the specified block through the specified {{Globals#BlockFaces|face}}"},
BlockFaceToString={Params="{{Globals#BlockFaces|eBlockFace}}",Return="string",Notes="Returns the string representation of the {{Globals#BlockFaces|eBlockFace}} constant. Uses the axis-direction-based names, such as BLOCK_FACE_XP."},
ClickActionToString={Params="{{Globals#ClickAction|ClickAction}}",Return="string",Notes="Returns a string description of the ClickAction enumerated value"},
DamageTypeToString={Params="{{Globals#DamageType|DamageType}}",Return="string",Notes="Converts the {{Globals#DamageType|DamageType}} enumerated value to a string representation "},
GetIniItemSet={Params="IniFile, SectionName, KeyName, DefaultValue",Return="{{cItem}}",Notes="Returns the item that has been read from the specified INI file value. If the value is not present in the INI file, the DefaultValue is stored in the file and parsed as the result. Returns empty item if the value cannot be parsed. "},
IsBiomeNoDownfall={Params="Biome",Return="bool",Notes="Returns true if the biome is 'dry', that is, there is no precipitation during rains and storms."},
ItemToFullString={Params="{{cItem|cItem}}",Return="string",Notes="Returns the string representation of the item, in the format 'ItemTypeText:ItemDamage * Count'"},
{Params="string",Notes="Logs a text into the server console using 'normal' severity (gray text)"},
{Params="{{cCompositeChat|CompositeChat}}",Notes="Logs the {{cCompositeChat}}'s human-readable text into the server console. The severity is converted from the CompositeChat's MessageType."},
{Params="string",Notes="Logs a text into the server console using 'error' severity (black text on red background)"},
{Params="{{cCompositeChat|CompositeChat}}",Notes="Logs the {{cCompositeChat}}'s human-readable text into the server console using 'error' severity (black text on red background)"},
},
LOGINFO=
{
{Params="string",Notes="Logs a text into the server console using 'info' severity (yellow text)"},
{Params="{{cCompositeChat|CompositeChat}}",Notes="Logs the {{cCompositeChat}}'s human-readable text into the server console using 'info' severity (yellow text)"},
},
LOGWARN=
{
{Params="string",Notes="Logs a text into the server console using 'warning' severity (red text); OBSOLETE, use LOGWARNING() instead"},
{Params="{{cCompositeChat|CompositeChat}}",Notes="Logs the {{cCompositeChat}}'s human-readable text into the server console using 'warning' severity (red text); OBSOLETE, use LOGWARNING() instead"},
},
LOGWARNING=
{
{Params="string",Notes="Logs a text into the server console using 'warning' severity (red text)"},
{Params="{{cCompositeChat|CompositeChat}}",Notes="Logs the {{cCompositeChat}}'s human-readable text into the server console using 'warning' severity (red text)"},
MirrorBlockFaceY={Params="{{Globals#BlockFaces|eBlockFace}}",Return="{{Globals#BlockFaces|eBlockFace}}",Notes="Returns the {{Globals#BlockFaces|eBlockFace}} that corresponds to the given {{Globals#BlockFaces|eBlockFace}} after mirroring it around the Y axis (or rotating 180 degrees around it)."},
ReplaceString={Params="full-string, to-be-replaced-string, to-replace-string",Return="string",Notes="Replaces *each* occurence of to-be-replaced-string in full-string with to-replace-string"},
RotateBlockFaceCCW={Params="{{Globals#BlockFaces|eBlockFace}}",Return="{{Globals#BlockFaces|eBlockFace}}",Notes="Returns the {{Globals#BlockFaces|eBlockFace}} that corresponds to the given {{Globals#BlockFaces|eBlockFace}} after rotating it around the Y axis 90 degrees counter-clockwise."},
RotateBlockFaceCW={Params="{{Globals#BlockFaces|eBlockFace}}",Return="{{Globals#BlockFaces|eBlockFace}}",Notes="Returns the {{Globals#BlockFaces|eBlockFace}} that corresponds to the given {{Globals#BlockFaces|eBlockFace}} after rotating it around the Y axis 90 degrees clockwise."},
StringSplit={Params="string, SeperatorsString",Return="array table of strings",Notes="Seperates string into multiple by splitting every time any of the characters in SeperatorsString is encountered."},
StringSplitAndTrim={Params="string, SeperatorsString",Return="array table of strings",Notes="Seperates string into multiple by splitting every time any of the characters in SeperatorsString is encountered. Each of the separate strings is trimmed (whitespace removed from the beginning and end of the string)"},
StringSplitWithQuotes={Params="string, SeperatorsString",Return="array table of strings",Notes="Seperates string into multiple by splitting every time any of the characters in SeperatorsString is encountered. Whitespace wrapped with single or double quotes will be ignored"},
StringToBiome={Params="string",Return="{{Globals#BiomeTypes|BiomeType}}",Notes="Converts a string representation to a {{Globals#BiomeTypes|BiomeType}} enumerated value"},
StringToDamageType={Params="string",Return="{{Globals#DamageType|DamageType}}",Notes="Converts a string representation to a {{Globals#DamageType|DamageType}} enumerated value."},
StringToDimension={Params="string",Return="{{Globals#WorldDimension|Dimension}}",Notes="Converts a string representation to a {{Globals#WorldDimension|Dimension}} enumerated value"},
StringToMobType={Params="string",Return="{{Globals#MobType|MobType}}",Notes="<b>DEPRECATED!</b> Please use cMonster:StringToMobType(). Converts a string representation to a {{Globals#MobType|MobType}} enumerated value"},
md5={Params="string",Return="string",Notes="<b>OBSOLETE</b>, use the {{cCryptoHash}} functions instead.<br>Converts a string to a raw binary md5 hash."},