-- This is a MCServer API file automatically generated by the APIDump plugin -- Note that any manual changes will be overwritten by the next dump return { cArrowEntity = { type = "class", description = [[ Represents the arrow when it is shot from the bow. A subclass of the {{cProjectileEntity}}. ]], childs = { ["CanPickup"] = { type = "method", description = [[Returns true if the specified player can pick the arrow when it's on the ground ]], }, ["GetBlockHit"] = { type = "method", }, ["GetDamageCoeff"] = { type = "method", description = [[Returns the damage coefficient stored within the arrow. The damage dealt by this arrow is multiplied by this coeff ]], }, ["GetPickupState"] = { type = "method", description = [[Returns the pickup state (one of the psXXX constants, above) ]], }, ["IsCritical"] = { type = "method", description = [[Returns true if the arrow should deal critical damage. Based on the bow charge when the arrow was shot. ]], }, ["SetDamageCoeff"] = { type = "method", description = [[Sets the damage coefficient. The damage dealt by this arrow is multiplied by this coeff ]], }, ["SetIsCritical"] = { type = "method", description = [[Sets the IsCritical flag on the arrow. Critical arrow deal additional damage ]], }, ["SetPickupState"] = { type = "method", description = [[Sets the pickup state (one of the psXXX constants, above) ]], }, }, }, cBeaconEntity = { type = "class", description = [[ A beacon entity is a {{cBlockEntityWithItems|cBlockEntityWithItems}} descendant that represents a beacon in the world. ]], childs = { ["CalculatePyramidLevel"] = { type = "method", description = [[Calculate the amount of layers the pyramid below the beacon has. ]], }, ["GetBeaconLevel"] = { type = "method", description = [[Returns the beacon level. (0 - 4) ]], }, ["GetPrimaryEffect"] = { type = "method", description = [[Returns the primary effect. ]], }, ["GetSecondaryEffect"] = { type = "method", description = [[Returns the secondary effect. ]], }, ["GiveEffects"] = { type = "method", description = [[Give the near-players the effects. ]], }, ["IsActive"] = { type = "method", description = [[Is the beacon active? ]], }, ["IsBeaconBlocked"] = { type = "method", description = [[Is the beacon blocked by non-transparent blocks that are higher than the beacon? ]], }, ["IsMineralBlock"] = { type = "method", description = [[Returns true if the block is a diamond block, a golden block, an iron block or an emerald block. ]], }, ["IsValidEffect"] = { type = "method", description = [[Returns true if the effect can be used. ]], }, ["SetPrimaryEffect"] = { type = "method", description = [[Select the primary effect. Returns false when the effect is invalid. ]], }, ["SetSecondaryEffect"] = { type = "method", description = [[Select the secondary effect. Returns false when the effect is invalid. ]], }, ["UpdateBeacon"] = { type = "method", description = [[Update the beacon. ]], }, }, }, cBlockArea = { type = "class", description = [[ This class is used when multiple adjacent blocks are to be manipulated. Because of chunking and multithreading, manipulating single blocks using {{cWorld|cWorld:SetBlock}}() is a rather time-consuming operation (locks for exclusive access need to be obtained, chunk lookup is done for each block), so whenever you need to manipulate multiple adjacent blocks, it's better to wrap the operation into a cBlockArea access. cBlockArea is capable of reading / writing across chunk boundaries, has no chunk lookups for get and set operations and is not subject to multithreading locking (because it is not shared among threads). cBlockArea remembers its origin (MinX, MinY, MinZ coords in the Read() call) and therefore supports absolute as well as relative get / set operations. Despite that, the contents of a cBlockArea can be written back into the world at any coords. cBlockArea can hold any combination of the following datatypes: - block types - block metas - blocklight - skylight Read() and Write() functions have parameters that tell the class which datatypes to read / write. Note that a datatype that has not been read cannot be written (FIXME). Typical usage: - Create cBlockArea object - Read an area from the world / load from file / create anew - Modify blocks inside cBlockArea - Write the area back to a world / save to file ]], childs = { ["() (constructor)"] = { type = "method", description = [[Creates a new empty cBlockArea object ]], }, ["Clear"] = { type = "method", description = [[Clears the object, resets it to zero size ]], }, ["CopyFrom"] = { type = "method", description = [[Copies contents from BlockAreaSrc into self ]], }, ["CopyTo"] = { type = "method", description = [[Copies contents from self into BlockAreaDst. ]], }, ["CountNonAirBlocks"] = { type = "method", description = [[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). ]], }, ["Create"] = { type = "method", description = [[Initializes this BlockArea to an empty area of the specified size and origin of {0, 0, 0}. Any previous contents are lost. ]], }, ["Crop"] = { type = "method", description = [[Crops the specified number of blocks from each border. Modifies the size of this blockarea object. ]], }, ["DumpToRawFile"] = { type = "method", description = [[Dumps the raw data into a file. For debugging purposes only. ]], }, ["Expand"] = { type = "method", description = [[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"] = { type = "method", description = [[Fills the entire block area with the same values, specified. Uses the DataTypes param to determine which content types are modified. ]], }, ["FillRelCuboid"] = { type = "method", description = [[Fills the specified cuboid with the same values (like Fill() ). ]], }, ["FillRelCuboid"] = { type = "method", description = [[Fills the specified cuboid (in relative coords) with the same values (like Fill() ). ]], }, ["GetBlockLight"] = { type = "method", description = [[Returns the blocklight at the specified absolute coords ]], }, ["GetBlockMeta"] = { type = "method", description = [[Returns the block meta at the specified absolute coords ]], }, ["GetBlockSkyLight"] = { type = "method", description = [[Returns the skylight at the specified absolute coords ]], }, ["GetBlockType"] = { type = "method", description = [[Returns the block type at the specified absolute coords ]], }, ["GetBlockTypeMeta"] = { type = "method", description = [[Returns the block type and meta at the specified absolute coords ]], }, ["GetCoordRange"] = { type = "method", description = [[Returns the maximum relative coords in all 3 axes. See also GetSize(). ]], }, ["GetDataTypes"] = { type = "method", description = [[Returns the mask of datatypes that the object is currently holding ]], }, ["GetNonAirCropRelCoords"] = { type = "method", description = [[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. ]], }, ["GetOrigin"] = { type = "method", description = [[Returns the origin coords of where the area was read from. ]], }, ["GetOriginX"] = { type = "method", description = [[Returns the origin x-coord ]], }, ["GetOriginY"] = { type = "method", description = [[Returns the origin y-coord ]], }, ["GetOriginZ"] = { type = "method", description = [[Returns the origin z-coord ]], }, ["GetRelBlockLight"] = { type = "method", description = [[Returns the blocklight at the specified relative coords ]], }, ["GetRelBlockMeta"] = { type = "method", description = [[Returns the block meta at the specified relative coords ]], }, ["GetRelBlockSkyLight"] = { type = "method", description = [[Returns the skylight at the specified relative coords ]], }, ["GetRelBlockType"] = { type = "method", description = [[Returns the block type at the specified relative coords ]], }, ["GetRelBlockTypeMeta"] = { type = "method", description = [[Returns the block type and meta at the specified relative coords ]], }, ["GetSize"] = { type = "method", description = [[Returns the size of the area in all 3 axes. See also GetCoordRange(). ]], }, ["GetSizeX"] = { type = "method", description = [[Returns the size of the held data in the x-axis ]], }, ["GetSizeY"] = { type = "method", description = [[Returns the size of the held data in the y-axis ]], }, ["GetSizeZ"] = { type = "method", description = [[Returns the size of the held data in the z-axis ]], }, ["GetVolume"] = { type = "method", description = [[Returns the volume of the area - the total number of blocks stored within. ]], }, ["GetWEOffset"] = { type = "method", description = [[Returns the WE offset, a data value sometimes stored in the schematic files. MCServer doesn't use this value, but provides access to it using this method. The default is {0, 0, 0}. ]], }, ["HasBlockLights"] = { type = "method", description = [[Returns true if current datatypes include blocklight ]], }, ["HasBlockMetas"] = { type = "method", description = [[Returns true if current datatypes include block metas ]], }, ["HasBlockSkyLights"] = { type = "method", description = [[Returns true if current datatypes include skylight ]], }, ["HasBlockTypes"] = { type = "method", description = [[Returns true if current datatypes include block types ]], }, ["LoadFromSchematicFile"] = { type = "method", description = [[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"] = { type = "method", description = [[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. ]], }, ["Merge"] = { type = "method", description = [[Merges BlockAreaSrc into this object at the specified relative coords, using the specified strategy ]], }, ["Merge"] = { type = "method", description = [[Merges BlockAreaSrc into this object at the specified relative coords, using the specified strategy ]], }, ["MirrorXY"] = { type = "method", description = [[Mirrors this block area around the XY plane. Modifies blocks' metas (if present) to match (i. e. furnaces facing the opposite direction). ]], }, ["MirrorXYNoMeta"] = { type = "method", description = [[Mirrors this block area around the XY plane. Doesn't modify blocks' metas. ]], }, ["MirrorXZ"] = { type = "method", description = [[Mirrors this block area around the XZ plane. Modifies blocks' metas (if present) ]], }, ["MirrorXZNoMeta"] = { type = "method", description = [[Mirrors this block area around the XZ plane. Doesn't modify blocks' metas. ]], }, ["MirrorYZ"] = { type = "method", description = [[Mirrors this block area around the YZ plane. Modifies blocks' metas (if present) ]], }, ["MirrorYZNoMeta"] = { type = "method", description = [[Mirrors this block area around the YZ plane. Doesn't modify blocks' metas. ]], }, ["Read"] = { type = "method", description = [[Reads the area from World, returns true if successful ]], }, ["Read"] = { type = "method", description = [[Reads the area from World, returns true if successful ]], }, ["Read"] = { type = "method", description = [[Reads the area from World, returns true if successful ]], }, ["RelLine"] = { type = "method", description = [[Draws a line between the two specified points. Sets only datatypes specified by DataTypes (baXXX constants). ]], }, ["RelLine"] = { type = "method", description = [[Draws a line between the two specified points. Sets only datatypes specified by DataTypes (baXXX constants). ]], }, ["RotateCCW"] = { type = "method", description = [[Rotates the block area around the Y axis, counter-clockwise (east -> north). Modifies blocks' metas (if present) to match. ]], }, ["RotateCCWNoMeta"] = { type = "method", description = [[Rotates the block area around the Y axis, counter-clockwise (east -> north). Doesn't modify blocks' metas. ]], }, ["RotateCW"] = { type = "method", description = [[Rotates the block area around the Y axis, clockwise (north -> east). Modifies blocks' metas (if present) to match. ]], }, ["RotateCWNoMeta"] = { type = "method", description = [[Rotates the block area around the Y axis, clockwise (north -> east). Doesn't modify blocks' metas. ]], }, ["SaveToSchematicFile"] = { type = "method", description = [[Saves the current contents to a schematic file. Returns true if successful. ]], }, ["SaveToSchematicString"] = { type = "method", description = [[Saves the current contents to a string (in a .schematic file format). Returns the data if successful, nil if failed. ]], }, ["SetBlockLight"] = { type = "method", description = [[Sets the blocklight at the specified absolute coords ]], }, ["SetBlockMeta"] = { type = "method", description = [[Sets the block meta at the specified absolute coords ]], }, ["SetBlockSkyLight"] = { type = "method", description = [[Sets the skylight at the specified absolute coords ]], }, ["SetBlockType"] = { type = "method", description = [[Sets the block type at the specified absolute coords ]], }, ["SetBlockTypeMeta"] = { type = "method", description = [[Sets the block type and meta at the specified absolute coords ]], }, ["SetOrigin"] = { type = "method", description = [[Resets the origin for the absolute coords. Only affects how absolute coords are translated into relative coords. ]], }, ["SetOrigin"] = { type = "method", description = [[Resets the origin for the absolute coords. Only affects how absolute coords are translated into relative coords. ]], }, ["SetRelBlockLight"] = { type = "method", description = [[Sets the blocklight at the specified relative coords ]], }, ["SetRelBlockMeta"] = { type = "method", description = [[Sets the block meta at the specified relative coords ]], }, ["SetRelBlockSkyLight"] = { type = "method", description = [[Sets the skylight at the specified relative coords ]], }, ["SetRelBlockType"] = { type = "method", description = [[Sets the block type at the specified relative coords ]], }, ["SetRelBlockTypeMeta"] = { type = "method", description = [[Sets the block type and meta at the specified relative coords ]], }, ["SetWEOffset"] = { type = "method", description = [[Sets the WE offset, a data value sometimes stored in the schematic files. Mostly used for WorldEdit. MCServer doesn't use this value, but provides access to it using this method. ]], }, ["SetWEOffset"] = { type = "method", description = [[Sets the WE offset, a data value sometimes stored in the schematic files. Mostly used for WorldEdit. MCServer doesn't use this value, but provides access to it using this method. ]], }, ["Write"] = { type = "method", description = [[Writes the area into World at the specified coords, returns true if successful ]], }, ["Write"] = { type = "method", description = [[Writes the area into World at the specified coords, returns true if successful ]], }, }, }, cBlockEntity = { type = "class", description = [[ Block entities are simply blocks in the world that have persistent data, such as the text for a sign or contents of a chest. All block entities are also saved in the chunk data of the chunk they reside in. The cBlockEntity class acts as a common ancestor for all the individual block entities. ]], childs = { ["GetBlockType"] = { type = "method", description = [[Returns the blocktype which is represented by this blockentity. This is the primary means of type-identification ]], }, ["GetChunkX"] = { type = "method", description = [[Returns the chunk X-coord of the block entity's chunk ]], }, ["GetChunkZ"] = { type = "method", description = [[Returns the chunk Z-coord of the block entity's chunk ]], }, ["GetPosX"] = { type = "method", description = [[Returns the block X-coord of the block entity's block ]], }, ["GetPosY"] = { type = "method", description = [[Returns the block Y-coord of the block entity's block ]], }, ["GetPosZ"] = { type = "method", description = [[Returns the block Z-coord of the block entity's block ]], }, ["GetRelX"] = { type = "method", description = [[Returns the relative X coord of the block entity's block within the chunk ]], }, ["GetRelZ"] = { type = "method", description = [[Returns the relative Z coord of the block entity's block within the chunk ]], }, ["GetWorld"] = { type = "method", description = [[Returns the world to which the block entity belongs ]], }, }, }, cBlockEntityWithItems = { type = "class", description = [[ This class is a common ancestor for all {{cBlockEntity|block entities}} that provide item storage. Internally, the object has a {{cItemGrid|cItemGrid}} object for storing the items; this ItemGrid is accessible through the API. The storage is a grid of items, items in it can be addressed either by a slot number, or by XY coords within the grid. If a UI window is opened for this block entity, the item storage is monitored for changes and the changes are immediately sent to clients of the UI window. ]], childs = { ["GetContents"] = { type = "method", description = [[Returns the cItemGrid object representing the items stored within this block entity ]], }, ["GetSlot"] = { type = "method", description = [[Returns the cItem for the specified slot number. Returns nil for invalid slot numbers ]], }, ["GetSlot"] = { type = "method", description = [[Returns the cItem for the specified slot coords. Returns nil for invalid slot coords ]], }, ["SetSlot"] = { type = "method", description = [[Sets the cItem for the specified slot number. Ignored if invalid slot number ]], }, ["SetSlot"] = { type = "method", description = [[Sets the cItem for the specified slot coords. Ignored if invalid slot coords ]], }, }, }, cBlockInfo = { type = "class", description = [[ This class is used to query and register block properties. ]], childs = { ["CanBeTerraformed"] = { type = "method", description = [[(STATIC) Returns true if the block is suitable to be changed by a generator ]], }, ["FullyOccupiesVoxel"] = { type = "method", description = [[(STATIC) Returns whether the specified block fully occupies its voxel. ]], }, ["Get"] = { type = "method", description = [[(STATIC) Returns the {{cBlockInfo}} structure for the specified type. ]], }, ["GetLightValue"] = { type = "method", description = [[(STATIC) Returns how much light the specified block emits on its own. ]], }, ["GetPlaceSound"] = { type = "method", description = [[(STATIC) Returns the name of the sound that is played when placing the block. ]], }, ["GetSpreadLightFalloff"] = { type = "method", description = [[(STATIC) Returns how much light the specified block consumes. ]], }, ["IsOneHitDig"] = { type = "method", description = [[(STATIC) Returns whether the specified block will be destroyed after a single hit. ]], }, ["IsPistonBreakable"] = { type = "method", description = [[(STATIC) Returns whether a piston can break the specified block. ]], }, ["IsSnowable"] = { type = "method", description = [[(STATIC) Returns whether the specified block can hold snow atop. ]], }, ["IsSolid"] = { type = "method", description = [[(STATIC) Returns whether the specified block is solid. ]], }, ["IsTransparent"] = { type = "method", description = [[(STATIC) Returns whether the specified block is transparent. ]], }, }, }, cBoundingBox = { type = "class", description = [[ Represents two sets of coordinates, minimum and maximum for each direction; thus defining an axis-aligned cuboid with floating-point boundaries. It supports operations changing the size and position of the box, as well as querying whether a point or another BoundingBox is inside the box. All the points within the coordinate limits (inclusive the edges) are considered "inside" the box. However, for intersection purposes, if the intersection is "sharp" in any coord (min1 == max2, i. e. zero volume), the boxes are considered non-intersecting. ]], childs = { ["() (constructor)"] = { type = "method", description = [[Creates a new bounding box with the specified edges ]], }, ["() (constructor)"] = { type = "method", description = [[Creates a new copy of the given bounding box. Same result can be achieved by using a simple assignment. ]], }, ["() (constructor)"] = { type = "method", description = [[Creates a new bounding box with the coords specified as two vectors ]], }, ["() (constructor)"] = { type = "method", description = [[Creates a new bounding box from the position given and radius (X/Z) and height. Radius is added from X/Z to calculate the maximum coords and subtracted from X/Z to get the minimum; minimum Y is set to Pos.y and maxumim Y to Pos.y plus Height. This corresponds with how {{cEntity|entities}} are represented in Minecraft. ]], }, ["CalcLineIntersection"] = { type = "method", description = [[Calculates the intersection of a ray (half-line), given by two of its points, with the bounding box. Returns false if the line doesn't intersect the bounding box, or true, together with coefficient of the intersection (how much of the difference between the two ray points is needed to reach the intersection), and the face of the box which is intersected.
TODO: Lua binding for this function is wrong atm. ]], }, ["DoesIntersect"] = { type = "method", description = [[Returns true if the two bounding boxes have an intersection of nonzero volume. ]], }, ["Expand"] = { type = "method", description = [[Expands this bounding box by the specified amount in each direction (so the box becomes larger by 2 * Expand in each axis). ]], }, ["IsInside"] = { type = "method", description = [[Returns true if OtherBoundingBox is inside of this box. ]], }, ["IsInside"] = { type = "method", description = [[Returns true if the specified point is inside (including on the edge) of the box. ]], }, ["IsInside"] = { type = "method", description = [[Returns true if the other bounding box, specified by its 2 corners, is inside of this box. ]], }, ["IsInside"] = { type = "method", description = [[Returns true if the specified point is inside (including on the edge) of the box. ]], }, ["Move"] = { type = "method", description = [[Moves the bounding box by the specified offset in each axis ]], }, ["Move"] = { type = "method", description = [[Moves the bounding box by the specified offset in each axis ]], }, ["Union"] = { type = "method", description = [[Returns the smallest bounding box that contains both OtherBoundingBox and this bounding box. Note that unlike the strict geometrical meaning of "union", this operation actually returns a cBoundingBox. ]], }, }, }, cChatColor = { type = "class", description = [[ A wrapper class for constants representing colors or effects. ]], childs = { ["Black"] = { type = "value", }, ["Blue"] = { type = "value", }, ["Bold"] = { type = "value", }, ["Color"] = { type = "value", }, ["DarkPurple"] = { type = "value", }, ["Delimiter"] = { type = "value", }, ["Gold"] = { type = "value", }, ["Gray"] = { type = "value", }, ["Green"] = { type = "value", }, ["Italic"] = { type = "value", }, ["LightBlue"] = { type = "value", }, ["LightGray"] = { type = "value", }, ["LightGreen"] = { type = "value", }, ["LightPurple"] = { type = "value", }, ["Navy"] = { type = "value", }, ["Plain"] = { type = "value", }, ["Purple"] = { type = "value", }, ["Random"] = { type = "value", }, ["Red"] = { type = "value", }, ["Rose"] = { type = "value", }, ["Strikethrough"] = { type = "value", }, ["Underlined"] = { type = "value", }, ["White"] = { type = "value", }, ["Yellow"] = { type = "value", }, }, }, cChestEntity = { type = "class", description = [[ A chest entity is a {{cBlockEntityWithItems|cBlockEntityWithItems}} descendant that represents a chest in the world. Note that doublechests consist of two separate cChestEntity objects, they do not collaborate in any way. To manipulate a chest already in the game, you need to use {{cWorld}}'s callback mechanism with either DoWithChestAt() or ForEachChestInChunk() function. See the code example below ]], childs = { ["ContentsHeight"] = { type = "value", }, ["ContentsWidth"] = { type = "value", }, }, }, cChunkDesc = { type = "class", description = [[ The cChunkDesc class is a container for chunk data while the chunk is being generated. As such, it is only used as a parameter for the {{OnChunkGenerating|OnChunkGenerating}} and {{OnChunkGenerated|OnChunkGenerated}} hooks and cannot be constructed on its own. Plugins can use this class in both those hooks to manipulate generated chunks. ]], childs = { ["FillBlocks"] = { type = "method", description = [[Fills the entire chunk with the specified blocks ]], }, ["FillRelCuboid"] = { type = "method", description = [[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. ]], }, ["FillRelCuboid"] = { type = "method", description = [[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"] = { type = "method", description = [[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. ]], }, ["FloorRelCuboid"] = { type = "method", description = [[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. ]], }, ["GetBiome"] = { type = "method", description = [[Returns the biome at the specified relative coords ]], }, ["GetBlockEntity"] = { type = "method", description = [[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. ]], }, ["GetBlockMeta"] = { type = "method", description = [[Returns the block meta at the specified relative coords ]], }, ["GetBlockType"] = { type = "method", description = [[Returns the block type at the specified relative coords ]], }, ["GetBlockTypeMeta"] = { type = "method", description = [[Returns the block type and meta at the specified relative coords ]], }, ["GetChunkX"] = { type = "method", description = [[Returns the X coord of the chunk contained. ]], }, ["GetChunkZ"] = { type = "method", description = [[Returns the Z coord of the chunk contained. ]], }, ["GetHeight"] = { type = "method", description = [[Returns the height at the specified relative coords ]], }, ["GetMaxHeight"] = { type = "method", description = [[Returns the maximum height contained in the heightmap. ]], }, ["GetMinHeight"] = { type = "method", description = [[Returns the minimum height value in the heightmap. ]], }, ["IsUsingDefaultBiomes"] = { type = "method", description = [[Returns true if the chunk is set to use default biome generator ]], }, ["IsUsingDefaultComposition"] = { type = "method", description = [[Returns true if the chunk is set to use default composition generator ]], }, ["IsUsingDefaultFinish"] = { type = "method", description = [[Returns true if the chunk is set to use default finishers ]], }, ["IsUsingDefaultHeight"] = { type = "method", description = [[Returns true if the chunk is set to use default height generator ]], }, ["RandomFillRelCuboid"] = { type = "method", description = [[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. ]], }, ["RandomFillRelCuboid"] = { type = "method", description = [[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"] = { type = "method", description = [[Reads data from the chunk into the block area object. Block types and metas are processed. ]], }, ["ReplaceRelCuboid"] = { type = "method", description = [[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. ]], }, ["ReplaceRelCuboid"] = { type = "method", description = [[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. ]], }, ["SetBiome"] = { type = "method", description = [[Sets the biome at the specified relative coords ]], }, ["SetBlockMeta"] = { type = "method", description = [[Sets the block meta at the specified relative coords ]], }, ["SetBlockType"] = { type = "method", description = [[Sets the block type at the specified relative coords ]], }, ["SetBlockTypeMeta"] = { type = "method", description = [[Sets the block type and meta at the specified relative coords ]], }, ["SetHeight"] = { type = "method", description = [[Sets the height at the specified relative coords ]], }, ["SetUseDefaultBiomes"] = { type = "method", description = [[Sets the chunk to use default biome generator or not ]], }, ["SetUseDefaultComposition"] = { type = "method", description = [[Sets the chunk to use default composition generator or not ]], }, ["SetUseDefaultFinish"] = { type = "method", description = [[Sets the chunk to use default finishers or not ]], }, ["SetUseDefaultHeight"] = { type = "method", description = [[Sets the chunk to use default height generator or not ]], }, ["UpdateHeightmap"] = { type = "method", description = [[Updates the heightmap to match current contents. The plugins should do that if they modify the contents and don't modify the heightmap accordingly; MCServer expects (and checks in Debug mode) that the heightmap matches the contents when the cChunkDesc is returned from a plugin. ]], }, ["WriteBlockArea"] = { type = "method", description = [[Writes data from the block area into the chunk ]], }, }, }, cClientHandle = { type = "class", description = [[ A cClientHandle represents the technical aspect of a connected player - their game client connection. Internally, it handles all the incoming and outgoing packets, the chunks that are to be sent to the client, ping times etc. ]], childs = { ["GenerateOfflineUUID"] = { type = "method", description = [[(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). ]], }, ["GetClientBrand"] = { type = "method", description = [[Returns the brand that the client has sent in their MC|Brand plugin message. ]], }, ["GetIPString"] = { type = "method", description = [[Returns the IP address of the connection, as a string. Only the address part is returned, without the port number. ]], }, ["GetLocale"] = { type = "method", description = [[Returns the locale string that the client sends as part of the protocol handshake. Can be used to provide localized strings. ]], }, ["GetPing"] = { type = "method", description = [[Returns the ping time, in ms ]], }, ["GetPlayer"] = { type = "method", description = [[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"] = { type = "method", description = [[Returns the protocol version number of the protocol that the client is talking. Returns zero if the protocol version is not (yet) known. ]], }, ["GetRequestedViewDistance"] = { type = "method", description = [[Returns the view distance that the player request, not the used view distance. ]], }, ["GetUUID"] = { type = "method", description = [[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) ]], }, ["GetUniqueID"] = { type = "method", description = [[Returns the UniqueID of the client used to identify the client in the server ]], }, ["GetUsername"] = { type = "method", description = [[Returns the username that the client has provided ]], }, ["GetViewDistance"] = { type = "method", description = [[Returns the viewdistance (number of chunks loaded for the player in each direction) ]], }, ["HasPluginChannel"] = { type = "method", description = [[Returns true if the client has registered to receive messages on the specified plugin channel. ]], }, ["IsUUIDOnline"] = { type = "method", description = [[(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. ]], }, ["Kick"] = { type = "method", description = [[Kicks the user with the specified reason ]], }, ["SendBlockChange"] = { type = "method", description = [[Sends a BlockChange packet to the client. This can be used to create fake blocks only for that player. ]], }, ["SendEntityAnimation"] = { type = "method", description = [[Sends the specified animation of the specified entity to the client. The AnimationNumber is protocol-specific. ]], }, ["SendPluginMessage"] = { type = "method", description = [[Sends the plugin message on the specified channel. ]], }, ["SendSoundEffect"] = { type = "method", description = [[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"] = { type = "method", description = [[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). ]], }, ["SetClientBrand"] = { type = "method", description = [[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"] = { type = "method", description = [[Sets the locale that MCServer 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). ]], }, ["SetUsername"] = { type = "method", description = [[Sets the username ]], }, ["SetViewDistance"] = { type = "method", description = [[Sets the viewdistance (number of chunks loaded for the player in each direction) ]], }, ["MAX_VIEW_DISTANCE"] = { type = "value", }, ["MIN_VIEW_DISTANCE"] = { type = "value", }, }, }, cCommandBlockEntity = { type = "class", description = [[ ]], childs = { ["Activate"] = { type = "method", }, ["GetCommand"] = { type = "method", }, ["GetLastOutput"] = { type = "method", }, ["GetResult"] = { type = "method", }, ["SetCommand"] = { type = "method", }, ["SetRedstonePower"] = { type = "method", }, }, }, cCompositeChat = { type = "class", description = [[ Encapsulates a chat message that can contain various formatting, URLs, commands executed on click and commands suggested on click. The chat message can be sent by the regular chat-sending functions, {{cPlayer}}:SendMessage(), {{cWorld}}:BroadcastChat() and {{cRoot}}:BroadcastChat(). Note that most of the functions in this class are so-called chaining modifiers - they modify the object and then return the object itself, so that they can be chained one after another. See the Chaining example below for details. Each part of the composite chat message takes a "Style" parameter, this is a string that describes the formatting. It uses the following strings, concatenated together:
StringStyle
bBold text
iItalic text
uUnderlined text
sStrikethrough text
oObfuscated text
@Xcolor X (X is 0 - 9 or a - f, same as dye meta
The following picture, taken from MineCraft Wiki, illustrates the color codes: ]], childs = { ["() (constructor)"] = { type = "method", description = [[Creates an empty chat message ]], }, ["() (constructor)"] = { type = "method", description = [[Creates a chat message containing the specified text, parsed by the ParseText() function. This allows easy migration from old chat messages. ]], }, ["AddRunCommandPart"] = { type = "method", description = [[Adds a text which, when clicked, runs the specified command. Chaining. ]], }, ["AddShowAchievementPart"] = { type = "method", description = [[Adds a text that represents the 'Achievement get' message. ]], }, ["AddSuggestCommandPart"] = { type = "method", description = [[Adds a text which, when clicked, puts the specified command into the player's chat input area. Chaining. ]], }, ["AddTextPart"] = { type = "method", description = [[Adds a regular text. Chaining. ]], }, ["AddUrlPart"] = { type = "method", description = [[Adds a text which, when clicked, opens up a browser at the specified URL. Chaining. ]], }, ["Clear"] = { type = "method", description = [[Removes all parts from this object ]], }, ["CreateJsonString"] = { type = "method", description = [[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"] = { type = "method", description = [[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"] = { type = "method", description = [[Returns the AdditionalData associated with the message, such as the sender's name for mtPrivateMessage ]], }, ["GetMessageType"] = { type = "method", description = [[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"] = { type = "method", description = [[Adds text, while recognizing http and https URLs and old-style formatting codes ("@2"). Chaining. ]], }, ["SetMessageType"] = { type = "method", description = [[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"] = { type = "method", description = [[Makes all URL parts contained in the message underlined. Doesn't affect parts added in the future. Chaining. ]], }, }, }, cCraftingGrid = { type = "class", description = [[ cCraftingGrid represents the player's crafting grid. It is used in {{OnCraftingNoRecipe|OnCraftingNoRecipe}}, {{OnPostCrafting|OnPostCrafting}} and {{OnPreCrafting|OnPreCrafting}} hooks. Plugins may use it to inspect the items the player placed on their crafting grid. Also, an object of this type is used in {{cCraftingRecipe}}'s ConsumeIngredients() function for specifying the exact number of ingredients to consume in that recipe; plugins may use this to apply the crafting recipe. ]], childs = { ["() (constructor)"] = { type = "method", description = [[Creates a new CraftingGrid object. This new crafting grid is not related to any player, but may be needed for {{cCraftingRecipe}}'s ConsumeIngredients function. ]], }, ["Clear"] = { type = "method", description = [[Clears the entire grid ]], }, ["ConsumeGrid"] = { type = "method", description = [[Consumes items specified in CraftingGrid from the current contents. Used internally by {{cCraftingRecipe}}'s ConsumeIngredients() function, but available to plugins, too. ]], }, ["Dump"] = { type = "method", description = [[DEBUG build: Dumps the contents of the grid to the log. RELEASE build: no action ]], }, ["GetHeight"] = { type = "method", description = [[Returns the height of the grid ]], }, ["GetItem"] = { type = "method", description = [[Returns the item at the specified coords ]], }, ["GetWidth"] = { type = "method", description = [[Returns the width of the grid ]], }, ["SetItem"] = { type = "method", description = [[Sets the item at the specified coords ]], }, ["SetItem"] = { type = "method", description = [[Sets the item at the specified coords ]], }, }, }, cCraftingRecipe = { type = "class", description = [[ This class is used to represent a crafting recipe, either a built-in one, or one created dynamically in a plugin. It is used only as a parameter for {{OnCraftingNoRecipe|OnCraftingNoRecipe}}, {{OnPostCrafting|OnPostCrafting}} and {{OnPreCrafting|OnPreCrafting}} hooks. Plugins may use it to inspect or modify a crafting recipe that a player views in their crafting window, either at a crafting table or the survival inventory screen. Internally, the class contains a {{cCraftingGrid}} for the ingredients and a {{cItem}} for the result. ]], childs = { ["Clear"] = { type = "method", description = [[Clears the entire recipe, both ingredients and results ]], }, ["ConsumeIngredients"] = { type = "method", description = [[Consumes ingredients specified in the given {{cCraftingGrid|cCraftingGrid}} class ]], }, ["Dump"] = { type = "method", description = [[DEBUG build: dumps ingredients and result into server log. RELEASE build: no action ]], }, ["GetIngredient"] = { type = "method", description = [[Returns the ingredient stored in the recipe at the specified coords ]], }, ["GetIngredientsHeight"] = { type = "method", description = [[Returns the height of the ingredients' grid ]], }, ["GetIngredientsWidth"] = { type = "method", description = [[Returns the width of the ingredients' grid ]], }, ["GetResult"] = { type = "method", description = [[Returns the result of the recipe ]], }, ["SetIngredient"] = { type = "method", description = [[Sets the ingredient at the specified coords ]], }, ["SetIngredient"] = { type = "method", description = [[Sets the ingredient at the specified coords ]], }, ["SetResult"] = { type = "method", description = [[Sets the result item ]], }, ["SetResult"] = { type = "method", description = [[Sets the result item ]], }, }, }, cCryptoHash = { type = "class", description = [[ Provides functions for generating cryptographic hashes. Note that all functions in this class are static, so they should be called in the dot convention:
local Hash = cCryptoHash.sha1HexString("DataToHash")
Each cryptographic hash has two variants, one returns the hash as a raw binary string, the other returns the hash as a hex-encoded string twice as long as the binary string. ]], childs = { ["md5"] = { type = "method", description = [[(STATIC) Calculates the md5 hash of the data, returns it as a raw (binary) string of 16 characters. ]], }, ["md5HexString"] = { type = "method", description = [[(STATIC) Calculates the md5 hash of the data, returns it as a hex-encoded string of 32 characters. ]], }, ["sha1"] = { type = "method", description = [[(STATIC) Calculates the sha1 hash of the data, returns it as a raw (binary) string of 20 characters. ]], }, ["sha1HexString"] = { type = "method", description = [[(STATIC) Calculates the sha1 hash of the data, returns it as a hex-encoded string of 40 characters. ]], }, }, }, cCuboid = { type = "class", description = [[ cCuboid offers some native support for integral-boundary cuboids. A cuboid internally consists of two {{Vector3i}}-s. By default the cuboid doesn't make any assumptions about the defining points, but for most of the operations in the cCuboid class, the p1 member variable is expected to be the minima and the p2 variable the maxima. The Sort() function guarantees this condition. The Cuboid considers both its edges inclusive. ]], childs = { ["() (constructor)"] = { type = "method", description = [[Creates a new Cuboid object with all-zero coords ]], }, ["() (constructor)"] = { type = "method", description = [[Creates a new Cuboid object as a copy of OtherCuboid ]], }, ["() (constructor)"] = { type = "method", description = [[Creates a new Cuboid object with the specified point as both its corners (the cuboid has a size of 1 in each direction). ]], }, ["() (constructor)"] = { type = "method", description = [[Creates a new Cuboid object with the specified points as its corners. ]], }, ["() (constructor)"] = { type = "method", description = [[Creates a new Cuboid object with the specified points as its corners. ]], }, ["Assign"] = { type = "method", description = [[Copies all the coords from the src cuboid to this cuboid. Sort-state is ignored. ]], }, ["Assign"] = { type = "method", description = [[Assigns all the coords to the specified values. Sort-state is ignored. ]], }, ["ClampX"] = { type = "method", description = [[Clamps both X coords into the range provided. Sortedness-agnostic. ]], }, ["ClampY"] = { type = "method", description = [[Clamps both Y coords into the range provided. Sortedness-agnostic. ]], }, ["ClampZ"] = { type = "method", description = [[Clamps both Z coords into the range provided. Sortedness-agnostic. ]], }, ["DifX"] = { type = "method", description = [[Returns the difference between the two X coords (X-size minus 1). Assumes sorted. ]], }, ["DifY"] = { type = "method", description = [[Returns the difference between the two Y coords (Y-size minus 1). Assumes sorted. ]], }, ["DifZ"] = { type = "method", description = [[Returns the difference between the two Z coords (Z-size minus 1). Assumes sorted. ]], }, ["DoesIntersect"] = { type = "method", description = [[Returns true if this cuboid has at least one voxel in common with OtherCuboid. Note that edges are considered inclusive. Assumes both sorted. ]], }, ["Engulf"] = { type = "method", description = [[If needed, expands the cuboid to include the specified point. Doesn't shrink. Assumes sorted. ]], }, ["Expand"] = { type = "method", description = [[Expands the cuboid by the specified amount in each direction. Works on unsorted cuboids as well. NOTE: this function doesn't check for underflows. ]], }, ["GetVolume"] = { type = "method", description = [[Returns the volume of the cuboid, in blocks. Note that the volume considers both coords inclusive. Works on unsorted cuboids, too. ]], }, ["IsCompletelyInside"] = { type = "method", description = [[Returns true if this cuboid is completely inside (in all directions) in OuterCuboid. Assumes both sorted. ]], }, ["IsInside"] = { type = "method", description = [[Returns true if the specified point (integral coords) is inside this cuboid. Assumes sorted. ]], }, ["IsInside"] = { type = "method", description = [[Returns true if the specified point (floating-point coords) is inside this cuboid. Assumes sorted. ]], }, ["IsInside"] = { type = "method", description = [[Returns true if the specified point (integral coords) is inside this cuboid. Assumes sorted. ]], }, ["IsSorted"] = { type = "method", description = [[Returns true if this cuboid is sorted ]], }, ["Move"] = { type = "method", description = [[Adds the specified offsets to each respective coord, effectively moving the Cuboid. Sort-state is ignored and preserved. ]], }, ["Sort"] = { type = "method", description = [[Sorts the internal representation so that p1 contains the lesser coords and p2 contains the greater coords. ]], }, }, }, cDispenserEntity = { type = "class", description = [[ This class represents a dispenser block entity in the world. Most of this block entity's functionality is implemented in the {{cDropSpenserEntity|cDropSpenserEntity}} class that represents the behavior common with a {{cDropperEntity|dropper}} entity. ]], childs = { ["GetShootVector"] = { type = "method", }, ["SpawnProjectileFromDispenser"] = { type = "method", }, }, }, cDropperEntity = { type = "class", description = [[ This class represents a dropper block entity in the world. Most of this block entity's functionality is implemented in the {{cDropSpenserEntity|cDropSpenserEntity}} class that represents the behavior common with the {{cDispenserEntity|dispenser}} entity. An object of this class can be created from scratch when generating chunks ({{OnChunkGenerated|OnChunkGenerated}} and {{OnChunkGenerating|OnChunkGenerating}} hooks). ]], childs = { }, }, cDropSpenserEntity = { type = "class", description = [[ This is a class that implements behavior common to both {{cDispenserEntity|dispensers}} and {{cDropperEntity|droppers}}. ]], childs = { ["Activate"] = { type = "method", description = [[Sets the block entity to dropspense an item in the next tick ]], }, ["AddDropSpenserDir"] = { type = "method", description = [[Adjusts the block coords to where the dropspenser items materialize ]], }, ["ContentsHeight"] = { type = "value", }, ["ContentsWidth"] = { type = "value", }, }, }, cEnchantments = { type = "class", description = [[ This class is the storage for enchantments for a single {{cItem|cItem}} object, through its m_Enchantments member variable. Although it is possible to create a standalone object of this class, it is not yet used in any API directly. Enchantments can be initialized either programmatically by calling the individual functions (SetLevel()), or by using a string description of the enchantment combination. This string description is in the form "id=lvl;id=lvl;...;id=lvl;", where id is either a numerical ID of the enchantment, or its textual representation from the table below, and lvl is the desired enchantment level. The class can also create its string description from its current contents; however that string description will only have the numerical IDs. See the {{cItem}} class for usage examples. ]], childs = { ["() (constructor)"] = { type = "method", description = [[Creates a new empty cEnchantments object ]], }, ["() (constructor)"] = { type = "method", description = [[Creates a new cEnchantments object filled with enchantments based on the string description ]], }, ["operator =="] = { type = "method", description = [[Returns true if this enchantments object has the same enchantments as OtherEnchantments. ]], }, ["Add"] = { type = "method", }, ["AddFromString"] = { type = "method", description = [[Adds the enchantments in the string description into the object. If a specified enchantment already existed, it is overwritten. ]], }, ["Clear"] = { type = "method", description = [[Removes all enchantments ]], }, ["Count"] = { type = "method", }, ["GetLevel"] = { type = "method", description = [[Returns the level of the specified enchantment stored in this object; 0 if not stored ]], }, ["IsEmpty"] = { type = "method", description = [[Returns true if the object stores no enchantments ]], }, ["SetLevel"] = { type = "method", description = [[Sets the level for the specified enchantment, adding it if not stored before or removing it if level < = 0 ]], }, ["StringToEnchantmentID"] = { type = "method", description = [[(static) Returns the enchantment numerical ID, -1 if not understood. Case insensitive. Also understands plain numbers. ]], }, ["ToString"] = { type = "method", description = [[Returns the string description of all the enchantments stored in this object, in numerical-ID form ]], }, ["enchAquaAffinity"] = { type = "value", }, ["enchBaneOfArthropods"] = { type = "value", }, ["enchBlastProtection"] = { type = "value", }, ["enchDepthStrider"] = { type = "value", }, ["enchEfficiency"] = { type = "value", }, ["enchFeatherFalling"] = { type = "value", }, ["enchFireAspect"] = { type = "value", }, ["enchFireProtection"] = { type = "value", }, ["enchFlame"] = { type = "value", }, ["enchFortune"] = { type = "value", }, ["enchInfinity"] = { type = "value", }, ["enchKnockback"] = { type = "value", }, ["enchLooting"] = { type = "value", }, ["enchLuckOfTheSea"] = { type = "value", }, ["enchLure"] = { type = "value", }, ["enchPower"] = { type = "value", }, ["enchProjectileProtection"] = { type = "value", }, ["enchProtection"] = { type = "value", }, ["enchPunch"] = { type = "value", }, ["enchRespiration"] = { type = "value", }, ["enchSharpness"] = { type = "value", }, ["enchSilkTouch"] = { type = "value", }, ["enchSmite"] = { type = "value", }, ["enchThorns"] = { type = "value", }, ["enchUnbreaking"] = { type = "value", }, }, }, cEntity = { type = "class", description = [[ A cEntity object represents an object in the world, it has a position and orientation. cEntity is an abstract class, and can not be instantiated directly, instead, all entities are implemented as subclasses. The cEntity class works as the common interface for the operations that all (most) entities support. All cEntity objects have an Entity Type so it can be determined what kind of entity it is efficiently. Entities also have a class inheritance awareness, they know their class name, their parent class' name and can decide if there is a class within their inheritance chain. Since these functions operate on strings, they are slightly slower than checking the entity type directly, on the other hand, they are more specific directly. To check if the entity is a spider, you need to call IsMob(), then cast the object to {{cMonster}} and finally compare {{cMonster}}:GetMonsterType() to mtSpider. GetClass(), on the other hand, returns "cSpider" directly. Note that you should not store a cEntity object between two hooks' calls, because MCServer may despawn / remove that entity in between the calls. If you need to refer to an entity later, use its UniqueID and {{cWorld|cWorld}}'s entity manipulation functions DoWithEntityByID(), ForEachEntity() or ForEachEntityInChunk() to access the entity again. ]], childs = { ["AddPosX"] = { type = "method", description = [[Moves the entity by the specified amount in the X axis direction ]], }, ["AddPosY"] = { type = "method", description = [[Moves the entity by the specified amount in the Y axis direction ]], }, ["AddPosZ"] = { type = "method", description = [[Moves the entity by the specified amount in the Z axis direction ]], }, ["AddPosition"] = { type = "method", description = [[Moves the entity by the specified amount in each axis direction ]], }, ["AddPosition"] = { type = "method", description = [[Moves the entity by the specified amount in each direction ]], }, ["AddSpeed"] = { type = "method", description = [[Adds the specified amount of speed in each axis direction. ]], }, ["AddSpeed"] = { type = "method", description = [[Adds the specified amount of speed in each axis direction. ]], }, ["AddSpeedX"] = { type = "method", description = [[Adds the specified amount of speed in the X axis direction. ]], }, ["AddSpeedY"] = { type = "method", description = [[Adds the specified amount of speed in the Y axis direction. ]], }, ["AddSpeedZ"] = { type = "method", description = [[Adds the specified amount of speed in the Z axis direction. ]], }, ["ArmorCoversAgainst"] = { type = "method", description = [[Returns the points out of a_RawDamage that the currently equipped armor would cover. ]], }, ["Destroy"] = { type = "method", description = [[Schedules the entity to be destroyed ]], }, ["GetAirDrag"] = { type = "method", }, ["GetAirLevel"] = { type = "method", description = [[Returns the air level (number of ticks of air left). Note, this function is only updated with mobs or players. ]], }, ["GetArmorCoverAgainst"] = { type = "method", description = [[Returns the number of hitpoints out of RawDamage that the currently equipped armor would cover. See {{TakeDamageInfo}} for more information on attack damage. ]], }, ["GetChunkX"] = { type = "method", description = [[Returns the X-coord of the chunk in which the entity is placed ]], }, ["GetChunkZ"] = { type = "method", description = [[Returns the Z-coord of the chunk in which the entity is placed ]], }, ["GetClass"] = { type = "method", description = [[Returns the classname of the entity, such as "cSpider" or "cPickup" ]], }, ["GetClassStatic"] = { type = "method", description = [[Returns the entity classname that this class implements. Each descendant overrides this function. Is static ]], }, ["GetEntityType"] = { type = "method", description = [[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"] = { type = "method", description = [[Returns the boots that the entity has equipped. Returns an empty cItem if no boots equipped or not applicable. ]], }, ["GetEquippedChestplate"] = { type = "method", description = [[Returns the chestplate that the entity has equipped. Returns an empty cItem if no chestplate equipped or not applicable. ]], }, ["GetEquippedHelmet"] = { type = "method", description = [[Returns the helmet that the entity has equipped. Returns an empty cItem if no helmet equipped or not applicable. ]], }, ["GetEquippedLeggings"] = { type = "method", description = [[Returns the leggings that the entity has equipped. Returns an empty cItem if no leggings equipped or not applicable. ]], }, ["GetEquippedWeapon"] = { type = "method", description = [[Returns the weapon that the entity has equipped. Returns an empty cItem if no weapon equipped or not applicable. ]], }, ["GetGravity"] = { type = "method", description = [[Returns the number that is used as the gravity for physics simulation. 1G (9.78) by default. ]], }, ["GetHeadYaw"] = { type = "method", description = [[Returns the pitch of the entity's head (FIXME: Rename to GetHeadPitch() ). ]], }, ["GetHealth"] = { type = "method", description = [[Returns the current health of the entity. ]], }, ["GetHeight"] = { type = "method", description = [[Returns the height (Y size) of the entity ]], }, ["GetInvulnerableTicks"] = { type = "method", description = [[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"] = { type = "method", description = [[Returns the amount of knockback that the currently equipped items would cause when attacking the ReceiverEntity. ]], }, ["GetLookVector"] = { type = "method", description = [[Returns the vector that defines the direction in which the entity is looking ]], }, ["GetMass"] = { type = "method", description = [[Returns the mass of the entity. Currently unused. ]], }, ["GetMaxHealth"] = { type = "method", description = [[Returns the maximum number of hitpoints this entity is allowed to have. ]], }, ["GetParentClass"] = { type = "method", description = [[Returns the name of the direct parent class for this entity ]], }, ["GetPitch"] = { type = "method", description = [[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. ]], }, ["GetPosX"] = { type = "method", description = [[Returns the X-coord of the entity's pivot ]], }, ["GetPosY"] = { type = "method", description = [[Returns the Y-coord of the entity's pivot ]], }, ["GetPosZ"] = { type = "method", description = [[Returns the Z-coord of the entity's pivot ]], }, ["GetPosition"] = { type = "method", description = [[Returns the entity's pivot position as a 3D vector ]], }, ["GetRawDamageAgainst"] = { type = "method", description = [[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"] = { type = "method", description = [[Returns the roll (sideways rotation) of the entity. Currently unused. ]], }, ["GetRot"] = { type = "method", description = [[(OBSOLETE) Returns the entire rotation vector (Yaw, Pitch, Roll) ]], }, ["GetSpeed"] = { type = "method", description = [[Returns the complete speed vector of the entity ]], }, ["GetSpeedX"] = { type = "method", description = [[Returns the X-part of the speed vector ]], }, ["GetSpeedY"] = { type = "method", description = [[Returns the Y-part of the speed vector ]], }, ["GetSpeedZ"] = { type = "method", description = [[Returns the Z-part of the speed vector ]], }, ["GetTicksAlive"] = { type = "method", description = [[Returns the number of ticks that this entity has been alive for. ]], }, ["GetUniqueID"] = { type = "method", description = [[Returns the ID that uniquely identifies the entity within the running server. Note that this ID is not persisted to the data files. ]], }, ["GetWidth"] = { type = "method", description = [[Returns the width (X and Z size) of the entity. ]], }, ["GetWorld"] = { type = "method", description = [[Returns the world where the entity resides ]], }, ["GetYaw"] = { type = "method", description = [[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"] = { type = "method", description = [[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. ]], }, ["Heal"] = { type = "method", description = [[Heals the specified number of hitpoints. Hitpoints is expected to be a positive number. ]], }, ["IsA"] = { type = "method", description = [[Returns true if the entity class is a descendant of the specified class name, or the specified class itself ]], }, ["IsBoat"] = { type = "method", description = [[Returns true if the entity is a {{cBoat|boat}}. ]], }, ["IsCrouched"] = { type = "method", description = [[Returns true if the entity is crouched. Always false for entities that don't support crouching. ]], }, ["IsDestroyed"] = { type = "method", description = [[Returns true if the entity has been destroyed and is awaiting removal from the internal structures. ]], }, ["IsEnderCrystal"] = { type = "method", description = [[Returns true if the entity is an ender crystal. ]], }, ["IsExpOrb"] = { type = "method", description = [[Returns true if the entity represents an experience orb ]], }, ["IsFallingBlock"] = { type = "method", description = [[Returns true if the entity represents a {{cFallingBlock}} entity. ]], }, ["IsFireproof"] = { type = "method", description = [[Returns true if the entity takes no damage from being on fire. ]], }, ["IsFloater"] = { type = "method", description = [[Returns true if the entity represents a fishing rod floater ]], }, ["IsInvisible"] = { type = "method", description = [[Returns true if the entity is invisible ]], }, ["IsItemFrame"] = { type = "method", description = [[Returns true if the entity is an item frame. ]], }, ["IsMinecart"] = { type = "method", description = [[Returns true if the entity represents a {{cMinecart|minecart}} ]], }, ["IsMob"] = { type = "method", description = [[Returns true if the entity represents any {{cMonster|mob}}. ]], }, ["IsOnFire"] = { type = "method", description = [[Returns true if the entity is on fire ]], }, ["IsOnGround"] = { type = "method", description = [[Returns true if the entity is on ground (not falling, not jumping, not flying) ]], }, ["IsPainting"] = { type = "method", description = [[Returns if this entity is a painting. ]], }, ["IsPawn"] = { type = "method", description = [[Returns true if the entity is a {{cPawn}} descendant. ]], }, ["IsPickup"] = { type = "method", description = [[Returns true if the entity represents a {{cPickup|pickup}}. ]], }, ["IsPlayer"] = { type = "method", description = [[Returns true if the entity represents a {{cPlayer|player}} ]], }, ["IsProjectile"] = { type = "method", description = [[Returns true if the entity is a {{cProjectileEntity}} descendant. ]], }, ["IsRclking"] = { type = "method", description = [[Currently unimplemented ]], }, ["IsRiding"] = { type = "method", description = [[Returns true if the entity is attached to (riding) another entity. ]], }, ["IsSprinting"] = { type = "method", description = [[Returns true if the entity is sprinting. Entities that cannot sprint return always false ]], }, ["IsSubmerged"] = { type = "method", description = [[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"] = { type = "method", description = [[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. ]], }, ["IsTNT"] = { type = "method", description = [[Returns true if the entity represents a {{cTNTEntity|TNT entity}} ]], }, ["Killed"] = { type = "method", description = [[This entity has killed another entity (the Victim). For players, adds the scoreboard statistics about the kill. ]], }, ["KilledBy"] = { type = "method", description = [[FIXME: Remove this from API ]], }, ["MoveToWorld"] = { type = "method", description = [[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). ]], }, ["MoveToWorld"] = { type = "method", description = [[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). ]], }, ["SetAirDrag"] = { type = "method", }, ["SetGravity"] = { type = "method", description = [[Sets the number that is used as the gravity for physics simulation. 1G (9.78) by default. ]], }, ["SetHeadYaw"] = { type = "method", description = [[Sets the head pitch (FIXME: Rename to SetHeadPitch() ). ]], }, ["SetHealth"] = { type = "method", description = [[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"] = { type = "method", description = [[FIXME: Remove this from API ]], }, ["SetInvulnerableTicks"] = { type = "method", description = [[Sets the amount of ticks for which the entity will not receive any damage from other entities. ]], }, ["SetIsFireproof"] = { type = "method", description = [[Sets whether the entity receives damage from being on fire. ]], }, ["SetMass"] = { type = "method", description = [[Sets the mass of the entity. Currently unused. ]], }, ["SetMaxHealth"] = { type = "method", description = [[Sets the maximum hitpoints of the entity. If current health is above MaxHitpoints, it is capped to MaxHitpoints. ]], }, ["SetPitch"] = { type = "method", description = [[Sets the pitch (nose-down rotation) of the entity ]], }, ["SetPitchFromSpeed"] = { type = "method", description = [[Sets the entity pitch to match its speed (entity looking forwards as it moves) ]], }, ["SetPosX"] = { type = "method", description = [[Sets the X-coord of the entity's pivot ]], }, ["SetPosY"] = { type = "method", description = [[Sets the Y-coord of the entity's pivot ]], }, ["SetPosZ"] = { type = "method", description = [[Sets the Z-coord of the entity's pivot ]], }, ["SetPosition"] = { type = "method", description = [[Sets all three coords of the entity's pivot ]], }, ["SetPosition"] = { type = "method", description = [[Sets all three coords of the entity's pivot ]], }, ["SetRoll"] = { type = "method", description = [[Sets the roll (sideways rotation) of the entity. Currently unused. ]], }, ["SetRot"] = { type = "method", description = [[Sets the entire rotation vector (Yaw, Pitch, Roll) ]], }, ["SetSpeed"] = { type = "method", description = [[Sets the current speed of the entity ]], }, ["SetSpeed"] = { type = "method", description = [[Sets the current speed of the entity ]], }, ["SetSpeedX"] = { type = "method", description = [[Sets the X component of the entity speed ]], }, ["SetSpeedY"] = { type = "method", description = [[Sets the Y component of the entity speed ]], }, ["SetSpeedZ"] = { type = "method", description = [[Sets the Z component of the entity speed ]], }, ["SetWidth"] = { type = "method", description = [[FIXME: Remove this from API ]], }, ["SetYaw"] = { type = "method", description = [[Sets the yaw (direction) of the entity. ]], }, ["SetYawFromSpeed"] = { type = "method", description = [[Sets the entity's yaw to match its current speed (entity looking forwards as it moves). ]], }, ["StartBurning"] = { type = "method", description = [[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"] = { type = "method", description = [[Applies the specified steering to the vehicle this entity is attached to. Ignored if not attached to any entity. ]], }, ["StopBurning"] = { type = "method", description = [[Extinguishes the entity fire, cancels all fire timers. ]], }, ["TakeDamage"] = { type = "method", description = [[Causes this entity to take damage that AttackerEntity would inflict. Includes their weapon and this entity's armor. ]], }, ["TakeDamage"] = { type = "method", description = [[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. ]], }, ["TakeDamage"] = { type = "method", description = [[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. ]], }, ["TeleportToCoords"] = { type = "method", description = [[Teleports the entity to the specified coords. Asks plugins if the teleport is allowed. ]], }, ["TeleportToEntity"] = { type = "method", description = [[Teleports this entity to the specified destination entity. Asks plugins if the teleport is allowed. ]], }, ["INVALID_ID"] = { type = "value", }, }, }, cEntityEffect = { type = "class", description = [[ ]], childs = { ["GetPotionColor"] = { type = "method", }, ["GetPotionEffectDuration"] = { type = "method", }, ["GetPotionEffectIntensity"] = { type = "method", }, ["GetPotionEffectType"] = { type = "method", }, ["IsPotionDrinkable"] = { type = "method", }, ["effAbsorption"] = { type = "value", }, ["effBlindness"] = { type = "value", }, ["effFireResistance"] = { type = "value", }, ["effHaste"] = { type = "value", }, ["effHealthBoost"] = { type = "value", }, ["effHunger"] = { type = "value", }, ["effInstantDamage"] = { type = "value", }, ["effInstantHealth"] = { type = "value", }, ["effInvisibility"] = { type = "value", }, ["effJumpBoost"] = { type = "value", }, ["effMiningFatigue"] = { type = "value", }, ["effNausea"] = { type = "value", }, ["effNightVision"] = { type = "value", }, ["effNoEffect"] = { type = "value", }, ["effPoison"] = { type = "value", }, ["effRegeneration"] = { type = "value", }, ["effResistance"] = { type = "value", }, ["effSaturation"] = { type = "value", }, ["effSlowness"] = { type = "value", }, ["effSpeed"] = { type = "value", }, ["effStrength"] = { type = "value", }, ["effWaterBreathing"] = { type = "value", }, ["effWeakness"] = { type = "value", }, ["effWither"] = { type = "value", }, }, }, cExpBottleEntity = { type = "class", description = [[ Represents a thrown ExpBottle. A subclass of the {{cProjectileEntity}}. ]], childs = { }, }, cFile = { type = "class", description = [[ Provides helper functions for manipulating and querying the filesystem. Most functions are static, so they should be called directly on the cFile class itself:
cFile:Delete("/usr/bin/virus.exe");
]], childs = { ["ChangeFileExt"] = { type = "method", description = [[(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"] = { type = "method", description = [[(STATIC) Copies a single file to a new destination. Returns true if successful. Fails if the destination already exists. ]], }, ["CreateFolder"] = { type = "method", description = [[(STATIC) Creates a new folder. Returns true if successful. ]], }, ["Delete"] = { type = "method", description = [[(STATIC) Deletes the specified file. Returns true if successful. ]], }, ["Exists"] = { type = "method", description = [[(STATIC) Returns true if the specified file exists. ]], }, ["GetExecutableExt"] = { type = "method", description = [[(STATIC) Returns the customary executable extension (including the dot) used by the current platform (".exe" on Windows, empty string on Linux). ]], }, ["GetFolderContents"] = { type = "method", description = [[(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"] = { type = "method", description = [[(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"] = { type = "method", description = [[(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. ]], }, ["GetSize"] = { type = "method", description = [[(STATIC) Returns the size of the file, or -1 on failure. ]], }, ["IsFile"] = { type = "method", description = [[(STATIC) Returns true if the specified path points to an existing file. ]], }, ["IsFolder"] = { type = "method", description = [[(STATIC) Returns true if the specified path points to an existing folder. ]], }, ["ReadWholeFile"] = { type = "method", description = [[(STATIC) Returns the entire contents of the specified file. Returns an empty string if the file cannot be opened. ]], }, ["Rename"] = { type = "method", description = [[(STATIC) Renames a file or a folder. Returns true if successful. Undefined result if NewPath already exists. ]], }, }, }, cFireChargeEntity = { type = "class", description = [[ Represents a fire charge that has been shot by a Blaze or a {{cDispenserEntity|Dispenser}}. A subclass of the {{cProjectileEntity}}. ]], childs = { }, }, cFireworkEntity = { type = "class", description = [[ Represents a firework rocket. ]], childs = { ["GetItem"] = { type = "method", description = [[Returns the item that has been used to create the firework rocket. The item's m_FireworkItem member contains all the firework-related data. ]], }, ["GetTicksToExplosion"] = { type = "method", description = [[Returns the number of ticks left until the firework explodes. ]], }, ["SetItem"] = { type = "method", description = [[Sets a new item to be used for the firework. ]], }, ["SetTicksToExplosion"] = { type = "method", description = [[Sets the number of ticks left until the firework explodes. ]], }, }, }, cFloater = { type = "class", description = [[ ]], childs = { ["CanPickup"] = { type = "method", }, ["GetAttachedMobID"] = { type = "method", }, ["GetOwnerID"] = { type = "method", }, }, }, cFlowerPotEntity = { type = "class", description = [[ This class represents a flower pot entity in the world. ]], childs = { ["GetItem"] = { type = "method", description = [[Returns the item in the flower pot. ]], }, ["IsItemInPot"] = { type = "method", description = [[Is a flower in the pot? ]], }, ["SetItem"] = { type = "method", description = [[Set the item in the flower pot ]], }, }, }, cFurnaceEntity = { type = "class", description = [[ This class represents a furnace block entity in the world. See also {{cRoot}}'s GetFurnaceRecipe() and GetFurnaceFuelBurnTime() functions ]], childs = { ["GetCookTimeLeft"] = { type = "method", description = [[Returns the time until the current item finishes cooking, in ticks ]], }, ["GetFuelBurnTimeLeft"] = { type = "method", description = [[Returns the time until the current fuel is depleted, in ticks ]], }, ["GetFuelSlot"] = { type = "method", description = [[Returns the item in the fuel slot ]], }, ["GetInputSlot"] = { type = "method", description = [[Returns the item in the input slot ]], }, ["GetOutputSlot"] = { type = "method", description = [[Returns the item in the output slot ]], }, ["GetTimeCooked"] = { type = "method", description = [[Returns the time that the current item has been cooking, in ticks ]], }, ["HasFuelTimeLeft"] = { type = "method", description = [[Returns true if there's time before the current fuel is depleted ]], }, ["SetFuelSlot"] = { type = "method", description = [[Sets the item in the fuel slot ]], }, ["SetInputSlot"] = { type = "method", description = [[Sets the item in the input slot ]], }, ["SetOutputSlot"] = { type = "method", description = [[Sets the item in the output slot ]], }, ["ContentsHeight"] = { type = "value", }, ["ContentsWidth"] = { type = "value", }, }, }, cGhastFireballEntity = { type = "class", description = [[ ]], childs = { }, }, cHangingEntity = { type = "class", description = [[ ]], childs = { ["GetFacing"] = { type = "method", }, ["SetFacing"] = { type = "method", }, }, }, cHopperEntity = { type = "class", description = [[ This class represents a hopper block entity in the world. ]], childs = { ["GetOutputBlockPos"] = { type = "method", description = [[Returns whether the hopper is attached, and if so, the block coords of the block receiving the output items, based on the given meta. ]], }, ["ContentsHeight"] = { type = "value", }, ["ContentsWidth"] = { type = "value", }, ["TICKS_PER_TRANSFER"] = { type = "value", }, }, }, cIniFile = { type = "class", description = [[ This class implements a simple name-value storage represented on disk by an INI file. These files are suitable for low-volume high-latency human-readable information storage, such as for configuration. MCServer itself uses INI files for settings and options. The INI files follow this basic structure:
; Header comment line
[KeyName0]
; Key comment line 0
ValueName0=Value0
ValueName1=Value1 [KeyName1]
; Key comment line 0
; Key comment line 1
ValueName0=SomeOtherValue
The cIniFile object stores all the objects in numbered arrays and provides access to the information either based on names (KeyName, ValueName) or zero-based indices. The objects of this class are created empty. You need to either load a file using ReadFile(), or insert values by hand. Then you can store the object's contents to a disk file using WriteFile(), or just forget everything by destroying the object. Note that the file operations are quite slow. For storing high-volume low-latency data, use the {{sqlite3}} class. For storing hierarchically-structured data, use the XML format, using the LuaExpat parser in the {{lxp}} class. ]], childs = { ["() (constructor)"] = { type = "method", description = [[Creates a new empty cIniFile object. ]], }, ["AddHeaderComment"] = { type = "method", description = [[Adds a comment to be stored in the file header. ]], }, ["AddKeyComment"] = { type = "method", description = [[Adds a comment to be stored in the file under the specified key ]], }, ["AddKeyComment"] = { type = "method", description = [[Adds a comment to be stored in the file under the specified key ]], }, ["AddKeyName"] = { type = "method", description = [[Adds a new key of the specified name. Returns the KeyID of the new key. ]], }, ["AddValue"] = { type = "method", description = [[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"] = { type = "method", description = [[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"] = { type = "method", description = [[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"] = { type = "method", description = [[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"] = { type = "method", description = [[Sets key names' and value names' comparisons to case insensitive (default). ]], }, ["CaseSensitive"] = { type = "method", description = [[Sets key names and value names comparisons to case sensitive. ]], }, ["Clear"] = { type = "method", description = [[Removes all the in-memory data. Note that , like all the other operations, this doesn't affect any file data. ]], }, ["DeleteHeaderComment"] = { type = "method", description = [[Deletes the specified header comment. Returns true if successful. ]], }, ["DeleteHeaderComments"] = { type = "method", description = [[Deletes all headers comments. ]], }, ["DeleteKey"] = { type = "method", description = [[Deletes the specified key, and all values in that key. Returns true if successful. ]], }, ["DeleteKeyComment"] = { type = "method", description = [[Deletes the specified key comment. Returns true if successful. ]], }, ["DeleteKeyComment"] = { type = "method", description = [[Deletes the specified key comment. Returns true if successful. ]], }, ["DeleteKeyComments"] = { type = "method", description = [[Deletes all comments for the specified key. Returns true if successful. ]], }, ["DeleteKeyComments"] = { type = "method", description = [[Deletes all comments for the specified key. Returns true if successful. ]], }, ["DeleteValue"] = { type = "method", description = [[Deletes the specified value. Returns true if successful. ]], }, ["DeleteValueByID"] = { type = "method", description = [[Deletes the specified value. Returns true if successful. ]], }, ["FindKey"] = { type = "method", description = [[Returns the KeyID for the specified key name, or the noID constant if the key doesn't exist. ]], }, ["FindValue"] = { type = "method", description = [[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"] = { type = "method", description = [[Returns the specified header comment, or an empty string if such comment doesn't exist ]], }, ["GetKeyComment"] = { type = "method", description = [[Returns the specified key comment, or an empty string if such a comment doesn't exist ]], }, ["GetKeyComment"] = { type = "method", description = [[Returns the specified key comment, or an empty string if such a comment doesn't exist ]], }, ["GetKeyName"] = { type = "method", description = [[Returns the key name for the specified key ID. Inverse for FindKey(). ]], }, ["GetNumHeaderComments"] = { type = "method", description = [[Retuns the number of header comments. ]], }, ["GetNumKeyComments"] = { type = "method", description = [[Returns the number of comments under the specified key ]], }, ["GetNumKeyComments"] = { type = "method", description = [[Returns the number of comments under the specified key ]], }, ["GetNumKeys"] = { type = "method", description = [[Returns the total number of keys. This is the range for the KeyID (0 .. GetNumKeys() - 1) ]], }, ["GetNumValues"] = { type = "method", description = [[Returns the number of values stored under the specified key. ]], }, ["GetNumValues"] = { type = "method", description = [[Returns the number of values stored under the specified key. ]], }, ["GetValue"] = { type = "method", description = [[Returns the value of the specified name under the specified key. Returns an empty string if the value doesn't exist. ]], }, ["GetValue"] = { type = "method", description = [[Returns the value of the specified name under the specified key. Returns an empty string if the value doesn't exist. ]], }, ["GetValueB"] = { type = "method", description = [[Returns the value of the specified name under the specified key, as a bool. Returns false if the value doesn't exist. ]], }, ["GetValueF"] = { type = "method", description = [[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"] = { type = "method", description = [[Returns the value of the specified name under the specified key, as an integer. Returns zero if the value doesn't exist. ]], }, ["GetValueName"] = { type = "method", description = [[Returns the name of the specified value Inverse for FindValue(). ]], }, ["GetValueName"] = { type = "method", description = [[Returns the name of the specified value Inverse for FindValue(). ]], }, ["GetValueSet"] = { type = "method", description = [[Returns the value of the specified name under the specified key. If the value doesn't exist, creates it with the specified default. ]], }, ["GetValueSetB"] = { type = "method", description = [[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"] = { type = "method", description = [[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"] = { type = "method", description = [[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. ]], }, ["HasValue"] = { type = "method", description = [[Returns true if the specified value is present. ]], }, ["ReadFile"] = { type = "method", description = [[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. ]], }, ["SetValue"] = { type = "method", description = [[Overwrites the specified value with a new value. If the specified value doesn't exist, returns false (doesn't add). ]], }, ["SetValue"] = { type = "method", description = [[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"] = { type = "method", description = [[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"] = { type = "method", description = [[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"] = { type = "method", description = [[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"] = { type = "method", description = [[Writes the current in-memory data into the specified file. Returns true if successful, false if not. ]], }, ["noID"] = { type = "value", }, }, }, cInventory = { type = "class", description = [[This object is used to store the items that a {{cPlayer|cPlayer}} has. It also keeps track of what item the player has currently selected in their hotbar. Internally, the class uses three {{cItemGrid|cItemGrid}} objects to store the contents: - Armor - Inventory - Hotbar These ItemGrids are available in the API and can be manipulated by the plugins, too. When using the raw slot access functions, such as GetSlot() and SetSlot(), the slots are numbered consecutively, each ItemGrid has its offset and count. To future-proff your plugins, use the named constants instead of hard-coded numbers. ]], childs = { ["AddItem"] = { type = "method", description = [[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"] = { type = "method", description = [[Same as AddItem, but for several items at once ]], }, ["ChangeSlotCount"] = { type = "method", description = [[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"] = { type = "method", description = [[Empties all slots ]], }, ["CopyToItems"] = { type = "method", description = [[Copies all non-empty slots into the cItems object provided; original cItems contents are preserved ]], }, ["DamageEquippedItem"] = { type = "method", description = [[Adds the specified damage (1 by default) to the currently equipped it ]], }, ["DamageItem"] = { type = "method", description = [[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"] = { type = "method", description = [[Returns the ItemGrid representing the armor grid (1 x 4 slots) ]], }, ["GetArmorSlot"] = { type = "method", description = [[Returns the specified armor slot contents. Note that the returned item is read-only ]], }, ["GetEquippedBoots"] = { type = "method", description = [[Returns the item in the "boots" slot of the armor grid. Note that the returned item is read-only ]], }, ["GetEquippedChestplate"] = { type = "method", description = [[Returns the item in the "chestplate" slot of the armor grid. Note that the returned item is read-only ]], }, ["GetEquippedHelmet"] = { type = "method", description = [[Returns the item in the "helmet" slot of the armor grid. Note that the returned item is read-only ]], }, ["GetEquippedItem"] = { type = "method", description = [[Returns the currently selected item from the hotbar. Note that the returned item is read-only ]], }, ["GetEquippedLeggings"] = { type = "method", description = [[Returns the item in the "leggings" slot of the armor grid. Note that the returned item is read-only ]], }, ["GetEquippedSlotNum"] = { type = "method", description = [[Returns the hotbar slot number for the currently selected item ]], }, ["GetHotbarGrid"] = { type = "method", description = [[Returns the ItemGrid representing the hotbar grid (9 x 1 slots) ]], }, ["GetHotbarSlot"] = { type = "method", description = [[Returns the specified hotbar slot contents. Note that the returned item is read-only ]], }, ["GetInventoryGrid"] = { type = "method", description = [[Returns the ItemGrid representing the main inventory (9 x 3 slots) ]], }, ["GetInventorySlot"] = { type = "method", description = [[Returns the specified main inventory slot contents. Note that the returned item is read-only ]], }, ["GetOwner"] = { type = "method", description = [[Returns the player whose inventory this object represents ]], }, ["GetSlot"] = { type = "method", description = [[Returns the contents of the specified slot. Note that the returned item is read-only ]], }, ["HasItems"] = { type = "method", description = [[Returns true if there are at least as many items of the specified type as in the parameter ]], }, ["HowManyCanFit"] = { type = "method", description = [[Returns the number of the specified items that can fit in the storage, including empty slots ]], }, ["HowManyItems"] = { type = "method", description = [[Returns the number of the specified items that are currently stored ]], }, ["RemoveItem"] = { type = "method", description = [[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. ]], }, ["RemoveOneEquippedItem"] = { type = "method", description = [[Removes one item from the hotbar's currently selected slot ]], }, ["SendEquippedSlot"] = { type = "method", }, ["SetArmorSlot"] = { type = "method", description = [[Sets the specified armor slot contents ]], }, ["SetEquippedSlotNum"] = { type = "method", description = [[Sets the currently selected hotbar slot number ]], }, ["SetHotbarSlot"] = { type = "method", description = [[Sets the specified hotbar slot contents ]], }, ["SetInventorySlot"] = { type = "method", description = [[Sets the specified main inventory slot contents ]], }, ["SetSlot"] = { type = "method", description = [[Sets the specified slot contents ]], }, }, }, cItem = { type = "class", description = [[ cItem is what defines an item or stack of items in the game, it contains the item ID, damage, quantity and enchantments. Each slot in a {{cInventory}} class or a {{cItemGrid}} class is a cItem and each {{cPickup}} contains a cItem. The enchantments are contained in a separate {{cEnchantments}} class and are accessible through the m_Enchantments variable. To test if a cItem object represents an empty item, do not compare the item type nor the item count, but rather use the IsEmpty() function. To translate from a cItem to its string representation, use the {{Globals#functions|global function}} ItemToString(), ItemTypeToString() or ItemToFullString(). To translate from a string to a cItem, use the StringToItem() global function. ]], childs = { ["() (constructor)"] = { type = "method", description = [[Creates a new empty cItem object ]], }, ["() (constructor)"] = { type = "method", description = [[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) ]], }, ["() (constructor)"] = { type = "method", description = [[Creates an exact copy of the cItem object in the parameter ]], }, ["AddCount"] = { type = "method", description = [[Adds the specified amount to the item count. Returns self (useful for chaining). ]], }, ["Clear"] = { type = "method", description = [[Resets the instance to an empty item ]], }, ["CopyOne"] = { type = "method", description = [[Creates a copy of this object, with its count set to 1 ]], }, ["DamageItem"] = { type = "method", description = [[Adds the specified damage. Returns true when damage reaches max value and the item should be destroyed (but doesn't destroy the item) ]], }, ["Empty"] = { type = "method", description = [[Resets the instance to an empty item ]], }, ["EnchantByXPLevels"] = { type = "method", description = [[Enchants the item using the specified number of XP levels. Returns true if item enchanted, false if not. ]], }, ["GetEnchantability"] = { type = "method", description = [[Returns the enchantability of the item. When the item hasn't a enchantability, it will returns 0 ]], }, ["GetMaxDamage"] = { type = "method", description = [[Returns the maximum value for damage that this item can get before breaking; zero if damage is not accounted for for this item type ]], }, ["GetMaxStackSize"] = { type = "method", description = [[Returns the maximum stack size for this item. ]], }, ["IsBothNameAndLoreEmpty"] = { type = "method", description = [[Returns if both the custom name and lore are not set. ]], }, ["IsCustomNameEmpty"] = { type = "method", description = [[Returns if the custom name of the cItem is empty. ]], }, ["IsDamageable"] = { type = "method", description = [[Returns true if this item does account for its damage ]], }, ["IsEmpty"] = { type = "method", description = [[Returns true if this object represents an empty item (zero count or invalid ID) ]], }, ["IsEnchantable"] = { type = "method", description = [[(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. ]], }, ["IsEqual"] = { type = "method", description = [[Returns true if the item in the parameter is the same as the one stored in the object (type, damage, lore, name and enchantments) ]], }, ["IsFullStack"] = { type = "method", description = [[Returns true if the item is stacked up to its maximum stacking ]], }, ["IsLoreEmpty"] = { type = "method", description = [[Returns if the lore of the cItem is empty. ]], }, ["IsSameType"] = { type = "method", description = [[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 ]], }, }, }, cItemFrame = { type = "class", description = [[ ]], childs = { ["GetItem"] = { type = "method", }, ["GetItemRotation"] = { type = "method", }, ["SetItem"] = { type = "method", }, ["SetItemRotation"] = { type = "method", }, }, }, cItemGrid = { type = "class", description = [[This class represents a 2D array of items. It is used as the underlying storage and API for all cases that use a grid of items: - {{cChestEntity|Chest}} contents - (TODO) Chest minecart contents - {{cDispenserEntity|Dispenser}} contents - {{cDropperEntity|Dropper}} contents - {{cFurnaceEntity|Furnace}} contents (?) - {{cHopperEntity|Hopper}} contents - (TODO) Hopper minecart contents - {{cPlayer|Player}} Inventory areas - (TODO) Trapped chest contents The items contained in this object are accessed either by a pair of XY coords, or a slot number (x + Width * y). There are functions available for converting between the two formats. ]], childs = { ["AddItem"] = { type = "method", description = [[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"] = { type = "method", description = [[Same as AddItem, but for several items at once ]], }, ["ChangeSlotCount"] = { type = "method", description = [[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 ]], }, ["ChangeSlotCount"] = { type = "method", description = [[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"] = { type = "method", description = [[Empties all slots ]], }, ["CopyToItems"] = { type = "method", description = [[Copies all non-empty slots into the cItems object provided; original cItems contents are preserved ]], }, ["DamageItem"] = { type = "method", description = [[Adds the specified damage (1 by default) to the specified item, returns true if the item reached its max damage and should be destroyed ]], }, ["DamageItem"] = { type = "method", description = [[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"] = { type = "method", description = [[Destroys the item in the specified slot ]], }, ["EmptySlot"] = { type = "method", description = [[Destroys the item in the specified slot ]], }, ["GetFirstEmptySlot"] = { type = "method", description = [[Returns the SlotNumber of the first empty slot, -1 if all slots are full ]], }, ["GetFirstUsedSlot"] = { type = "method", description = [[Returns the SlotNumber of the first non-empty slot, -1 if all slots are empty ]], }, ["GetHeight"] = { type = "method", description = [[Returns the Y dimension of the grid ]], }, ["GetLastEmptySlot"] = { type = "method", description = [[Returns the SlotNumber of the last empty slot, -1 if all slots are full ]], }, ["GetLastUsedSlot"] = { type = "method", description = [[Returns the SlotNumber of the last non-empty slot, -1 if all slots are empty ]], }, ["GetNextEmptySlot"] = { type = "method", description = [[Returns the SlotNumber of the first empty slot following StartFrom, -1 if all the following slots are full ]], }, ["GetNextUsedSlot"] = { type = "method", description = [[Returns the SlotNumber of the first non-empty slot following StartFrom, -1 if all the following slots are full ]], }, ["GetNumSlots"] = { type = "method", description = [[Returns the total number of slots in the grid (Width * Height) ]], }, ["GetSlot"] = { type = "method", description = [[Returns the item in the specified slot. Note that the item is read-only ]], }, ["GetSlot"] = { type = "method", description = [[Returns the item in the specified slot. Note that the item is read-only ]], }, ["GetSlotCoords"] = { type = "method", description = [[Returns the X and Y coords for the specified SlotNumber. Returns "-1, -1" on invalid SlotNumber ]], }, ["GetSlotNum"] = { type = "method", description = [[Returns the SlotNumber for the specified slot coords. Returns -1 on invalid coords ]], }, ["GetWidth"] = { type = "method", description = [[Returns the X dimension of the grid ]], }, ["HasItems"] = { type = "method", description = [[Returns true if there are at least as many items of the specified type as in the parameter ]], }, ["HowManyCanFit"] = { type = "method", description = [[Returns the number of the specified items that can fit in the storage, including empty slots ]], }, ["HowManyItems"] = { type = "method", description = [[Returns the number of the specified items that are currently stored ]], }, ["IsSlotEmpty"] = { type = "method", description = [[Returns true if the specified slot is empty, or an invalid slot is specified ]], }, ["IsSlotEmpty"] = { type = "method", description = [[Returns true if the specified slot is empty, or an invalid slot is specified ]], }, ["RemoveItem"] = { type = "method", description = [[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. ]], }, ["RemoveOneItem"] = { type = "method", description = [[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 ]], }, ["RemoveOneItem"] = { type = "method", description = [[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"] = { type = "method", description = [[Sets the specified slot to the specified item ]], }, ["SetSlot"] = { type = "method", description = [[Sets the specified slot to the specified item ]], }, }, }, cItems = { type = "class", description = [[ This class represents a numbered collection (array) of {{cItem}} objects. The array indices start at zero, each consecutive item gets a consecutive index. This class is used for spawning multiple pickups or for mass manipulating an inventory. ]], childs = { ["() (constructor)"] = { type = "method", description = [[Creates a new cItems object ]], }, ["Add"] = { type = "method", description = [[Adds a new item to the end of the collection ]], }, ["Add"] = { type = "method", description = [[Adds a new item to the end of the collection ]], }, ["Clear"] = { type = "method", description = [[Removes all items from the collection ]], }, ["Delete"] = { type = "method", description = [[Deletes item at the specified index ]], }, ["Get"] = { type = "method", description = [[Returns the item at the specified index ]], }, ["Set"] = { type = "method", description = [[Sets the item at the specified index to the specified item ]], }, ["Set"] = { type = "method", description = [[Sets the item at the specified index to the specified item ]], }, ["Size"] = { type = "method", description = [[Returns the number of items in the collection ]], }, }, }, cJukeboxEntity = { type = "class", description = [[ This class represents a jukebox in the world. It can play the records, either when the {{cPlayer|player}} uses the record on the jukebox, or when a plugin instructs it to play. ]], childs = { ["EjectRecord"] = { type = "method", description = [[Ejects the current record as a {{cPickup|pickup}}. No action if there's no current record. To remove record without generating the pickup, use SetRecord(0). Returns true if pickup ejected. ]], }, ["GetRecord"] = { type = "method", description = [[Returns the record currently present. Zero for no record, E_ITEM_*_DISC for records. ]], }, ["IsPlayingRecord"] = { type = "method", description = [[Returns true if the jukebox is playing a record. ]], }, ["IsRecordItem"] = { type = "method", description = [[Returns true if the specified item is a record that can be played. ]], }, ["PlayRecord"] = { type = "method", description = [[Plays the specified Record. Return false if the parameter isn't a playable Record (E_ITEM_XXX_DISC). If there is a record already playing, ejects it first. ]], }, ["SetRecord"] = { type = "method", description = [[Sets the currently present record. Use zero for no record, or E_ITEM_*_DISC for records. ]], }, }, }, cLineBlockTracer = { type = "class", description = [[This class provides an easy-to-use interface for tracing lines through individual blocks in the world. It will call the provided callbacks according to what events it encounters along the way. For the Lua API, there's only one static function exported that takes all the parameters necessary to do the tracing. The Callbacks parameter is a table containing all the functions that will be called upon the various events. See below for further information. ]], childs = { ["Trace"] = { type = "method", description = [[(STATIC) Performs the trace on the specified line. Returns true if the entire trace was processed (no callback returned true) ]], }, }, }, cLuaWindow = { type = "class", description = [[This class is used by plugins wishing to display a custom window to the player, unrelated to block entities or entities near the player. The window can be of any type and have any contents that the plugin defines. Callbacks for when the player modifies the window contents and when the player closes the window can be set. This class inherits from the {{cWindow|cWindow}} class, so all cWindow's functions and constants can be used, in addition to the cLuaWindow-specific functions listed below. The contents of this window are represented by a {{cWindow|cWindow}}:GetSlot() etc. or {{cPlayer|cPlayer}}:GetInventory() to access the player inventory. When creating a new cLuaWindow object, you need to specify both the window type and the contents' width and height. Note that MCServer accepts any combination of these, but opening a window for a player may crash their client if the contents' dimensions don't match the client's expectations. To open the window for a player, call {{cPlayer|cPlayer}}:OpenWindow(). Multiple players can open window of the same cLuaWindow object. All players see the same items in the window's contents (like chest, unlike crafting table). ]], childs = { ["() (constructor)"] = { type = "method", description = [[Creates a new object of this class ]], }, ["GetContents"] = { type = "method", description = [[Returns the cItemGrid object representing the internal storage in this window ]], }, ["SetOnClosing"] = { type = "method", description = [[Sets the function that the window will call when it is about to be closed by a player ]], }, ["SetOnSlotChanged"] = { type = "method", description = [[Sets the function that the window will call when a slot is changed by a player ]], }, }, }, cMap = { type = "class", description = [[ This class encapsulates a single in-game colored map. The contents (i.e. pixel data) of a cMap are dynamically updated by each tracked {{cPlayer}} instance. Furthermore, a cMap maintains and periodically updates a list of map decorators, which are objects drawn on the map that can freely move (e.g. Player and item frame pointers). ]], childs = { ["EraseData"] = { type = "method", description = [[Erases all pixel data. ]], }, ["GetCenterX"] = { type = "method", description = [[Returns the X coord of the map's center. ]], }, ["GetCenterZ"] = { type = "method", description = [[Returns the Y coord of the map's center. ]], }, ["GetDimension"] = { type = "method", description = [[Returns the dimension of the associated world. ]], }, ["GetHeight"] = { type = "method", description = [[Returns the height of the map. ]], }, ["GetID"] = { type = "method", description = [[Returns the numerical ID of the map. (The item damage value) ]], }, ["GetName"] = { type = "method", description = [[Returns the name of the map. ]], }, ["GetNumPixels"] = { type = "method", description = [[Returns the number of pixels in this map. ]], }, ["GetPixel"] = { type = "method", description = [[Returns the color of the specified pixel. ]], }, ["GetPixelWidth"] = { type = "method", description = [[Returns the width of a single pixel in blocks. ]], }, ["GetScale"] = { type = "method", description = [[Returns the scale of the map. Range: [0,4] ]], }, ["GetWidth"] = { type = "method", description = [[Returns the width of the map. ]], }, ["GetWorld"] = { type = "method", description = [[Returns the associated world. ]], }, ["Resize"] = { type = "method", description = [[Resizes the map. WARNING: This will erase the pixel data. ]], }, ["SetPixel"] = { type = "method", description = [[Sets the color of the specified pixel. Returns false on error (Out of range). ]], }, ["SetPosition"] = { type = "method", description = [[Relocates the map. The pixel data will not be modified. ]], }, ["SetScale"] = { type = "method", description = [[Rescales the map. The pixel data will not be modified. ]], }, ["E_BASE_COLOR_BLUE"] = { type = "value", }, ["E_BASE_COLOR_BROWN"] = { type = "value", }, ["E_BASE_COLOR_DARK_BROWN"] = { type = "value", }, ["E_BASE_COLOR_DARK_GRAY"] = { type = "value", }, ["E_BASE_COLOR_DARK_GREEN"] = { type = "value", }, ["E_BASE_COLOR_GRAY_1"] = { type = "value", }, ["E_BASE_COLOR_GRAY_2"] = { type = "value", }, ["E_BASE_COLOR_LIGHT_BROWN"] = { type = "value", }, ["E_BASE_COLOR_LIGHT_GRAY"] = { type = "value", }, ["E_BASE_COLOR_LIGHT_GREEN"] = { type = "value", }, ["E_BASE_COLOR_PALE_BLUE"] = { type = "value", }, ["E_BASE_COLOR_RED"] = { type = "value", }, ["E_BASE_COLOR_TRANSPARENT"] = { type = "value", }, ["E_BASE_COLOR_WHITE"] = { type = "value", }, }, }, cMapManager = { type = "class", description = [[ This class is associated with a single {{cWorld}} instance and manages a list of maps. ]], childs = { ["DoWithMap"] = { type = "method", description = [[If a map with the specified ID exists, calls the CallbackFunction for that map. The CallbackFunction has the following signature:
function Callback({{cMap|Map}})
Returns true if the map was found and the callback called, false if map not found. ]], }, ["GetNumMaps"] = { type = "method", description = [[Returns the number of registered maps. ]], }, }, }, cMobHeadEntity = { type = "class", description = [[ This class represents a mob head block entity in the world. ]], childs = { ["GetOwner"] = { type = "method", description = [[Returns the player name of the mob head ]], }, ["GetRotation"] = { type = "method", description = [[Returns the rotation of the mob head ]], }, ["GetType"] = { type = "method", description = [[Returns the type of the mob head ]], }, ["SetOwner"] = { type = "method", description = [[Set the player name for mob heads with player type ]], }, ["SetRotation"] = { type = "method", description = [[Sets the rotation of the mob head ]], }, ["SetType"] = { type = "method", description = [[Set the type of the mob head ]], }, }, }, cMobSpawnerEntity = { type = "class", description = [[ This class represents a mob spawner block entity in the world. ]], childs = { ["GetEntity"] = { type = "method", description = [[Returns the entity type that will be spawn by this mob spawner. ]], }, ["GetNearbyMonsterNum"] = { type = "method", description = [[Returns the amount of this monster type in a 8-block radius (Y: 4-block radius). ]], }, ["GetNearbyPlayersNum"] = { type = "method", description = [[Returns the amount of the nearby players in a 16-block radius. ]], }, ["GetSpawnDelay"] = { type = "method", description = [[Returns the spawn delay. This is the tick delay that is needed to spawn new monsters. ]], }, ["ResetTimer"] = { type = "method", description = [[Sets the spawn delay to a new random value. ]], }, ["SetEntity"] = { type = "method", description = [[Sets the entity type who will be spawn by this mob spawner. ]], }, ["SetSpawnDelay"] = { type = "method", description = [[Sets the spawn delay. ]], }, ["SpawnEntity"] = { type = "method", description = [[Spawns the entity. This function automaticly change the spawn delay! ]], }, ["UpdateActiveState"] = { type = "method", description = [[Upate the active flag from the mob spawner. This function will called every 5 seconds from the Tick() function. ]], }, }, }, cMojangAPI = { type = "class", description = [[ Provides interface to various API functions that Mojang provides through their servers. Note that some of these calls will wait for a response from the network, and so shouldn't be used while the server is fully running (or at least when there are players connected) to avoid percepted lag. All the functions are static, call them using the cMojangAPI:Function() convention. Mojang uses two formats for UUIDs, short and dashed. MCServer works with short UUIDs internally, but will convert to dashed UUIDs where needed - in the protocol login for example. The MakeUUIDShort() and MakeUUIDDashed() functions are provided for plugins to use for conversion between the two formats. This class will cache values returned by the API service. The cache will hold the values for 7 days by default, after that, they will no longer be available. This is in order to not let the server get banned from using the API service, since they are rate-limited to 600 queries per 10 minutes. The cache contents also gets updated whenever a player successfully joins, since that makes the server contact the API service, too, and retrieve the relevant data. ]], childs = { ["AddPlayerNameToUUIDMapping"] = { type = "method", description = [[(STATIC) Adds the specified PlayerName-to-UUID mapping into the cache, with current timestamp. Accepts both short or dashed UUIDs. ]], }, ["GetPlayerNameFromUUID"] = { type = "method", description = [[(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.
WARNING: 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"] = { type = "method", description = [[(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.
WARNING: 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"] = { type = "method", description = [[(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.
WARNING: 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"] = { type = "method", description = [[(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"] = { type = "method", description = [[(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. ]], }, }, }, cMonster = { type = "class", description = [[ This class is the base class for all computer-controlled mobs in the game. To spawn a mob in a world, use the {{cWorld}}:SpawnMob() function. ]], childs = { ["FamilyFromType"] = { type = "method", description = [[(STATIC) Returns the mob family ({{cMonster#MobFamily|mfXXX}} constants) based on the mob type ({{Globals#MobType|mtXXX}} constants) ]], }, ["GetCustomName"] = { type = "method", description = [[Gets the custom name of the monster. If no custom name is set, the function returns an empty string. ]], }, ["GetMobFamily"] = { type = "method", description = [[Returns this mob's family ({{cMonster#MobFamily|mfXXX}} constant) ]], }, ["GetMobType"] = { type = "method", description = [[Returns the type of this mob ({{Globals#MobType|mtXXX}} constant) ]], }, ["GetRelativeWalkSpeed"] = { type = "method", description = [[Returns the relative walk speed of this mob. Standard is 1.0 ]], }, ["GetSpawnDelay"] = { type = "method", description = [[(STATIC) Returns the spawn delay - the number of game ticks between spawn attempts - for the specified mob family. ]], }, ["HasCustomName"] = { type = "method", description = [[Returns true if the monster has a custom name. ]], }, ["IsCustomNameAlwaysVisible"] = { type = "method", description = [[Is the custom name of this monster always visible? If not, you only see the name when you sight the mob. ]], }, ["MobTypeToString"] = { type = "method", description = [[(STATIC) Returns the string representing the given mob type ({{Globals#MobType|mtXXX}} constant), or empty string if unknown type. ]], }, ["MobTypeToVanillaName"] = { type = "method", description = [[(STATIC) Returns the vanilla name of the given mob type, or empty string if unknown type. ]], }, ["MoveToPosition"] = { type = "method", description = [[Moves mob to the specified position ]], }, ["SetCustomName"] = { type = "method", description = [[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. ]], }, ["SetCustomNameAlwaysVisible"] = { type = "method", description = [[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. ]], }, ["SetRelativeWalkSpeed"] = { type = "method", description = [[Sets the relative walk speed of this mob. Standard is 1.0 ]], }, ["StringToMobType"] = { type = "method", description = [[(STATIC) Returns the mob type ({{Globals#MobType|mtXXX}} constant) parsed from the string type ("creeper"), or mtInvalidType if unrecognized. ]], }, }, }, cNetwork = { type = "class", description = [[ This is the namespace for high-level network-related operations. Allows plugins to make TCP connections to the outside world using a callback-based API. All functions in this namespace are static, they should be called on the cNetwork class itself:
local Server = cNetwork:Listen(1024, ListenCallbacks);
]], childs = { ["Connect"] = { type = "method", description = [[(STATIC) Begins establishing a (client) TCP connection to the specified host. Uses the LinkCallbacks table to report progress, success, errors and incoming data. Returns false if it fails immediately (bad port value, bad hostname format), true otherwise. Host can be either an IP address or a hostname. ]], }, ["CreateUDPEndpoint"] = { type = "method", description = [[(STATIC) Creates a UDP endpoint that listens for incoming datagrams on the specified port, and can be used to send or broadcast datagrams. Uses the UDPCallbacks to report incoming datagrams or errors. If the endpoint cannot be created, the OnError callback is called with the error details and the returned endpoint will report IsOpen() == false. The plugin needs to store the returned endpoint object for as long as it needs the UDP port open; if the endpoint is garbage-collected by Lua, the socket will be closed and no more incoming data will be reported.
If the Port is zero, the OS chooses an available UDP port for the endpoint; use {{cUDPEndpoint}}:GetPort() to query the port number in such case. ]], }, ["EnumLocalIPAddresses"] = { type = "method", description = [[(STATIC) Returns all local IP addresses for network interfaces currently available on the machine. ]], }, ["HostnameToIP"] = { type = "method", description = [[(STATIC) Begins a DNS lookup to find the IP address(es) for the specified host. Uses the LookupCallbacks table to report progress, success or errors. Returns false if it fails immediately (bad hostname format), true if the lookup started successfully. Host can be either a hostname or an IP address. ]], }, ["IPToHostname"] = { type = "method", description = [[(STATIC) Begins a reverse-DNS lookup to find out the hostname for the specified IP address. Uses the LookupCallbacks table to report progress, success or errors. Returns false if it fails immediately (bad address format), true if the lookup started successfully. ]], }, ["Listen"] = { type = "method", description = [[(STATIC) Starts listening on the specified port. Uses the ListenCallbacks to report incoming connections or errors. Returns a {{cServerHandle}} object representing the server. If the listen operation failed, the OnError callback is called with the error details and the returned server handle will report IsListening() == false. The plugin needs to store the server handle object for as long as it needs the server running, if the server handle is garbage-collected by Lua, the listening socket will be closed and all current connections dropped. ]], }, }, }, cNoteEntity = { type = "class", description = [[ This class represents a note block entity in the world. It takes care of the note block's pitch, and also can play the sound, either when the {{cPlayer|player}} right-clicks it, redstone activates it, or upon a plugin's request. The pitch is stored as an integer between 0 and 24. ]], childs = { ["GetPitch"] = { type = "method", description = [[Returns the current pitch set for the block ]], }, ["IncrementPitch"] = { type = "method", description = [[Adds 1 to the current pitch. Wraps around to 0 when the pitch cannot go any higher. ]], }, ["MakeSound"] = { type = "method", description = [[Plays the sound for all {{cClientHandle|clients}} near this block. ]], }, ["SetPitch"] = { type = "method", description = [[Sets a new pitch for the block. ]], }, }, }, cObjective = { type = "class", description = [[ This class represents a single scoreboard objective. ]], childs = { ["AddScore"] = { type = "method", description = [[Adds a value to the score of the specified player and returns the new value. ]], }, ["GetDisplayName"] = { type = "method", description = [[Returns the display name of the objective. This name will be shown to the connected players. ]], }, ["GetName"] = { type = "method", description = [[Returns the internal name of the objective. ]], }, ["GetScore"] = { type = "method", description = [[Returns the score of the specified player. ]], }, ["GetType"] = { type = "method", description = [[Returns the type of the objective. (i.e what is being tracked) ]], }, ["Reset"] = { type = "method", description = [[Resets the scores of the tracked players. ]], }, ["ResetScore"] = { type = "method", description = [[Reset the score of the specified player. ]], }, ["SetDisplayName"] = { type = "method", description = [[Sets the display name of the objective. ]], }, ["SetScore"] = { type = "method", description = [[Sets the score of the specified player. ]], }, ["SubScore"] = { type = "method", description = [[Subtracts a value from the score of the specified player and returns the new value. ]], }, ["otAchievement"] = { type = "value", }, ["otDeathCount"] = { type = "value", }, ["otDummy"] = { type = "value", }, ["otHealth"] = { type = "value", }, ["otPlayerKillCount"] = { type = "value", }, ["otStat"] = { type = "value", }, ["otStatBlockMine"] = { type = "value", }, ["otStatEntityKill"] = { type = "value", }, ["otStatEntityKilledBy"] = { type = "value", }, ["otStatItemBreak"] = { type = "value", }, ["otStatItemCraft"] = { type = "value", }, ["otStatItemUse"] = { type = "value", }, ["otTotalKillCount"] = { type = "value", }, }, }, cPainting = { type = "class", description = [[This class represents a painting in the world. These paintings are special and different from Vanilla in that they can be critical-hit. ]], childs = { ["GetName"] = { type = "method", description = [[Returns the name of the painting ]], }, }, }, cPawn = { type = "class", description = [[cPawn is a controllable pawn object, controlled by either AI or a player. cPawn inherits all functions and members of {{cEntity}} ]], childs = { ["AddEntityEffect"] = { type = "method", description = [[Applies an entity effect ]], }, ["ClearEntityEffects"] = { type = "method", description = [[Removes all currently applied entity effects ]], }, ["RemoveEntityEffect"] = { type = "method", description = [[Removes a currently applied entity effect ]], }, }, }, cPickup = { type = "class", description = [[ This class represents a pickup entity (an item that the player or mobs can pick up). It is also commonly known as "drops". With this class you could create your own "drop" or modify those created automatically. ]], childs = { ["CollectedBy"] = { type = "method", description = [[Tries to make the player collect the pickup. Returns true if the pickup was collected, at least partially. ]], }, ["GetAge"] = { type = "method", description = [[Returns the number of ticks that the pickup has existed. ]], }, ["GetItem"] = { type = "method", description = [[Returns the item represented by this pickup ]], }, ["IsCollected"] = { type = "method", description = [[Returns true if this pickup has already been collected (is waiting to be destroyed) ]], }, ["IsPlayerCreated"] = { type = "method", description = [[Returns true if the pickup was created by a player ]], }, ["SetAge"] = { type = "method", description = [[Sets the pickup's age, in ticks. ]], }, }, }, cPlayer = { type = "class", description = [[ This class describes a player in the server. cPlayer inherits all functions and members of {{cPawn|cPawn}}. It handles all the aspects of the gameplay, such as hunger, sprinting, inventory etc. ]], childs = { ["AddFoodExhaustion"] = { type = "method", description = [[Adds the specified number to the food exhaustion. Only positive numbers expected. ]], }, ["CalcLevelFromXp"] = { type = "method", description = [[(STATIC) Returns the level which is reached with the specified amount of XP. Inverse of XpForLevel(). ]], }, ["CanFly"] = { type = "method", description = [[Returns if the player is able to fly. ]], }, ["CloseWindow"] = { type = "method", description = [[Closes the currently open UI window. If CanRefuse is true (default), the window may refuse the closing. ]], }, ["CloseWindowIfID"] = { type = "method", description = [[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"] = { type = "method", description = [[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"] = { type = "method", description = [[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. ]], }, ["ForceSetSpeed"] = { type = "method", description = [[Forces the player to move to the given direction. ]], }, ["GetClientHandle"] = { type = "method", description = [[Returns the client handle representing the player's connection. May be nil (AI players). ]], }, ["GetColor"] = { type = "method", description = [[Returns the full color code to be used for this player's messages (based on their rank). Prefix player messages with this code. ]], }, ["GetCurrentXp"] = { type = "method", description = [[Returns the current amount of XP ]], }, ["GetCustomName"] = { type = "method", description = [[Returns the custom name of this player. If the player hasn't a custom name, it will return an empty string. ]], }, ["GetEffectiveGameMode"] = { type = "method", description = [[(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. ]], }, ["GetEquippedItem"] = { type = "method", description = [[Returns the item that the player is currently holding; empty item if holding nothing. ]], }, ["GetEyeHeight"] = { type = "method", description = [[Returns the height of the player's eyes, in absolute coords ]], }, ["GetEyePosition"] = { type = "method", description = [[Returns the position of the player's eyes, as a {{Vector3d}} ]], }, ["GetFloaterID"] = { type = "method", description = [[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"] = { type = "method", description = [[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"] = { type = "method", description = [[Returns the food exhaustion level ]], }, ["GetFoodLevel"] = { type = "method", description = [[Returns the food level (number of half-drumsticks on-screen) ]], }, ["GetFoodSaturationLevel"] = { type = "method", description = [[Returns the food saturation (overcharge of the food level, is depleted before food level) ]], }, ["GetFoodTickTimer"] = { type = "method", description = [[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"] = { type = "method", description = [[Returns the player's gamemode. The player may have their gamemode unassigned, in which case they inherit the gamemode from the current {{cWorld|world}}.
NOTE: Instead of comparing the value returned by this function to the gmXXX constants, use the IsGameModeXXX() functions. These functions handle the gamemode inheritance automatically. ]], }, ["GetIP"] = { type = "method", description = [[Returns the IP address of the player, if available. Returns an empty string if there's no IP to report. ]], }, ["GetInventory"] = { type = "method", description = [[Returns the player's inventory ]], }, ["GetLastBedPos"] = { type = "method", description = [[Returns the position of the last bed the player has slept in, or the world's spawn if no such position was recorded. ]], }, ["GetMaxSpeed"] = { type = "method", description = [[Returns the player's current maximum speed, relative to the game default speed. Takes into account the sprinting / flying status. ]], }, ["GetName"] = { type = "method", description = [[Returns the player's name ]], }, ["GetNormalMaxSpeed"] = { type = "method", description = [[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"] = { type = "method", description = [[Returns the list of all permissions that the player has assigned to them through their rank. ]], }, ["GetPlayerListName"] = { type = "method", description = [[Returns the name that is used in the playerlist. ]], }, ["GetRestrictions"] = { type = "method", }, ["GetSprintingMaxSpeed"] = { type = "method", description = [[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. ]], }, ["GetTeam"] = { type = "method", description = [[Returns the team that the player belongs to, or nil if none. ]], }, ["GetStance"] = { type = "method", description = [[Returns the player's stance (Y-pos of player's eyes) ]], }, ["GetThrowSpeed"] = { type = "method", description = [[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"] = { type = "method", description = [[Returns the position where the projectiles should start when thrown by this player. ]], }, ["GetUUID"] = { type = "method", description = [[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"] = { type = "method", description = [[Returns the currently open UI window. If the player doesn't have any UI window open, returns the inventory window. ]], }, ["GetXpLevel"] = { type = "method", description = [[Returns the current XP level (based on current XP amount). ]], }, ["GetXpLifetimeTotal"] = { type = "method", description = [[Returns the amount of XP that has been accumulated throughout the player's lifetime. ]], }, ["GetXpPercentage"] = { type = "method", description = [[Returns the percentage of the experience bar - the amount of XP towards the next XP level. Between 0 and 1. ]], }, ["HasCustomName"] = { type = "method", description = [[Returns true if the player has a custom name. ]], }, ["HasPermission"] = { type = "method", description = [[Returns true if the player has the specified permission ]], }, ["Heal"] = { type = "method", description = [[Heals the player by the specified amount of HPs. Only positive amounts are expected. Sends a health update to the client. ]], }, ["IsEating"] = { type = "method", description = [[Returns true if the player is currently eating the item in their hand. ]], }, ["IsFishing"] = { type = "method", description = [[Returns true if the player is currently fishing ]], }, ["IsFlying"] = { type = "method", description = [[Returns true if the player is flying. ]], }, ["IsGameModeAdventure"] = { type = "method", description = [[Returns true if the player is in the gmAdventure gamemode, or has their gamemode unset and the world is a gmAdventure world. ]], }, ["IsGameModeCreative"] = { type = "method", description = [[Returns true if the player is in the gmCreative gamemode, or has their gamemode unset and the world is a gmCreative world. ]], }, ["IsGameModeSpectator"] = { type = "method", description = [[Returns true if the player is in the gmSpectator gamemode, or has their gamemode unset and the world is a gmSpectator world. ]], }, ["IsGameModeSurvival"] = { type = "method", description = [[Returns true if the player is in the gmSurvival gamemode, or has their gamemode unset and the world is a gmSurvival world. ]], }, ["IsInBed"] = { type = "method", description = [[Returns true if the player is currently lying in a bed. ]], }, ["IsSatiated"] = { type = "method", description = [[Returns true if the player is satiated (cannot eat). ]], }, ["IsVisible"] = { type = "method", description = [[Returns true if the player is visible to other players ]], }, ["LoadRank"] = { type = "method", description = [[Reloads the player's rank, message visuals and permissions from the {{cRankManager}}, based on the player's current rank. ]], }, ["MoveTo"] = { type = "method", }, ["OpenWindow"] = { type = "method", description = [[Opens the specified UI window for the player. ]], }, ["PermissionMatches"] = { type = "method", description = [[(STATIC) Returns true if the specified permission matches the specified template. The template may contain wildcards. ]], }, ["PlaceBlock"] = { type = "method", description = [[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. ]], }, ["Respawn"] = { type = "method", description = [[Restores the health, extinguishes fire, makes visible and sends the Respawn packet. ]], }, ["SendBlocksAround"] = { type = "method", description = [[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"] = { type = "method", description = [[Sends the specified message to the player. ]], }, ["SendMessageFailure"] = { type = "method", description = [[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"] = { type = "method", description = [[Prepends Red [FATAL] / colours entire text (depending on ShouldUseChatPrefixes()) and sends message to player. For something serious, such as a plugin crash, etc. ]], }, ["SendMessageInfo"] = { type = "method", description = [[Prepends Yellow [INFO] / colours entire text (depending on ShouldUseChatPrefixes()) and sends message to player. Informational message, such as command usage, etc. ]], }, ["SendMessagePrivateMsg"] = { type = "method", description = [[Prepends Light Blue [MSG: *SenderName*] / prepends SenderName and colours entire text (depending on ShouldUseChatPrefixes()) and sends message to player. For private messaging. ]], }, ["SendMessageSuccess"] = { type = "method", description = [[Prepends Green [INFO] / colours entire text (depending on ShouldUseChatPrefixes()) and sends message to player. Success notification. ]], }, ["SendMessageWarning"] = { type = "method", description = [[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. ]], }, ["SendRotation"] = { type = "method", description = [[Sends the specified rotation to the player, forcing them to look that way ]], }, ["SetBedPos"] = { type = "method", description = [[Sets the internal representation of the last bed position the player has slept in. The player will respawn at this position if they die. ]], }, ["SetCanFly"] = { type = "method", description = [[Sets if the player can fly or not. ]], }, ["SetCrouch"] = { type = "method", description = [[Sets the crouch state, broadcasts the change to other players. ]], }, ["SetCurrentExperience"] = { type = "method", description = [[Sets the current amount of experience (and indirectly, the XP level). ]], }, ["SetCustomName"] = { type = "method", description = [[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. ]], }, ["SetFlying"] = { type = "method", description = [[Sets if the player is flying or not. ]], }, ["SetFlyingMaxSpeed"] = { type = "method", description = [[Sets the flying maximum speed, relative to the game default speed. The default value is 1. Sends the updated speed to the client. ]], }, ["SetFoodExhaustionLevel"] = { type = "method", description = [[Sets the food exhaustion to the specified level. ]], }, ["SetFoodLevel"] = { type = "method", description = [[Sets the food level (number of half-drumsticks on-screen) ]], }, ["SetFoodSaturationLevel"] = { type = "method", description = [[Sets the food saturation (overcharge of the food level). ]], }, ["SetFoodTickTimer"] = { type = "method", description = [[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"] = { type = "method", description = [[Sets the gamemode for the player. The new gamemode overrides the world's default gamemode, unless it is set to gmInherit. ]], }, ["SetIsFishing"] = { type = "method", description = [[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"] = { type = "method", description = [[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"] = { type = "method", description = [[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. ]], }, ["SetSprint"] = { type = "method", description = [[Sets whether the player is sprinting or not. ]], }, ["SetSprintingMaxSpeed"] = { type = "method", description = [[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. ]], }, ["SetTeam"] = { type = "method", description = [[Moves the player to the specified team. ]], }, ["SetVisible"] = { type = "method", description = [[Sets the player visibility to other players ]], }, ["TossEquippedItem"] = { type = "method", description = [[Tosses the item that the player has selected in their hotbar. Amount defaults to 1. ]], }, ["TossHeldItem"] = { type = "method", description = [[Tosses the item held by the cursor, then the player is in a UI window. Amount defaults to 1. ]], }, ["TossPickup"] = { type = "method", description = [[Tosses a pickup newly created from the specified item. ]], }, ["XpForLevel"] = { type = "method", description = [[(STATIC) Returns the total amount of XP needed for the specified XP level. Inverse of CalcLevelFromXp(). ]], }, ["EATING_TICKS"] = { type = "value", }, ["MAX_FOOD_LEVEL"] = { type = "value", }, ["MAX_HEALTH"] = { type = "value", }, }, }, cPlugin = { type = "class", description = [[cPlugin describes a Lua plugin. This page is dedicated to new-style plugins and contain their functions. Each plugin has its own Plugin object. ]], childs = { ["GetDirectory"] = { type = "method", description = [[OBSOLETE, use GetFolderName() instead! ]], }, ["GetFolderName"] = { type = "method", description = [[Returns the name of the folder where the plugin's files are. (APIDump) ]], }, ["GetLoadError"] = { type = "method", description = [[If the plugin failed to load, returns the error message for the failure. ]], }, ["GetLocalDirectory"] = { type = "method", description = [[OBSOLETE, use GetLocalFolder instead. ]], }, ["GetLocalFolder"] = { type = "method", description = [[Returns the path where the plugin's files are. (Plugins/APIDump) ]], }, ["GetName"] = { type = "method", description = [[Returns the name of the plugin. ]], }, ["GetStatus"] = { type = "method", description = [[Returns the status of the plugin (loaded, disabled, unloaded, error, not found) ]], }, ["GetVersion"] = { type = "method", description = [[Returns the version of the plugin. ]], }, ["IsLoaded"] = { type = "method", }, ["SetName"] = { type = "method", description = [[Sets the name of the Plugin. ]], }, ["SetVersion"] = { type = "method", description = [[Sets the version of the plugin. ]], }, }, }, cPluginLua = { type = "class", description = [[ ]], childs = { ["AddWebTab"] = { type = "method", description = [[Adds a new webadmin tab ]], }, }, }, cPluginManager = { type = "class", description = [[ This class is used for generic plugin-related functionality. The plugin manager has a list of all plugins, can enable or disable plugins, manages hooks and in-game console commands. Plugins can be identified by either the PluginFolder or PluginName. Note that these two can differ, refer to the forum for detailed discussion. There is one instance of cPluginManager in MCServer, to get it, call either {{cRoot|cRoot}}:Get():GetPluginManager() or cPluginManager:Get() function. Note that some functions are "static", that means that they are called using a dot operator instead of the colon operator. For example:
cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChatMessage);
]], childs = { ["AddHook"] = { type = "method", description = [[(STATIC) Informs the plugin manager that it should call the specified function when the specified hook event occurs. If a function is not specified, a default global function name is looked up, based on the hook type ]], }, ["AddHook"] = { type = "method", description = [[(STATIC, DEPRECATED) Informs the plugin manager that it should call the specified function when the specified hook event occurs. If a function is not specified, a default function name is looked up, based on the hook type. NOTE: This format is deprecated and the server outputs a warning if it is used! ]], }, ["BindCommand"] = { type = "method", description = [[(STATIC) Binds an in-game command with the specified callback function, permission and help string. By common convention, providing an empty string for HelpString will hide the command from the /help display. Returns true if successful, logs to console and returns no value on error. The callback uses the following signature:
function(Split, {{cPlayer|Player}})
The Split parameter contains an array-table of the words that the player has sent, Player is the {{cPlayer}} object representing the player who sent the command. If the callback returns true, the command is assumed to have executed successfully; in all other cases the server sends a warning to the player that the command is unknown (this is so that subcommands can be implemented). ]], }, ["BindCommand"] = { type = "method", description = [[Binds an in-game command with the specified callback function, permission and help string. By common convention, providing an empty string for HelpString will hide the command from the /help display. Returns true if successful, logs to console and returns no value on error. The callback uses the following signature:
function(Split, {{cPlayer|Player}})
The Split parameter contains an array-table of the words that the player has sent, Player is the {{cPlayer}} object representing the player who sent the command. If the callback returns true, the command is assumed to have executed successfully; in all other cases the server sends a warning to the player that the command is unknown (this is so that subcommands can be implemented). ]], }, ["BindConsoleCommand"] = { type = "method", description = [[(STATIC) Binds a console command with the specified callback function and help string. By common convention, providing an empty string for HelpString will hide the command from the "help" console command. Returns true if successful, logs to console and returns no value on error. The callback uses the following signature:
function(Split)
The Split parameter contains an array-table of the words that the admin has typed. If the callback returns true, the command is assumed to have executed successfully; in all other cases the server issues a warning to the console that the command is unknown (this is so that subcommands can be implemented). ]], }, ["BindConsoleCommand"] = { type = "method", description = [[Binds a console command with the specified callback function and help string. By common convention, providing an empty string for HelpString will hide the command from the "help" console command. Returns true if successful, logs to console and returns no value on error. The callback uses the following signature:
function(Split)
The Split parameter contains an array-table of the words that the admin has typed. If the callback returns true, the command is assumed to have executed successfully; in all other cases the server issues a warning to the console that the command is unknown (this is so that subcommands can be implemented). ]], }, ["CallPlugin"] = { type = "method", description = [[(STATIC) Calls the specified function in the specified plugin, passing all the given arguments to it. If it succeeds, it returns all the values returned by that function. If it fails, returns no value at all. Note that only strings, numbers, bools, nils and classes can be used for parameters and return values; tables and functions cannot be copied across plugins. ]], }, ["DoWithPlugin"] = { type = "method", description = [[(STATIC) Calls the CallbackFn for the specified plugin, if found. A plugin can be found even if it is currently unloaded, disabled or errored, the callback should check the plugin status. If the plugin is not found, this function returns false, otherwise it returns the bool value that the callback has returned. The CallbackFn has the following signature:
function ({{cPlugin|Plugin}})
]], }, ["ExecuteCommand"] = { type = "method", description = [[Executes the command as if given by the specified Player. Checks permissions. ]], }, ["ExecuteConsoleCommand"] = { type = "method", description = [[Executes the console command as if given by the admin on the console. If the command is successfully executed, returns true and the text that would be output to the console normally. On error it returns false and an error message. ]], }, ["FindPlugins"] = { type = "method", description = [[OBSOLETE, use RefreshPluginList() instead ]], }, ["ForEachCommand"] = { type = "method", description = [[Calls the CallbackFn function for each command that has been bound using BindCommand(). The CallbackFn has the following signature:
function(Command, Permission, HelpString)
If the callback returns true, the enumeration is aborted and this API function returns false; if it returns false or no value, the enumeration continues with the next command, and the API function returns true. ]], }, ["ForEachConsoleCommand"] = { type = "method", description = [[Calls the CallbackFn function for each command that has been bound using BindConsoleCommand(). The CallbackFn has the following signature:
function (Command, HelpString)
If the callback returns true, the enumeration is aborted and this API function returns false; if it returns false or no value, the enumeration continues with the next command, and the API function returns true. ]], }, ["ForEachPlugin"] = { type = "method", description = [[(STATIC) Calls the CallbackFn function for each plugin that is currently discovered by MCServer (including disabled, unloaded and errrored plugins). The CallbackFn has the following signature:
function ({{cPlugin|Plugin}})
If the callback returns true, the enumeration is aborted and this API function returns false; if it returns false or no value, the enumeration continues with the next command, and the API function returns true. ]], }, ["ForceExecuteCommand"] = { type = "method", description = [[Same as ExecuteCommand, but doesn't check permissions ]], }, ["Get"] = { type = "method", description = [[(STATIC) Returns the single instance of the plugin manager ]], }, ["GetAllPlugins"] = { type = "method", description = [[Returns a table (dictionary) of all plugins, [name => value], where value is a valid {{cPlugin}} if the plugin is loaded, or the bool value false if the plugin is not loaded. ]], }, ["GetCommandPermission"] = { type = "method", description = [[Returns the permission needed for executing the specified command ]], }, ["GetCurrentPlugin"] = { type = "method", description = [[Returns the {{cPlugin}} object for the calling plugin. This is the same object that the Initialize function receives as the argument. ]], }, ["GetNumLoadedPlugins"] = { type = "method", description = [[Returns the number of loaded plugins (psLoaded only) ]], }, ["GetNumPlugins"] = { type = "method", description = [[Returns the number of plugins, including the disabled, errored, unloaded and not-found ones ]], }, ["GetPlugin"] = { type = "method", description = [[(DEPRECATED, UNSAFE) Returns a plugin handle of the specified plugin, or nil if such plugin is not loaded. Note thatdue to multithreading the handle is not guaranteed to be safe for use when stored - a single-plugin reload may have been triggered in the mean time for the requested plugin. ]], }, ["GetPluginsPath"] = { type = "method", description = [[Returns the path where the individual plugin folders are located. Doesn't include the path separator at the end of the returned string. ]], }, ["IsCommandBound"] = { type = "method", description = [[Returns true if in-game Command is already bound (by any plugin) ]], }, ["IsConsoleCommandBound"] = { type = "method", description = [[Returns true if console Command is already bound (by any plugin) ]], }, ["IsPluginLoaded"] = { type = "method", description = [[Returns true if the specified plugin is loaded. ]], }, ["LoadPlugin"] = { type = "method", description = [[(DEPRECATED) Loads a plugin from the specified folder. NOTE: Loading plugins may be an unsafe operation and may result in a deadlock or a crash. This API is deprecated and might be removed. ]], }, ["LogStackTrace"] = { type = "method", description = [[(STATIC) Logs a current stack trace of the Lua engine to the server console log. Same format as is used when the plugin fails. ]], }, ["RefreshPluginList"] = { type = "method", description = [[Refreshes the list of plugins to include all folders inside the Plugins folder (potentially new disabled plugins) ]], }, ["ReloadPlugins"] = { type = "method", description = [[Reloads all active plugins ]], }, ["UnloadPlugin"] = { type = "method", description = [[Queues the specified plugin to be unloaded. To avoid deadlocks, the unloading happens in the main tick thread asynchronously. ]], }, }, }, cProjectileEntity = { type = "class", description = [[ ]], childs = { ["GetCreatorName"] = { type = "method", }, ["GetCreatorUniqueID"] = { type = "method", }, ["GetMCAClassName"] = { type = "method", description = [[Returns the string that identifies the projectile type (class name) in MCA files ]], }, ["GetProjectileKind"] = { type = "method", description = [[Returns the kind of this projectile (pkXXX constant) ]], }, ["IsInGround"] = { type = "method", description = [[Returns true if this projectile has hit the ground. ]], }, }, }, cRankManager = { type = "class", description = [[ Manages the players' permissions. The players are assigned a single rank, which contains groups of permissions. The functions in this class query or modify these. All the functions are static, call them using the cRankManager:Function() convention. The players are identified by their UUID, to support player renaming. The rank also contains specific "mesage visuals" - bits that are used for formatting messages from the players. There's a message prefix, which is put in front of every message the player sends, and the message suffix that is appended to each message. There's also a PlayerNameColorCode, which holds the color that is used for the player's name in the messages. Each rank can contain any number of permission groups. These groups allow for an easier setup of the permissions - you can share groups among ranks, so the usual approach is to group similar permissions together and add that group to any rank that should use those permissions. Permissions are added to individual groups. Each group can support unlimited permissions. Note that adding a permission to a group will make the permission available to all the ranks that contain that permission group. One rank is reserved as the Default rank. All players that don't have an explicit rank assigned to them will behave as if assigned to this rank. The default rank can be changed to any other rank at any time. Note that the default rank cannot be removed from the RankManager - RemoveRank() will change the default rank to the replacement rank, if specified, and fail if no replacement rank is specified. Renaming the default rank using RenameRank() will change the default rank to the new name. ]], childs = { ["AddGroup"] = { type = "method", description = [[Adds the group of the specified name. Logs a warning and does nothing if the group already exists. ]], }, ["AddGroupToRank"] = { type = "method", description = [[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"] = { type = "method", description = [[Adds the specified permission to the specified group. Returns true on success, false on failure - if the group name is not found. ]], }, ["AddRank"] = { type = "method", description = [[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. ]], }, ["AddRestrictionToGroup"] = { type = "method", }, ["ClearPlayerRanks"] = { type = "method", description = [[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"] = { type = "method", description = [[Returns an array-table containing the names of all the groups that are known to the manager. ]], }, ["GetAllPermissions"] = { type = "method", description = [[Returns an array-table containing all the permissions that are known to the manager. ]], }, ["GetAllPermissionsRestrictions"] = { type = "method", }, ["GetAllPlayerUUIDs"] = { type = "method", description = [[Returns the short uuids of all players stored in the rank DB, sorted by the players' names (case insensitive). ]], }, ["GetAllRanks"] = { type = "method", description = [[Returns an array-table containing the names of all the ranks that are known to the manager. ]], }, ["GetAllRestrictions"] = { type = "method", }, ["GetDefaultRank"] = { type = "method", description = [[Returns the name of the default rank. ]], }, ["GetGroupPermissions"] = { type = "method", description = [[Returns an array-table containing the permissions that the specified group contains. ]], }, ["GetGroupRestrictions"] = { type = "method", }, ["GetPlayerGroups"] = { type = "method", description = [[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"] = { type = "method", description = [[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. ]], }, ["GetPlayerName"] = { type = "method", description = [[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. ]], }, ["GetPlayerPermissions"] = { type = "method", description = [[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"] = { type = "method", description = [[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. ]], }, ["GetRankGroups"] = { type = "method", description = [[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"] = { type = "method", description = [[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. ]], }, ["GetRankRestrictions"] = { type = "method", }, ["GetRankVisuals"] = { type = "method", description = [[Returns the message visuals for the specified rank. Returns no value if the specified rank does not exist. ]], }, ["GroupExists"] = { type = "method", description = [[Returns true iff the specified group exists. ]], }, ["IsGroupInRank"] = { type = "method", description = [[Returns true iff the specified group is assigned to the specified rank. ]], }, ["IsPermissionInGroup"] = { type = "method", description = [[Returns true iff the specified permission is assigned to the specified group. ]], }, ["IsPlayerRankSet"] = { type = "method", description = [[Returns true iff the specified player has a rank assigned to them. ]], }, ["IsRestrictionInGroup"] = { type = "method", }, ["RankExists"] = { type = "method", description = [[Returns true iff the specified rank exists. ]], }, ["RemoveGroup"] = { type = "method", description = [[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"] = { type = "method", description = [[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"] = { type = "method", description = [[Removes the specified permission from the specified group. Logs an info message and does nothing if the group doesn't exist. ]], }, ["RemovePlayerRank"] = { type = "method", description = [[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"] = { type = "method", description = [[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. ]], }, ["RemoveRestrictionFromGroup"] = { type = "method", }, ["RenameGroup"] = { type = "method", description = [[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"] = { type = "method", description = [[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"] = { type = "method", description = [[Sets the specified rank as the default rank. Returns true on success, false on failure (rank doesn't exist). ]], }, ["SetPlayerRank"] = { type = "method", description = [[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"] = { type = "method", description = [[Updates the rank's message visuals. Logs an info message and does nothing if rank not found. ]], }, }, }, cRoot = { type = "class", description = [[ This class represents the root of MCServer's object hierarchy. There is always only one cRoot object. It manages and allows querying all the other objects, such as {{cServer}}, {{cPluginManager}}, individual {{cWorld|worlds}} etc. To get the singleton instance of this object, you call the cRoot:Get() function. Then you can call the individual functions on this object. Note that some of the functions are static and don't need the instance, they are to be called directly on the cRoot class, such as cRoot:GetPhysicalRAMUsage() ]], childs = { ["BroadcastChat"] = { type = "method", description = [[Broadcasts a message to all players, with its message type set to MessageType (default: mtCustom). ]], }, ["BroadcastChat"] = { type = "method", description = [[Broadcasts a {{cCompositeChat|composite chat message} to all players. ]], }, ["BroadcastChatDeath"] = { type = "method", description = [[Broadcasts the specified message to all players, with its message type set to mtDeath. Use for when a player has died. ]], }, ["BroadcastChatFailure"] = { type = "method", description = [[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"] = { type = "method", description = [[Broadcasts the specified message to all players, with its message type set to mtFatal. Use for a plugin that crashed, or similar. ]], }, ["BroadcastChatInfo"] = { type = "method", description = [[Broadcasts the specified message to all players, with its message type set to mtInfo. Use for informational messages, such as command usage. ]], }, ["BroadcastChatJoin"] = { type = "method", description = [[Broadcasts the specified message to all players, with its message type set to mtJoin. Use for players joining the server. ]], }, ["BroadcastChatLeave"] = { type = "method", description = [[Broadcasts the specified message to all players, with its message type set to mtLeave. Use for players leaving the server. ]], }, ["BroadcastChatSuccess"] = { type = "method", description = [[Broadcasts the specified message to all players, with its message type set to mtSuccess. Use for success messages. ]], }, ["BroadcastChatWarning"] = { type = "method", description = [[Broadcasts the specified message to all players, with its message type set to mtWarning. Use for concerning events, such as plugin reload etc. ]], }, ["CreateAndInitializeWorld"] = { type = "method", description = [[Creates a new world and initializes it. If there is a world whith the same name it returns nil.

NOTEThis function is currently unsafe, do not use! ]], }, ["DoWithPlayerByUUID"] = { type = "method", description = [[If there is the player with the uuid, calls the CallbackFunction with the {{cPlayer}} parameter representing the player. The CallbackFunction has the following signature:
function Callback({{cPlayer|Player}})
The function returns false if the player was not found, or whatever bool value the callback returned if the player was found. ]], }, ["FindAndDoWithPlayer"] = { type = "method", description = [[Calls the given callback function for the player with the name best matching the name string provided.
This function is case-insensitive and will match partial names.
Returns false if player not found or there is ambiguity, true otherwise. The CallbackFunction has the following signature:
function Callback({{cPlayer|Player}})
]], }, ["ForEachPlayer"] = { type = "method", description = [[Calls the given callback function for each player. The callback function has the following signature:
function Callback({{cPlayer|cPlayer}})
]], }, ["ForEachWorld"] = { type = "method", description = [[Calls the given callback function for each world. The callback function has the following signature:
function Callback({{cWorld|cWorld}})
]], }, ["Get"] = { type = "method", description = [[(STATIC)This function returns the cRoot object. ]], }, ["GetCraftingRecipes"] = { type = "method", description = [[Returns the CraftingRecipes object ]], }, ["GetDefaultWorld"] = { type = "method", description = [[Returns the world object from the default world. ]], }, ["GetFurnaceFuelBurnTime"] = { type = "method", description = [[(STATIC) Returns the number of ticks for how long the item would fuel a furnace. Returns zero if not a fuel. ]], }, ["GetFurnaceRecipe"] = { type = "method", description = [[(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 MCServer supports smelting M items into N items and different smelting rates). If no recipe is found, returns no value. ]], }, ["GetPhysicalRAMUsage"] = { type = "method", description = [[Returns the amount of physical RAM that the entire MCServer process is using, in KiB. Negative if the OS doesn't support this query. ]], }, ["GetPluginManager"] = { type = "method", description = [[Returns the cPluginManager object. ]], }, ["GetProtocolVersionTextFromInt"] = { type = "method", description = [[Returns the Minecraft version from the given Protocol. If there is no version found, it returns 'Unknown protocol(Parameter)' ]], }, ["GetServer"] = { type = "method", description = [[Returns the cServer object. ]], }, ["GetTotalChunkCount"] = { type = "method", description = [[Returns the amount of loaded chunks. ]], }, ["GetVirtualRAMUsage"] = { type = "method", description = [[Returns the amount of virtual RAM that the entire MCServer process is using, in KiB. Negative if the OS doesn't support this query. ]], }, ["GetWebAdmin"] = { type = "method", description = [[Returns the cWebAdmin object. ]], }, ["GetWorld"] = { type = "method", description = [[Returns the cWorld object of the given world. It returns nil if there is no world with the given name. ]], }, ["QueueExecuteConsoleCommand"] = { type = "method", description = [[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"] = { type = "method", description = [[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. ]], }, }, }, cScoreboard = { type = "class", description = [[ This class manages the objectives and teams of a single world. ]], childs = { ["AddPlayerScore"] = { type = "method", description = [[Adds a value to all player scores of the specified objective type. ]], }, ["ForEachObjective"] = { type = "method", description = [[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:
function Callback({{cObjective|Objective}})
The callback should return false or no value to continue with the next objective, or true to abort the enumeration. ]], }, ["ForEachTeam"] = { type = "method", description = [[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:
function Callback({{cObjective|Objective}})
The callback should return false or no value to continue with the next team, or true to abort the enumeration. ]], }, ["GetNumObjectives"] = { type = "method", description = [[Returns the nuber of registered objectives. ]], }, ["GetNumTeams"] = { type = "method", description = [[Returns the number of registered teams. ]], }, ["GetObjective"] = { type = "method", description = [[Returns the objective with the specified name. ]], }, ["GetObjectiveIn"] = { type = "method", description = [[Returns the objective in the specified display slot. Can be nil. ]], }, ["GetTeam"] = { type = "method", description = [[Returns the team with the specified name. ]], }, ["RegisterObjective"] = { type = "method", description = [[Registers a new scoreboard objective. Returns the {{cObjective}} instance, nil on error. ]], }, ["RegisterTeam"] = { type = "method", description = [[Registers a new team. Returns the {{cTeam}} instance, nil on error. ]], }, ["RemoveObjective"] = { type = "method", description = [[Removes the objective with the specified name. Returns true if operation was successful. ]], }, ["RemoveTeam"] = { type = "method", description = [[Removes the team with the specified name. Returns true if operation was successful. ]], }, ["SetDisplay"] = { type = "method", description = [[Updates the currently displayed objective. ]], }, ["dsCount"] = { type = "value", }, ["dsList"] = { type = "value", }, ["dsName"] = { type = "value", }, ["dsSidebar"] = { type = "value", }, }, }, cServer = { type = "class", description = [[ This class manages all the client connections internally. In the API layer, it allows to get and set the general properties of the server, such as the description and max players. It used to support broadcasting chat messages to all players, this functionality has been moved to {{cRoot}}:BroadcastChat(). ]], childs = { ["DoesAllowMultiLogin"] = { type = "method", }, ["GetDescription"] = { type = "method", description = [[Returns the server description set in the settings.ini. ]], }, ["GetMaxPlayers"] = { type = "method", description = [[Returns the max amount of players who can join the server. ]], }, ["GetNumPlayers"] = { type = "method", description = [[Returns the amount of players online. ]], }, ["GetServerID"] = { type = "method", description = [[Returns the ID of the server? ]], }, ["IsHardcore"] = { type = "method", description = [[Returns true if the server is hardcore (players get banned on death). ]], }, ["IsPlayerInQueue"] = { type = "method", }, ["SetMaxPlayers"] = { type = "method", description = [[Sets the max amount of players who can join. ]], }, ["ShouldAuthenticate"] = { type = "method", description = [[Returns true iff the server is set to authenticate players ("online mode"). ]], }, }, }, cServerHandle = { type = "class", description = [[ This class provides an interface for TCP sockets listening for a connection. In order to listen, the plugin needs to use the {{cNetwork}}:Listen() function to create the listening socket. Note that when Lua garbage-collects this class, the listening socket is closed. Therefore the plugin should keep it referenced in a global variable for as long as it wants the server running. ]], childs = { ["Close"] = { type = "method", description = [[Closes the listening socket. No more connections will be accepted, and all current connections will be closed. ]], }, ["IsListening"] = { type = "method", description = [[Returns true if the socket is listening. ]], }, }, }, cSignEntity = { type = "class", description = [[ A sign entity represents a sign in the world. This class is only used when generating chunks, so that the plugins may generate signs within new chunks. See the code example in {{cChunkDesc}}. ]], childs = { ["GetLine"] = { type = "method", description = [[Returns the specified line. LineIndex is expected between 0 and 3. Returns empty string and logs to server console when LineIndex is invalid. ]], }, ["SetLine"] = { type = "method", description = [[Sets the specified line. LineIndex is expected between 0 and 3. Logs to server console when LineIndex is invalid. ]], }, ["SetLines"] = { type = "method", description = [[Sets all the sign's lines at once. ]], }, }, }, cSplashPotionEntity = { type = "class", description = [[ Represents a thrown splash potion. ]], childs = { ["GetEntityEffect"] = { type = "method", description = [[Returns the entity effect in this potion ]], }, ["GetEntityEffectType"] = { type = "method", description = [[Returns the effect type of this potion ]], }, ["GetPotionColor"] = { type = "method", description = [[Returns the color index of the particles emitted by this potion ]], }, ["SetEntityEffect"] = { type = "method", description = [[Sets the entity effect for this potion ]], }, ["SetEntityEffectType"] = { type = "method", description = [[Sets the effect type of this potion ]], }, ["SetPotionColor"] = { type = "method", description = [[Sets the color index of the particles for this potion ]], }, }, }, cStatManager = { type = "class", description = [[ ]], childs = { ["AddValue"] = { type = "method", }, ["GetValue"] = { type = "method", }, ["SetValue"] = { type = "method", }, ["Reset"] = { type = "method", }, }, }, cStringCompression = { type = "class", description = [[ Provides functions to compress or decompress string All functions in this class are static, so they should be called in the dot convention:
local CompressedString = cStringCompression.CompressStringGZIP("DataToCompress")
]], childs = { ["CompressStringGZIP"] = { type = "method", description = [[Compress a string using GZIP ]], }, ["CompressStringZLIB"] = { type = "method", description = [[Compresses a string using ZLIB. Factor 0 is no compression and factor 9 is maximum compression ]], }, ["InflateString"] = { type = "method", description = [[Uncompresses a string using Inflate ]], }, ["UncompressStringGZIP"] = { type = "method", description = [[Uncompress a string using GZIP ]], }, ["UncompressStringZLIB"] = { type = "method", description = [[Uncompresses a string using ZLIB ]], }, }, }, cTCPLink = { type = "class", description = [[ This class wraps a single TCP connection, that has been established. Plugins can create these by calling {{cNetwork}}:Connect() to connect to a remote server, or by listening using {{cNetwork}}:Listen() and accepting incoming connections. The links are callback-based - when an event such as incoming data or remote disconnect happens on the link, a specific callback is called. See the additional information in {{cNetwork}} documentation for details. The link can also optionally perform TLS encryption. Plugins can use the StartTLSClient() function to start the TLS handshake as the client side. Since that call, the OnReceivedData() callback is overridden internally so that the data is first routed through the TLS decryptor, and the plugin's callback is only called for the decrypted data, once it starts arriving. The Send function changes its behavior so that the data written by the plugin is first encrypted and only then sent over the network. Note that calling Send() before the TLS handshake finishes is supported, but the data is queued internally and only sent once the TLS handshake is completed. ]], childs = { ["Close"] = { type = "method", description = [[Closes the link forcefully (TCP RST). There's no guarantee that the last sent data is even being delivered. See also the Shutdown() method. ]], }, ["GetLocalIP"] = { type = "method", description = [[Returns the IP address of the local endpoint of the TCP connection. ]], }, ["GetLocalPort"] = { type = "method", description = [[Returns the port of the local endpoint of the TCP connection. ]], }, ["GetRemoteIP"] = { type = "method", description = [[Returns the IP address of the remote endpoint of the TCP connection. ]], }, ["GetRemotePort"] = { type = "method", description = [[Returns the port of the remote endpoint of the TCP connection. ]], }, ["Send"] = { type = "method", description = [[Sends the data (raw string) to the remote peer. The data is sent asynchronously and there is no report on the success of the send operation, other than the connection being closed or reset by the underlying OS. ]], }, ["Shutdown"] = { type = "method", description = [[Shuts the socket down for sending data. Notifies the remote peer that there will be no more data coming from us (TCP FIN). The data that is in flight will still be delivered. The underlying socket will be closed when the remote end shuts down as well, or after a timeout. ]], }, ["StartTLSClient"] = { type = "method", description = [[Starts a TLS handshake on the link, as a client side of the TLS. The Own___ parameters specify the client certificate and its corresponding private key and password; all three parameters are optional and no client certificate is presented to the remote peer if they are not used or all empty. Once the TLS handshake is started by this call, all incoming data is first decrypted before being sent to the OnReceivedData callback, and all outgoing data is queued until the TLS handshake completes, and then sent encrypted over the link. ]], }, ["StartTLSServer"] = { type = "method", description = [[Starts a TLS handshake on the link, as a server side of the TLS. The plugin needs to specify the server certificate and its corresponding private key and password. The StartTLSData can contain data that the link has already reported as received but it should be used as part of the TLS handshake. Once the TLS handshake is started by this call, all incoming data is first decrypted before being sent to the OnReceivedData callback, and all outgoing data is queued until the TLS handshake completes, and then sent encrypted over the link. ]], }, }, }, cTeam = { type = "class", description = [[ This class manages a single player team. ]], childs = { ["AddPlayer"] = { type = "method", description = [[Adds a player to this team. Returns true if the operation was successful. ]], }, ["AllowsFriendlyFire"] = { type = "method", description = [[Returns whether team friendly fire is allowed. ]], }, ["CanSeeFriendlyInvisible"] = { type = "method", description = [[Returns whether players can see invisible teammates. ]], }, ["GetDisplayName"] = { type = "method", description = [[Returns the display name of the team. ]], }, ["GetName"] = { type = "method", description = [[Returns the internal name of the team. ]], }, ["GetNumPlayers"] = { type = "method", description = [[Returns the number of registered players. ]], }, ["GetPrefix"] = { type = "method", description = [[Returns the prefix prepended to the names of the members of this team. ]], }, ["GetSuffix"] = { type = "method", description = [[Returns the suffix appended to the names of the members of this team. ]], }, ["HasPlayer"] = { type = "method", description = [[Returns whether the specified player is a member of this team. ]], }, ["RemovePlayer"] = { type = "method", description = [[Removes the player with the specified name from this team. Returns true if the operation was successful. ]], }, ["Reset"] = { type = "method", description = [[Removes all players from this team. ]], }, ["SetCanSeeFriendlyInvisible"] = { type = "method", description = [[Set whether players can see invisible teammates. ]], }, ["SetDisplayName"] = { type = "method", description = [[Sets the display name of this team. (i.e. what will be shown to the players) ]], }, ["SetFriendlyFire"] = { type = "method", description = [[Sets whether team friendly fire is allowed. ]], }, ["SetPrefix"] = { type = "method", description = [[Sets the prefix prepended to the names of the members of this team. ]], }, ["SetSuffix"] = { type = "method", description = [[Sets the suffix appended to the names of the members of this team. ]], }, }, }, cThrownEggEntity = { type = "class", description = [[ Represents a thrown egg. ]], childs = { }, }, cThrownEnderPearlEntity = { type = "class", description = [[Represents a thrown ender pearl. ]], childs = { }, }, cThrownSnowballEntity = { type = "class", description = [[Represents a thrown snowball. ]], childs = { }, }, cTNTEntity = { type = "class", description = [[This class manages a TNT entity. ]], childs = { ["Explode"] = { type = "method", description = [[Explode the tnt. ]], }, ["GetFuseTicks"] = { type = "method", description = [[Returns the fuse ticks until the tnt will explode. ]], }, ["SetFuseTicks"] = { type = "method", description = [[Set the fuse ticks until the tnt will explode. ]], }, }, }, cTracer = { type = "class", description = [[ A cTracer object is used to trace lines in the world. One thing you can use the cTracer for, is tracing what block a player is looking at, but you can do more with it if you want. The cTracer is still a work in progress. See also the {{cLineBlockTracer}} class for an alternative approach using callbacks. ]], childs = { ["() (constructor)"] = { type = "method", }, ["Trace"] = { type = "method", }, }, }, cUDPEndpoint = { type = "class", description = [[ Represents a UDP socket that is listening for incoming datagrams on a UDP port and can send or broadcast datagrams to other peers on the network. Plugins can create an instance of the endpoint by calling {{cNetwork}}:CreateUDPEndpoint(). The endpoints are callback-based - when a datagram is read from the network, the OnRececeivedData() callback is called with details about the datagram. See the additional information in {{cNetwork}} documentation for details. Note that when Lua garbage-collects this class, the listening socket is closed. Therefore the plugin should keep this object referenced in a global variable for as long as it wants the endpoint open. ]], childs = { ["Close"] = { type = "method", description = [[Closes the UDP endpoint. No more datagrams will be reported through the callbacks, the UDP port will be closed. ]], }, ["EnableBroadcasts"] = { type = "method", description = [[Some OSes need this call before they allow UDP broadcasts on an endpoint. ]], }, ["GetPort"] = { type = "method", description = [[Returns the local port number of the UDP endpoint listening for incoming datagrams. Especially useful if the UDP endpoint was created with auto-assign port (0). ]], }, ["IsOpen"] = { type = "method", description = [[Returns true if the UDP endpoint is listening for incoming datagrams. ]], }, ["Send"] = { type = "method", description = [[Sends the specified raw data (string) to the specified remote host. The RemoteHost can be either a hostname or an IP address; if it is a hostname, the endpoint will queue a DNS lookup first, if it is an IP address, the send operation is executed immediately. Returns true if there was no immediate error, false on any failure. Note that the return value needn't represent whether the packet was actually sent, only if it was successfully queued. ]], }, }, }, cWebAdmin = { type = "class", description = [[ ]], childs = { ["GetBaseURL"] = { type = "method", }, ["GetDefaultPage"] = { type = "method", }, ["GetHTMLEscapedString"] = { type = "method", description = [[(STATIC) Gets the HTML-escaped representation of a requested string. This is useful for user input and game data that is not guaranteed to be escaped already. ]], }, ["GetIPv4Ports"] = { type = "method", }, ["GetIPv6Ports"] = { type = "method", }, ["GetPage"] = { type = "method", }, ["GetPlugins"] = { type = "method", }, ["GetPorts"] = { type = "method", }, ["GetURLEncodedString"] = { type = "method", }, }, }, cWebPlugin = { type = "class", description = [[ ]], childs = { ["GetTabNames"] = { type = "method", }, ["GetWebTitle"] = { type = "method", }, ["SafeString"] = { type = "method", }, }, }, cWindow = { type = "class", description = [[ This class is the common ancestor for all window classes used by MCServer. It is inherited by the {{cLuaWindow|cLuaWindow}} class that plugins use for opening custom windows. It is planned to be used for window-related hooks in the future. It implements the basic functionality of any window. Note that one cWindow object can be used for multiple players at the same time, and therefore the slot contents are player-specific (e. g. crafting grid, or player inventory). Thus the GetSlot() and SetSlot() functions need to have the {{cPlayer|cPlayer}} parameter that specifies the player for whom the contents are to be queried. Windows also have numeric properties, these are used to set the progressbars for furnaces or the XP costs for enchantment tables. ]], childs = { ["GetSlot"] = { type = "method", description = [[Returns the item at the specified slot for the specified player. Returns nil and logs to server console on error. ]], }, ["GetWindowID"] = { type = "method", description = [[Returns the ID of the window, as used by the network protocol ]], }, ["GetWindowTitle"] = { type = "method", description = [[Returns the window title that will be displayed to the player ]], }, ["GetWindowType"] = { type = "method", description = [[Returns the type of the window, one of the constants in the table above ]], }, ["GetWindowTypeName"] = { type = "method", }, ["IsSlotInPlayerHotbar"] = { type = "method", description = [[Returns true if the specified slot number is in the player hotbar ]], }, ["IsSlotInPlayerInventory"] = { type = "method", description = [[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"] = { type = "method", description = [[Returns true if the specified slot number is in the player's main inventory ]], }, ["SetProperty"] = { type = "method", description = [[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"] = { type = "method", description = [[Sets the contents of the specified slot for the specified player. Ignored if the slot number is invalid ]], }, ["SetWindowTitle"] = { type = "method", description = [[Sets the window title that will be displayed to the player ]], }, ["wtAnimalChest"] = { type = "value", }, ["wtAnvil"] = { type = "value", }, ["wtBeacon"] = { type = "value", }, ["wtBrewery"] = { type = "value", }, ["wtChest"] = { type = "value", }, ["wtDropSpenser"] = { type = "value", }, ["wtDropper"] = { type = "value", }, ["wtEnchantment"] = { type = "value", }, ["wtFurnace"] = { type = "value", }, ["wtHopper"] = { type = "value", }, ["wtInventory"] = { type = "value", }, ["wtNPCTrade"] = { type = "value", }, ["wtWorkbench"] = { type = "value", }, }, }, cWitherSkullEntity = { type = "class", description = [[Represents a wither skull being shot. ]], childs = { }, }, cWorld = { type = "class", description = [[ cWorld is the game world. It is the hub of all the information managed by individual classes, providing convenient access to them. MCServer supports multiple worlds in any combination of world types. You can have two overworlds, three nethers etc. To enumerate all world the server provides, use the {{cRoot}}:ForEachWorld() function. The world data is held in individual chunks. Each chunk consists of 16 (x) * 16 (z) * 256 (y) blocks, each block is specified by its block type (8-bit) and block metadata (4-bit). Additionally, each block has two light values calculated - skylight (how much daylight it receives) and blocklight (how much light from light-emissive blocks it receives), both 4-bit. Each world runs several separate threads used for various housekeeping purposes, the most important of those is the Tick thread. This thread updates the game logic 20 times per second, and it is the thread where all the gameplay actions are evaluated. Liquid physics, entity interactions, player ovement etc., all are applied in this thread. Additional threads include the generation thread (generates new chunks as needed, storage thread (saves and loads chunk from the disk), lighting thread (updates block light values) and the chunksender thread (compresses chunks to send to the clients). The world provides access to all its {{cPlayer|players}}, {{cEntity|entities}} and {{cBlockEntity|block entities}}. Because of multithreading issues, individual objects cannot be retrieved for indefinite handling, but rather must be modified in callbacks, within which they are guaranteed to stay valid. Physics for individual blocks are handled by the simulators. These will fire in each tick for all blocks that have been scheduled for simulator update ("simulator wakeup"). The simulators include liquid physics, falling blocks, fire spreading and extinguishing and redstone. Game time is also handled by the world. It provides the time-of-day and the total world age. ]], childs = { ["AreCommandBlocksEnabled"] = { type = "method", description = [[Returns whether command blocks are enabled on the (entire) server ]], }, ["BroadcastBlockAction"] = { type = "method", description = [[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"] = { type = "method", description = [[Sends the Message to all players in this world, except the optional ExcludeClient. No formatting is done by the server. ]], }, ["BroadcastChatDeath"] = { type = "method", description = [[Prepends Gray [DEATH] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For when a player dies. ]], }, ["BroadcastChatFailure"] = { type = "method", description = [[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"] = { type = "method", description = [[Prepends Red [FATAL] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For a plugin that crashed, or similar. ]], }, ["BroadcastChatInfo"] = { type = "method", description = [[Prepends Yellow [INFO] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For informational messages, such as command usage. ]], }, ["BroadcastChatSuccess"] = { type = "method", description = [[Prepends Green [INFO] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For success messages. ]], }, ["BroadcastChatWarning"] = { type = "method", description = [[Prepends Rose [WARN] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For concerning events, such as plugin reload etc. ]], }, ["BroadcastEntityAnimation"] = { type = "method", description = [[Sends an animation of an entity to all clienthandles (except ExcludeClient if given) ]], }, ["BroadcastParticleEffect"] = { type = "method", description = [[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"] = { type = "method", description = [[Sends the specified sound effect to all players in this world, except the optional ExceptClient ]], }, ["BroadcastSoundParticleEffect"] = { type = "method", description = [[Sends the specified effect to all players in this world, except the optional ExceptClient ]], }, ["CastThunderbolt"] = { type = "method", description = [[Creates a thunderbolt at the specified coords ]], }, ["ChangeWeather"] = { type = "method", description = [[Forces the weather to change in the next game tick. Weather is changed according to the normal rules: wSunny <-> wRain <-> wStorm ]], }, ["ChunkStay"] = { type = "method", description = [[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:
function OnChunkAvailable(ChunkX, ChunkZ)
function OnAllChunksAvailable()
All return values from the callbacks are ignored. ]], }, ["CreateProjectile"] = { type = "method", description = [[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"] = { type = "method", description = [[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"] = { type = "method", description = [[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. ]], }, ["DoWithBeaconAt"] = { type = "method", description = [[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:
function Callback({{cBeaconEntity|BeaconEntity}})
The function returns false if there is no beacon, or if there is, it returns the bool value that the callback has returned. ]], }, ["DoWithBlockEntityAt"] = { type = "method", description = [[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:
function Callback({{cBlockEntity|BlockEntity}})
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. ]], }, ["DoWithChestAt"] = { type = "method", description = [[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:
function Callback({{cChestEntity|ChestEntity}})
The function returns false if there is no chest, or if there is, it returns the bool value that the callback has returned. ]], }, ["DoWithCommandBlockAt"] = { type = "method", description = [[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:
function Callback({{cCommandBlockEntity|CommandBlockEntity}})
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"] = { type = "method", description = [[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:
function Callback({{cDispenserEntity|DispenserEntity}})
The function returns false if there is no dispenser, or if there is, it returns the bool value that the callback has returned. ]], }, ["DoWithDropSpenserAt"] = { type = "method", description = [[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:
function Callback({{cDropSpenserEntity|DropSpenserEntity}})
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"] = { type = "method", description = [[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:
function Callback({{cDropperEntity|DropperEntity}})
The function returns false if there is no dropper, or if there is, it returns the bool value that the callback has returned. ]], }, ["DoWithEntityByID"] = { type = "method", description = [[If an entity with the specified ID exists, calls the callback with the {{cEntity}} parameter representing the entity. The CallbackFunction has the following signature:
function Callback({{cEntity|Entity}})
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"] = { type = "method", description = [[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:
function Callback({{cFlowerPotEntity|FlowerPotEntity}})
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"] = { type = "method", description = [[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:
function Callback({{cFurnaceEntity|FurnaceEntity}})
The function returns false if there is no furnace, or if there is, it returns the bool value that the callback has returned. ]], }, ["DoWithMobHeadAt"] = { type = "method", description = [[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:
function Callback({{cMobHeadEntity|MobHeadEntity}})
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"] = { type = "method", description = [[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:
function Callback({{cNoteEntity|NoteEntity}})
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"] = { type = "method", description = [[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:
function Callback({{cPlayer|Player}})
The function returns false if the player was not found, or whatever bool value the callback returned if the player was found. ]], }, ["DoWithPlayerByUUID"] = { type = "method", description = [[If there is the player with the uuid, calls the CallbackFunction with the {{cPlayer}} parameter representing the player. The CallbackFunction has the following signature:
function Callback({{cPlayer|Player}})
The function returns false if the player was not found, or whatever bool value the callback returned if the player was found. ]], }, ["FastSetBlock"] = { type = "method", description = [[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! ]], }, ["FastSetBlock"] = { type = "method", description = [[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"] = { type = "method", description = [[Calls the given callback function for the player with the name best matching the name string provided.
This function is case-insensitive and will match partial names.
Returns false if player not found or there is ambiguity, true otherwise. The CallbackFunction has the following signature:
function Callback({{cPlayer|Player}})
]], }, ["ForEachBlockEntityInChunk"] = { type = "method", description = [[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:
function Callback({{cBlockEntity|BlockEntity}})
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"] = { type = "method", description = [[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:
function Callback({{cChestEntity|ChestEntity}})
The callback should return false or no value to continue with the next chest, or true to abort the enumeration. ]], }, ["ForEachEntity"] = { type = "method", description = [[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:
function Callback({{cEntity|Entity}})
The callback should return false or no value to continue with the next entity, or true to abort the enumeration. ]], }, ["ForEachEntityInBox"] = { type = "method", description = [[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:
function Callback({{cEntity|Entity}})
The callback should return false or no value to continue with the next entity, or true to abort the enumeration. ]], }, ["ForEachEntityInChunk"] = { type = "method", description = [[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:
function Callback({{cEntity|Entity}})
The callback should return false or no value to continue with the next entity, or true to abort the enumeration. ]], }, ["ForEachFurnaceInChunk"] = { type = "method", description = [[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:
function Callback({{cFurnaceEntity|FurnaceEntity}})
The callback should return false or no value to continue with the next furnace, or true to abort the enumeration. ]], }, ["ForEachPlayer"] = { type = "method", description = [[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:
function Callback({{cPlayer|Player}})
The callback should return false or no value to continue with the next player, or true to abort the enumeration. ]], }, ["GenerateChunk"] = { type = "method", description = [[Queues the specified chunk in the chunk generator. Ignored if the chunk is already generated (use RegenerateChunk() to force chunk re-generation). ]], }, ["GetBiomeAt"] = { type = "method", description = [[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. ]], }, ["GetBlock"] = { type = "method", description = [[Returns the block type of the block at the specified coords, or 0 if the appropriate chunk is not loaded. ]], }, ["GetBlock"] = { type = "method", description = [[Returns the block type of the block at the specified coords, or 0 if the appropriate chunk is not loaded. ]], }, ["GetBlockBlockLight"] = { type = "method", description = [[Returns the amount of block light at the specified coords, or 0 if the appropriate chunk is not loaded. ]], }, ["GetBlockInfo"] = { type = "method", description = [[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. ]], }, ["GetBlockMeta"] = { type = "method", description = [[Returns the block metadata of the block at the specified coords, or 0 if the appropriate chunk is not loaded. ]], }, ["GetBlockMeta"] = { type = "method", description = [[Returns the block metadata of the block at the specified coords, or 0 if the appropriate chunk is not loaded. ]], }, ["GetBlockSkyLight"] = { type = "method", description = [[Returns the block skylight of the block at the specified coords, or 0 if the appropriate chunk is not loaded. ]], }, ["GetBlockTypeMeta"] = { type = "method", description = [[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"] = { type = "method", description = [[Returns the default weather interval for the specific weather type. Returns -1 for any unknown weather. ]], }, ["GetDimension"] = { type = "method", description = [[Returns the dimension of the world - dimOverworld, dimNether or dimEnd. ]], }, ["GetGameMode"] = { type = "method", description = [[Returns the gamemode of the world - gmSurvival, gmCreative or gmAdventure. ]], }, ["GetGeneratorQueueLength"] = { type = "method", description = [[Returns the number of chunks that are queued in the chunk generator. ]], }, ["GetHeight"] = { type = "method", description = [[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. WARNING: Do not use, Use TryGetHeight() instead for a non-waiting version, otherwise you run the risk of a deadlock! ]], }, ["GetIniFileName"] = { type = "method", description = [[Returns the name of the world.ini file that the world uses to store the information. ]], }, ["GetLightingQueueLength"] = { type = "method", description = [[Returns the number of chunks in the lighting thread's queue. ]], }, ["GetLinkedEndWorldName"] = { type = "method", description = [[Returns the name of the end world this world is linked to. ]], }, ["GetLinkedNetherWorldName"] = { type = "method", description = [[Returns the name of the Netherworld linked to this world. ]], }, ["GetLinkedOverworldName"] = { type = "method", description = [[Returns the name of the world this world is linked to. ]], }, ["GetMapManager"] = { type = "method", description = [[Returns the {{cMapManager|MapManager}} object used by this world. ]], }, ["GetMaxCactusHeight"] = { type = "method", description = [[Returns the configured maximum height to which cacti will grow naturally. ]], }, ["GetMaxSugarcaneHeight"] = { type = "method", description = [[Returns the configured maximum height to which sugarcane will grow naturally. ]], }, ["GetMaxViewDistance"] = { type = "method", description = [[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. ]], }, ["GetName"] = { type = "method", description = [[Returns the name of the world, as specified in the settings.ini file. ]], }, ["GetNumChunks"] = { type = "method", description = [[Returns the number of chunks currently loaded. ]], }, ["GetScoreBoard"] = { type = "method", description = [[Returns the {{cScoreBoard|ScoreBoard}} object used by this world. ]], }, ["GetSignLines"] = { type = "method", description = [[Returns true and the lines of a sign at the specified coords, or false if there is no sign at the coords. ]], }, ["GetSpawnX"] = { type = "method", description = [[Returns the X coord of the default spawn ]], }, ["GetSpawnY"] = { type = "method", description = [[Returns the Y coord of the default spawn ]], }, ["GetSpawnZ"] = { type = "method", description = [[Returns the Z coord of the default spawn ]], }, ["GetStorageLoadQueueLength"] = { type = "method", description = [[Returns the number of chunks queued up for loading ]], }, ["GetStorageSaveQueueLength"] = { type = "method", description = [[Returns the number of chunks queued up for saving ]], }, ["GetTNTShrapnelLevel"] = { type = "method", description = [[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. ]], }, ["GetTicksUntilWeatherChange"] = { type = "method", description = [[Returns the number of ticks that will pass before the weather is changed ]], }, ["GetTimeOfDay"] = { type = "method", description = [[Returns the number of ticks that have passed from the sunrise, 0 .. 24000. ]], }, ["GetWeather"] = { type = "method", description = [[Returns the current weather in the world (wSunny, wRain, wStorm). To check for weather, use IsWeatherXXX() functions instead. ]], }, ["GetWorldAge"] = { type = "method", description = [[Returns the total age of the world, in ticks. The age always grows, cannot be set by plugins and is unrelated to TimeOfDay. ]], }, ["GrowCactus"] = { type = "method", description = [[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"] = { type = "method", description = [[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"] = { type = "method", description = [[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"] = { type = "method", description = [[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"] = { type = "method", description = [[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"] = { type = "method", description = [[Grows a tree based at the specified coords. The tree type is picked from types available for the biome at those coords. ]], }, ["GrowTreeFromSapling"] = { type = "method", description = [[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"] = { type = "method", description = [[Returns true if the specified block has a water block right next to it (on the X/Z axes) ]], }, ["IsDaylightCycleEnabled"] = { type = "method", description = [[Returns true if the daylight cycle is enabled. ]], }, ["IsDeepSnowEnabled"] = { type = "method", description = [[Returns whether the configuration has DeepSnow enabled. ]], }, ["IsGameModeAdventure"] = { type = "method", description = [[Returns true if the current gamemode is gmAdventure. ]], }, ["IsGameModeCreative"] = { type = "method", description = [[Returns true if the current gamemode is gmCreative. ]], }, ["IsGameModeSpectator"] = { type = "method", description = [[Returns true if the current gamemode is gmSpectator. ]], }, ["IsGameModeSurvival"] = { type = "method", description = [[Returns true if the current gamemode is gmSurvival. ]], }, ["IsPVPEnabled"] = { type = "method", description = [[Returns whether PVP is enabled in the world settings. ]], }, ["IsTrapdoorOpen"] = { type = "method", description = [[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. ]], }, ["IsWeatherRain"] = { type = "method", description = [[Returns true if the current world is raining. ]], }, ["IsWeatherRainAt"] = { type = "method", description = [[Returns true if the specified location is raining (takes into account biomes). ]], }, ["IsWeatherStorm"] = { type = "method", description = [[Returns true if the current world is stormy. ]], }, ["IsWeatherStormAt"] = { type = "method", description = [[Returns true if the specified location is stormy (takes into account biomes). ]], }, ["IsWeatherSunny"] = { type = "method", description = [[Returns true if the current weather is sunny. ]], }, ["IsWeatherSunnyAt"] = { type = "method", description = [[Returns true if the current weather is sunny at the specified location (takes into account biomes). ]], }, ["IsWeatherWet"] = { type = "method", description = [[Returns true if the current world has any precipitation (rain or storm). ]], }, ["IsWeatherWetAt"] = { type = "method", description = [[Returns true if the specified location has any precipitation (rain or storm) (takes into account biomes). ]], }, ["PrepareChunk"] = { type = "method", description = [[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:
function Callback(ChunkX, ChunkZ)
]], }, ["QueueBlockForTick"] = { type = "method", description = [[Queues the specified block to be ticked after the specified number of gameticks. ]], }, ["QueueSaveAllChunks"] = { type = "method", description = [[Queues all chunks to be saved in the world storage thread ]], }, ["QueueSetBlock"] = { type = "method", description = [[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"] = { type = "method", description = [[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
function()
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 MCServer objects, such as entities, across from the caller to the task handler function; store the EntityID instead. ]], }, ["QueueUnloadUnusedChunks"] = { type = "method", description = [[Queues a cTask that unloads chunks that are no longer needed and are saved. ]], }, ["RegenerateChunk"] = { type = "method", description = [[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"] = { type = "method", description = [[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
function({{cWorld|World}})
All return values from the function are ignored. Note that it is unsafe to store references to MCServer objects, such as entities, across from the caller to the task handler function; store the EntityID instead. ]], }, ["SendBlockTo"] = { type = "method", description = [[Sends the block at the specified coords to the specified player's client, as an UpdateBlock packet. ]], }, ["SetAreaBiome"] = { type = "method", description = [[Sets the biome in the rectangular area specified. Returns true if successful, false if any of the chunks were unloaded. ]], }, ["SetAreaBiome"] = { type = "method", description = [[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"] = { type = "method", description = [[Sets the biome at the specified block coords. Returns true if successful, false otherwise. ]], }, ["SetBlock"] = { type = "method", description = [[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"] = { type = "method", description = [[Sets the meta for the block at the specified coords. ]], }, ["SetBlockMeta"] = { type = "method", description = [[Sets the meta for the block at the specified coords. ]], }, ["SetChunkAlwaysTicked"] = { type = "method", description = [[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"] = { type = "method", description = [[Sets the command to be executed in a command block at the specified coordinates. Returns if command was changed. ]], }, ["SetCommandBlocksEnabled"] = { type = "method", description = [[Sets whether command blocks should be enabled on the (entire) server. ]], }, ["SetDaylightCycleEnabled"] = { type = "method", description = [[Starts or stops the daylight cycle. ]], }, ["SetLinkedEndWorldName"] = { type = "method", description = [[Sets the name of the world that the end portal should link to. ]], }, ["SetLinkedNetherWorldName"] = { type = "method", description = [[Sets the name of the world that the nether portal should link to. ]], }, ["SetLinkedOverworldName"] = { type = "method", description = [[Sets the name of the world that the nether portal should link to? ]], }, ["SetMaxViewDistance"] = { type = "method", description = [[Sets the maximum viewdistance of the players in the world. ]], }, ["SetNextBlockTick"] = { type = "method", description = [[Sets the blockticking to start at the specified block in the next tick. ]], }, ["SetShouldUseChatPrefixes"] = { type = "method", description = [[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"] = { type = "method", description = [[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. ]], }, ["SetTNTShrapnelLevel"] = { type = "method", description = [[Sets the Shrampel level of the world. ]], }, ["SetTicksUntilWeatherChange"] = { type = "method", description = [[Sets the number of ticks after which the weather will be changed. ]], }, ["SetTimeOfDay"] = { type = "method", description = [[Sets the time of day, expressed as number of ticks past sunrise, in the range 0 .. 24000. ]], }, ["SetTrapdoorOpen"] = { type = "method", description = [[Opens or closes a trapdoor at the specific coordinates. ]], }, ["SetWeather"] = { type = "method", description = [[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"] = { type = "method", description = [[Returns true if the server should broadcast achievement messages in this world. ]], }, ["ShouldBroadcastDeathMessages"] = { type = "method", description = [[Returns true if the server should broadcast death messages in this world. ]], }, ["ShouldLavaSpawnFire"] = { type = "method", description = [[Returns true if the world is configured to spawn fires near lava (world.ini: [Physics].ShouldLavaSpawnFire value) ]], }, ["ShouldUseChatPrefixes"] = { type = "method", description = [[Returns whether coloured chat prefixes are prepended to chat messages or the entire message is simply coloured. ]], }, ["SpawnExperienceOrb"] = { type = "method", description = [[Spawns an {{cExpOrb|experience orb}} at the specified coords, with the given reward ]], }, ["SpawnFallingBlock"] = { type = "method", description = [[Spawns an {{cFallingBlock|Falling Block}} entity at the specified coords with the given block type/meta ]], }, ["SpawnItemPickups"] = { type = "method", description = [[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. ]], }, ["SpawnItemPickups"] = { type = "method", description = [[Spawns the specified pickups at the position specified. All the pickups fly away from the spawn position using the specified speed. ]], }, ["SpawnMinecart"] = { type = "method", description = [[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"] = { type = "method", description = [[Spawns the specified type of mob at the specified coords. Returns the EntityID of the creates entity, or -1 on failure. ]], }, ["SpawnPrimedTNT"] = { type = "method", description = [[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"] = { type = "method", description = [[Returns true and height of the highest non-air block if the chunk is loaded, or false otherwise. ]], }, ["UpdateSign"] = { type = "method", description = [[(DEPRECATED) Please use SetSignLines(). ]], }, ["UseBlockEntity"] = { type = "method", description = [[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. ]], }, ["VillagersShouldHarvestCrops"] = { type = "method", description = [[Returns true if villagers can harvest crops. ]], }, ["WakeUpSimulators"] = { type = "method", description = [[Wakes up the simulators for the specified block. ]], }, ["WakeUpSimulatorsInArea"] = { type = "method", description = [[Wakes up the simulators for all the blocks in the specified area (edges inclusive). ]], }, }, }, HTTPFormData = { type = "class", description = [[This class stores data for one form element for a {{HTTPRequest|HTTP request}}. ]], childs = { }, }, HTTPRequest = { type = "class", description = [[ This class encapsulates all the data that is sent to the WebAdmin through one HTTP request. Plugins receive this class as a parameter to the function handling the web requests, as registered in the {{cPluginLua}}:AddWebPage(). ]], childs = { ["FormData"] = { type = "value", }, ["Params"] = { type = "value", }, ["PostParams"] = { type = "value", }, }, }, HTTPTemplateRequest = { type = "class", description = [[ ]], childs = { }, }, ItemCategory = { type = "class", description = [[ This class contains static functions for determining item categories. All of the functions are called directly on the class table, unlike most other object, which require an instance first. ]], childs = { ["IsArmor"] = { type = "method", description = [[(STATIC) Returns true if the specified item type is any kind of an armor. ]], }, ["IsAxe"] = { type = "method", description = [[(STATIC) Returns true if the specified item type is any kind of an axe. ]], }, ["IsBoots"] = { type = "method", description = [[(STATIC) Returns true if the specified item type is any kind of boots. ]], }, ["IsChestPlate"] = { type = "method", description = [[(STATIC) Returns true if the specified item type is any kind of a chestplate. ]], }, ["IsHelmet"] = { type = "method", description = [[(STATIC) Returns true if the specified item type is any kind of a helmet. ]], }, ["IsHoe"] = { type = "method", description = [[(STATIC) Returns true if the specified item type is any kind of a hoe. ]], }, ["IsLeggings"] = { type = "method", description = [[(STATIC) Returns true if the specified item type is any kind of a leggings. ]], }, ["IsPickaxe"] = { type = "method", description = [[(STATIC) Returns true if the specified item type is any kind of a pickaxe. ]], }, ["IsShovel"] = { type = "method", description = [[(STATIC) Returns true if the specified item type is any kind of a shovel. ]], }, ["IsSword"] = { type = "method", description = [[(STATIC) Returns true if the specified item type is any kind of a sword. ]], }, ["IsTool"] = { type = "method", description = [[(STATIC) Returns true if the specified item type is any kind of a tool (axe, hoe, pickaxe, shovel or FIXME: sword) ]], }, }, }, lxp = { type = "class", description = [[ This class provides an interface to the XML parser, {{http://matthewwild.co.uk/projects/luaexpat/|LuaExpat}}. It provides a SAX interface with an incremental XML parser. With an event-based API like SAX the XML document can be fed to the parser in chunks, and the parsing begins as soon as the parser receives the first document chunk. LuaExpat reports parsing events (such as the start and end of elements) directly to the application through callbacks. The parsing of huge documents can benefit from this piecemeal operation. See the online {{http://matthewwild.co.uk/projects/luaexpat/manual.html#parser|LuaExpat documentation}} for details on how to work with this parser. The code examples below should provide some basic help, too. ]], childs = { ["new"] = { type = "method", description = [[Creates a new XML parser object, with the specified callbacks table and optional separator character. ]], }, ["_COPYRIGHT"] = { type = "value", }, ["_DESCRIPTION"] = { type = "value", }, ["_VERSION"] = { type = "value", }, }, }, sqlite3 = { type = "class", description = [[ ]], childs = { ["complete"] = { type = "method", description = [[Returns true if the string sql comprises one or more complete SQL statements and false otherwise. ]], }, ["open"] = { type = "method", description = [[ Opens (or creates if it does not exist) an SQLite database with name filename and returns its handle as userdata (the returned object should be used for all further method calls in connection with this specific database, see {{http://lua.sqlite.org/index.cgi/doc/tip/doc/lsqlite3.wiki#database_methods|Database methods}}). Example:
-- open the database:
myDB = sqlite3.open('MyDatabaseFile.sqlite3') -- do some database calls... -- Close the database:
myDB:close()
]], }, ["open_memory"] = { type = "method", description = [[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.) ]], }, ["version"] = { type = "method", description = [[Returns a string with SQLite version information, in the form 'x.y[.z]'. ]], }, ["ABORT"] = { type = "value", }, ["ALTER_TABLE"] = { type = "value", }, ["ANALYZE"] = { type = "value", }, ["ATTACH"] = { type = "value", }, ["BLOB"] = { type = "value", }, ["BUSY"] = { type = "value", }, ["CANTOPEN"] = { type = "value", }, ["CONSTRAINT"] = { type = "value", }, ["CORRUPT"] = { type = "value", }, ["CREATE_INDEX"] = { type = "value", }, ["CREATE_TABLE"] = { type = "value", }, ["CREATE_TEMP_INDEX"] = { type = "value", }, ["CREATE_TEMP_TABLE"] = { type = "value", }, ["CREATE_TEMP_TRIGGER"] = { type = "value", }, ["CREATE_TEMP_VIEW"] = { type = "value", }, ["CREATE_TRIGGER"] = { type = "value", }, ["CREATE_VIEW"] = { type = "value", }, ["CREATE_VTABLE"] = { type = "value", }, ["DELETE"] = { type = "value", }, ["DETACH"] = { type = "value", }, ["DONE"] = { type = "value", }, ["DROP_INDEX"] = { type = "value", }, ["DROP_TABLE"] = { type = "value", }, ["DROP_TEMP_INDEX"] = { type = "value", }, ["DROP_TEMP_TABLE"] = { type = "value", }, ["DROP_TEMP_TRIGGER"] = { type = "value", }, ["DROP_TEMP_VIEW"] = { type = "value", }, ["DROP_TRIGGER"] = { type = "value", }, ["DROP_VIEW"] = { type = "value", }, ["DROP_VTABLE"] = { type = "value", }, ["EMPTY"] = { type = "value", }, ["ERROR"] = { type = "value", }, ["FLOAT"] = { type = "value", }, ["FORMAT"] = { type = "value", }, ["FULL"] = { type = "value", }, ["FUNCTION"] = { type = "value", }, ["INSERT"] = { type = "value", }, ["INTEGER"] = { type = "value", }, ["INTERNAL"] = { type = "value", }, ["INTERRUPT"] = { type = "value", }, ["IOERR"] = { type = "value", }, ["LOCKED"] = { type = "value", }, ["MISMATCH"] = { type = "value", }, ["MISUSE"] = { type = "value", }, ["NOLFS"] = { type = "value", }, ["NOMEM"] = { type = "value", }, ["NOTADB"] = { type = "value", }, ["NOTFOUND"] = { type = "value", }, ["NULL"] = { type = "value", }, ["OK"] = { type = "value", }, ["PERM"] = { type = "value", }, ["PRAGMA"] = { type = "value", }, ["PROTOCOL"] = { type = "value", }, ["RANGE"] = { type = "value", }, ["READ"] = { type = "value", }, ["READONLY"] = { type = "value", }, ["REINDEX"] = { type = "value", }, ["ROW"] = { type = "value", }, ["SAVEPOINT"] = { type = "value", }, ["SCHEMA"] = { type = "value", }, ["SELECT"] = { type = "value", }, ["TEXT"] = { type = "value", }, ["TOOBIG"] = { type = "value", }, ["TRANSACTION"] = { type = "value", }, ["UPDATE"] = { type = "value", }, }, }, sWebAdminPage = { type = "class", description = [[ ]], childs = { }, }, TakeDamageInfo = { type = "class", description = [[ This class contains the amount of damage, and the entity that caused the damage. It is used in the {{OnTakeDamage|HOOK_TAKE_DAMAGE}} hook and in the {{cEntity}}'s TakeDamage() function. ]], childs = { }, }, tolua = { type = "class", description = [[ This class represents the tolua bridge between the Lua API and MCServer. It supports some low level operations and queries on the objects. See also the tolua++'s documentation at {{http://www.codenix.com/~tolua/tolua++.html#utilities}}. Normally you shouldn't use any of these functions except for type() ]], childs = { ["cast"] = { type = "method", description = [[Casts the object to the specified type.
Note: 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. ]], }, ["getpeer"] = { type = "method", }, ["inherit"] = { type = "method", }, ["releaseownership"] = { type = "method", }, ["setpeer"] = { type = "method", }, ["takeownership"] = { type = "method", }, ["type"] = { type = "method", description = [[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. ]], }, }, }, Vector3d = { type = "class", description = [[ A Vector3d object uses double precision floating point values to describe a point in 3D space. See also {{Vector3f}} for single-precision floating point 3D coords and {{Vector3i}} for integer 3D coords. ]], childs = { ["() (constructor)"] = { type = "method", description = [[Creates a new Vector3d object with all its coords set to 0. ]], }, ["() (constructor)"] = { type = "method", description = [[Creates a new Vector3d object with its coords set to the specified values. ]], }, ["() (constructor)"] = { type = "method", description = [[Creates a new Vector3d object by copying the coords from the given Vector3f. ]], }, ["operator *"] = { type = "method", description = [[Returns a new Vector3d with each coord multiplied. ]], }, ["operator +"] = { type = "method", description = [[Returns a new Vector3d containing the sum of this vector and the specified vector ]], }, ["operator -"] = { type = "method", description = [[Returns a new Vector3d containing the difference between this object and the specified vector. ]], }, ["operator /"] = { type = "method", description = [[Returns a new Vector3d with each coord divided by the specified number. ]], }, ["Cross"] = { type = "method", description = [[Returns a new Vector3d that is a {{http://en.wikipedia.org/wiki/Cross_product|cross product}} of this vector and the specified vector. ]], }, ["Dot"] = { type = "method", description = [[Returns the dot product of this vector and the specified vector. ]], }, ["Equals"] = { type = "method", description = [[Returns true if this vector is exactly equal to the specified vector. ]], }, ["EqualsEps"] = { type = "method", }, ["Floor"] = { type = "method", }, ["HasNonZeroLength"] = { type = "method", }, ["Length"] = { type = "method", description = [[Returns the (euclidean) length of the vector. ]], }, ["LineCoeffToXYPlane"] = { type = "method", description = [[Returns the coefficient for the line from the specified vector through this vector to reach the specified Z coord. The result satisfies the following equation: (this + Result * (Param - this)).z = Z. Returns the NO_INTERSECTION constant if there's no intersection. ]], }, ["LineCoeffToXZPlane"] = { type = "method", description = [[Returns the coefficient for the line from the specified vector through this vector to reach the specified Y coord. The result satisfies the following equation: (this + Result * (Param - this)).y = Y. Returns the NO_INTERSECTION constant if there's no intersection. ]], }, ["LineCoeffToYZPlane"] = { type = "method", description = [[Returns the coefficient for the line from the specified vector through this vector to reach the specified X coord. The result satisfies the following equation: (this + Result * (Param - this)).x = X. Returns the NO_INTERSECTION constant if there's no intersection. ]], }, ["Move"] = { type = "method", }, ["Normalize"] = { type = "method", description = [[Changes this vector so that it keeps current direction but is exactly 1 unit long. FIXME: Fails for a zero vector. ]], }, ["NormalizeCopy"] = { type = "method", description = [[Returns a new vector that has the same directino as this but is exactly 1 unit long. FIXME: Fails for a zero vector. ]], }, ["Set"] = { type = "method", description = [[Sets all the coords in this object. ]], }, ["SqrLength"] = { type = "method", description = [[Returns the (euclidean) length of this vector, squared. This operation is slightly less computationally expensive than Length(), while it conserves some properties of Length(), such as comparison. ]], }, ["TurnCCW"] = { type = "method", }, ["TurnCW"] = { type = "method", }, ["clamp"] = { type = "method", }, ["abs"] = { type = "method", }, ["EPS"] = { type = "value", }, ["NO_INTERSECTION"] = { type = "value", }, }, }, Vector3f = { type = "class", description = [[ A Vector3f object uses floating point values to describe a point in space. See also {{Vector3d}} for double-precision floating point 3D coords and {{Vector3i}} for integer 3D coords. ]], childs = { ["() (constructor)"] = { type = "method", description = [[Creates a new Vector3f object with zero coords ]], }, ["() (constructor)"] = { type = "method", description = [[Creates a new Vector3f object as a copy of the specified vector ]], }, ["() (constructor)"] = { type = "method", description = [[Creates a new Vector3f object with the specified coords ]], }, ["() (constructor)"] = { type = "method", description = [[Creates a new Vector3f object as a copy of the specified {{Vector3d}} ]], }, ["() (constructor)"] = { type = "method", description = [[Creates a new Vector3f object as a copy of the specified {{Vector3i}} ]], }, ["operator *"] = { type = "method", description = [[Returns a new Vector3f object that has each of its coords multiplied by the respective coord of the specified vector. ]], }, ["operator *"] = { type = "method", description = [[Returns a new Vector3f object that has each of its coords multiplied by the specified number ]], }, ["operator +"] = { type = "method", description = [[Returns a new Vector3f object that holds the vector sum of this vector and the specified vector. ]], }, ["operator -"] = { type = "method", description = [[Returns a new Vector3f object that holds the vector differrence between this vector and the specified vector. ]], }, ["operator /"] = { type = "method", }, ["Cross"] = { type = "method", description = [[Returns a new Vector3f object that holds the cross product of this vector and the specified vector. ]], }, ["Dot"] = { type = "method", description = [[Returns the dot product of this vector and the specified vector. ]], }, ["Equals"] = { type = "method", description = [[Returns true if the specified vector is exactly equal to this vector. ]], }, ["EqualsEps"] = { type = "method", }, ["Floor"] = { type = "method", }, ["HasNonZeroLength"] = { type = "method", }, ["Length"] = { type = "method", description = [[Returns the (euclidean) length of this vector ]], }, ["LineCoeffToXYPlane"] = { type = "method", }, ["LineCoeffToXZPlane"] = { type = "method", }, ["LineCoeffToYZPlane"] = { type = "method", }, ["Move"] = { type = "method", }, ["Normalize"] = { type = "method", description = [[Normalizes this vector (makes it 1 unit long while keeping the direction). FIXME: Fails for zero vectors. ]], }, ["NormalizeCopy"] = { type = "method", description = [[Returns a copy of this vector that is normalized (1 unit long while keeping the same direction). FIXME: Fails for zero vectors. ]], }, ["Set"] = { type = "method", description = [[Sets all the coords of the vector at once. ]], }, ["SqrLength"] = { type = "method", description = [[Returns the (euclidean) length of this vector, squared. This operation is slightly less computationally expensive than Length(), while it conserves some properties of Length(), such as comparison. ]], }, ["TurnCCW"] = { type = "method", }, ["TurnCW"] = { type = "method", }, ["abs"] = { type = "method", }, ["clamp"] = { type = "method", }, ["EPS"] = { type = "value", }, ["NO_INTERSECTION"] = { type = "value", }, }, }, Vector3i = { type = "class", description = [[ A Vector3i object uses integer values to describe a point in space. See also {{Vector3d}} for double-precision floating point 3D coords and {{Vector3f}} for single-precision floating point 3D coords. ]], childs = { ["() (constructor)"] = { type = "method", description = [[Creates a new Vector3i object with zero coords. ]], }, ["() (constructor)"] = { type = "method", description = [[Creates a new Vector3i object with the specified coords. ]], }, ["() (constructor)"] = { type = "method", description = [[Creates a new Vector3i object with coords copied and floor()-ed from the specified {{Vector3d}}. ]], }, ["operator *"] = { type = "method", }, ["operator +"] = { type = "method", }, ["operator -"] = { type = "method", }, ["operator /"] = { type = "method", }, ["Cross"] = { type = "method", }, ["Dot"] = { type = "method", }, ["Equals"] = { type = "method", description = [[Returns true if this vector is exactly the same as the specified vector. ]], }, ["EqualsEps"] = { type = "method", }, ["Floor"] = { type = "method", }, ["HasNonZeroLength"] = { type = "method", }, ["Length"] = { type = "method", description = [[Returns the (euclidean) length of this vector. ]], }, ["LineCoeffToXYPlane"] = { type = "method", }, ["LineCoeffToXZPlane"] = { type = "method", }, ["LineCoeffToYZPlane"] = { type = "method", }, ["Move"] = { type = "method", description = [[Moves the vector by the specified amount in each axis direction. ]], }, ["Normalize"] = { type = "method", }, ["NormalizeCopy"] = { type = "method", }, ["Set"] = { type = "method", description = [[Sets all the coords of the vector at once ]], }, ["SqrLength"] = { type = "method", description = [[Returns the (euclidean) length of this vector, squared. This operation is slightly less computationally expensive than Length(), while it conserves some properties of Length(), such as comparison. ]], }, ["TurnCCW"] = { type = "method", }, ["TurnCW"] = { type = "method", }, ["clamp"] = { type = "method", }, ["abs"] = { type = "method", }, ["EPS"] = { type = "value", }, ["NO_INTERSECTION"] = { type = "value", }, }, }, ["AddFaceDirection"] = { type = "method", description = [[Returns the coords of a block adjacent to the specified block through the specified {{Globals#BlockFaces|face}} ]], }, ["Base64Decode"] = { type = "method", }, ["Base64Encode"] = { type = "method", }, ["BiomeToString"] = { type = "method", }, ["BlockFaceToString"] = { type = "method", description = [[Returns the string representation of the {{Globals#BlockFaces|eBlockFace}} constant. Uses the axis-direction-based names, such as BLOCK_FACE_XP. ]], }, ["BlockStringToType"] = { type = "method", description = [[Returns the block type parsed from the given string ]], }, ["Clamp"] = { type = "method", description = [[Clamp the number to the specified range. ]], }, ["ClickActionToString"] = { type = "method", description = [[Returns a string description of the ClickAction enumerated value ]], }, ["DamageTypeToString"] = { type = "method", description = [[Converts the {{Globals#DamageType|DamageType}} enumerated value to a string representation ]], }, ["EscapeString"] = { type = "method", description = [[Returns a copy of the string with all quotes and backslashes escaped by a backslash ]], }, ["DimensionToString"] = { type = "method", }, ["GetChar"] = { type = "method", description = [[Returns one character from the string, specified by position ]], }, ["GetIniItemSet"] = { type = "method", description = [[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. ]], }, ["GetSnowStartHeight"] = { type = "method", }, ["GetTime"] = { type = "method", description = [[Returns the current OS time, as a unix time stamp (number of seconds since Jan 1, 1970) ]], }, ["IsBiomeCold"] = { type = "method", }, ["IsBiomeNoDownfall"] = { type = "method", description = [[Returns true if the biome is 'dry', that is, there is no precipitation during rains and storms. ]], }, ["IsBiomeOcean"] = { type = "method", }, ["IsBiomeVeryCold"] = { type = "method", }, ["IsValidBlock"] = { type = "method", description = [[Returns true if BlockType is a known block type ]], }, ["IsValidItem"] = { type = "method", description = [[Returns true if ItemType is a known item type ]], }, ["ItemToFullString"] = { type = "method", description = [[Returns the string representation of the item, in the format 'ItemTypeText:ItemDamage * Count' ]], }, ["ItemToString"] = { type = "method", description = [[Returns the string representation of the item type ]], }, ["ItemTypeToString"] = { type = "method", description = [[Returns the string representation of ItemType ]], }, ["LOG"] = { type = "method", description = [[Logs a text into the server console using 'normal' severity (gray text) ]], }, ["LOG"] = { type = "method", description = [[Logs the {{cCompositeChat}}'s human-readable text into the server console. The severity is converted from the CompositeChat's MessageType. ]], }, ["LOGERROR"] = { type = "method", description = [[Logs a text into the server console using 'error' severity (black text on red background) ]], }, ["LOGERROR"] = { type = "method", description = [[Logs the {{cCompositeChat}}'s human-readable text into the server console using 'error' severity (black text on red background) ]], }, ["LOGINFO"] = { type = "method", description = [[Logs a text into the server console using 'info' severity (yellow text) ]], }, ["LOGINFO"] = { type = "method", description = [[Logs the {{cCompositeChat}}'s human-readable text into the server console using 'info' severity (yellow text) ]], }, ["LOGWARN"] = { type = "method", description = [[Logs a text into the server console using 'warning' severity (red text); OBSOLETE, use LOGWARNING() instead ]], }, ["LOGWARN"] = { type = "method", description = [[Logs the {{cCompositeChat}}'s human-readable text into the server console using 'warning' severity (red text); OBSOLETE, use LOGWARNING() instead ]], }, ["LOGWARNING"] = { type = "method", description = [[Logs a text into the server console using 'warning' severity (red text) ]], }, ["LOGWARNING"] = { type = "method", description = [[Logs the {{cCompositeChat}}'s human-readable text into the server console using 'warning' severity (red text) ]], }, ["MirrorBlockFaceY"] = { type = "method", description = [[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). ]], }, ["NoCaseCompare"] = { type = "method", description = [[Case-insensitive string comparison; returns 0 if the strings are the same ]], }, ["NormalizeAngleDegrees"] = { type = "method", description = [[Returns the angle, wrapped into the [-180, +180) range. ]], }, ["ReplaceString"] = { type = "method", description = [[Replaces *each* occurence of to-be-replaced-string in full-string with to-replace-string ]], }, ["ReverseBlockFace"] = { type = "method", }, ["RotateBlockFaceCCW"] = { type = "method", description = [[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"] = { type = "method", description = [[Returns the {{Globals#BlockFaces|eBlockFace}} that corresponds to the given {{Globals#BlockFaces|eBlockFace}} after rotating it around the Y axis 90 degrees clockwise. ]], }, ["StringSplit"] = { type = "method", description = [[Seperates string into multiple by splitting every time any of the characters in SeperatorsString is encountered. ]], }, ["StringSplitAndTrim"] = { type = "method", description = [[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"] = { type = "method", description = [[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"] = { type = "method", description = [[Converts a string representation to a {{Globals#BiomeTypes|BiomeType}} enumerated value ]], }, ["StringToDamageType"] = { type = "method", description = [[Converts a string representation to a {{Globals#DamageType|DamageType}} enumerated value. ]], }, ["StringToDimension"] = { type = "method", description = [[Converts a string representation to a {{Globals#WorldDimension|Dimension}} enumerated value ]], }, ["StringToItem"] = { type = "method", description = [[Parses the given string and sets the item; returns true if successful ]], }, ["StringToMobType"] = { type = "method", description = [[DEPRECATED! Please use cMonster:StringToMobType(). Converts a string representation to a {{Globals#MobType|MobType}} enumerated value ]], }, ["StripColorCodes"] = { type = "method", description = [[Removes all control codes used by MC for colors and styles ]], }, ["TrimString"] = { type = "method", description = [[Trims whitespace at both ends of the string ]], }, ["dofile"] = { type = "method", }, ["error"] = { type = "method", }, ["gcinfo"] = { type = "method", }, ["getfenv"] = { type = "method", }, ["getmetatable"] = { type = "method", }, ["ipairs"] = { type = "method", }, ["load"] = { type = "method", }, ["loadfile"] = { type = "method", }, ["loadstring"] = { type = "method", }, ["md5"] = { type = "method", description = [[OBSOLETE, use the {{cCryptoHash}} functions instead.
Converts a string to a raw binary md5 hash. ]], }, ["module"] = { type = "method", }, ["next"] = { type = "method", }, ["pairs"] = { type = "method", }, ["pcall"] = { type = "method", }, ["rawget"] = { type = "method", }, ["print"] = { type = "method", }, ["rawequal"] = { type = "method", }, ["rawset"] = { type = "method", }, ["require"] = { type = "method", }, ["select"] = { type = "method", }, ["setmetatable"] = { type = "method", }, ["setfenv"] = { type = "method", }, ["tonumber"] = { type = "method", }, ["tostring"] = { type = "method", }, ["type"] = { type = "method", }, ["unpack"] = { type = "method", }, ["DIG_STATUS_CANCELLED"] = { type = "value", }, ["DIG_STATUS_DROP_HELD"] = { type = "value", }, ["DIG_STATUS_DROP_STACK"] = { type = "value", }, ["DIG_STATUS_FINISHED"] = { type = "value", }, ["DIG_STATUS_SHOOT_EAT"] = { type = "value", }, ["DIG_STATUS_STARTED"] = { type = "value", }, ["MAX_EXPERIENCE_ORB_SIZE"] = { type = "value", }, ["SKULL_ROTATION_EAST"] = { type = "value", }, ["SKULL_ROTATION_EAST_NORTH_EAST"] = { type = "value", }, ["SKULL_ROTATION_EAST_SOUTH_EAST"] = { type = "value", }, ["SKULL_ROTATION_NORTH"] = { type = "value", }, ["SKULL_ROTATION_NORTH_EAST"] = { type = "value", }, ["SKULL_ROTATION_NORTH_NORTH_EAST"] = { type = "value", }, ["SKULL_ROTATION_NORTH_NORTH_WEST"] = { type = "value", }, ["SKULL_ROTATION_NORTH_WEST"] = { type = "value", }, ["SKULL_ROTATION_SOUTH"] = { type = "value", }, ["SKULL_ROTATION_SOUTH_EAST"] = { type = "value", }, ["SKULL_ROTATION_SOUTH_SOUTH_EAST"] = { type = "value", }, ["SKULL_ROTATION_SOUTH_SOUTH_WEST"] = { type = "value", }, ["SKULL_ROTATION_SOUTH_WEST"] = { type = "value", }, ["SKULL_ROTATION_WEST"] = { type = "value", }, ["SKULL_ROTATION_WEST_NORTH_WEST"] = { type = "value", }, ["SKULL_ROTATION_WEST_SOUTH_WEST"] = { type = "value", }, ["SKULL_TYPE_CREEPER"] = { type = "value", }, ["SKULL_TYPE_PLAYER"] = { type = "value", }, ["SKULL_TYPE_SKELETON"] = { type = "value", }, ["SKULL_TYPE_WITHER"] = { type = "value", }, ["SKULL_TYPE_ZOMBIE"] = { type = "value", }, ["_MCServerInternal_PluginName"] = { type = "value", }, ["_VERSION"] = { type = "value", }, ["achAcquireIron"] = { type = "value", }, ["achBakeCake"] = { type = "value", }, ["achBlazeRod"] = { type = "value", }, ["achBookshelf"] = { type = "value", }, ["achBreedCow"] = { type = "value", }, ["achBrewPotion"] = { type = "value", }, ["achCookFish"] = { type = "value", }, ["achCraftBetterPick"] = { type = "value", }, ["achCraftEnchantTable"] = { type = "value", }, ["achCraftFurnace"] = { type = "value", }, ["achCraftHoe"] = { type = "value", }, ["achCraftPickaxe"] = { type = "value", }, ["achCraftSword"] = { type = "value", }, ["achCraftWorkbench"] = { type = "value", }, ["achDefeatDragon"] = { type = "value", }, ["achDiamonds"] = { type = "value", }, ["achEnterPortal"] = { type = "value", }, ["achEnterTheEnd"] = { type = "value", }, ["achExploreAllBiomes"] = { type = "value", }, ["achFlyPig"] = { type = "value", }, ["achFullBeacon"] = { type = "value", }, ["achKillCow"] = { type = "value", }, ["achKillMonster"] = { type = "value", }, ["achKillWither"] = { type = "value", }, ["achMakeBread"] = { type = "value", }, ["achMineWood"] = { type = "value", }, ["achOnARail"] = { type = "value", }, ["achOpenInv"] = { type = "value", }, ["achOverkill"] = { type = "value", }, ["achReturnToSender"] = { type = "value", }, ["achSnipeSkeleton"] = { type = "value", }, ["achSpawnWither"] = { type = "value", }, ["achThrowDiamonds"] = { type = "value", }, ["statAnimalsBred"] = { type = "value", }, ["statCount"] = { type = "value", }, ["statDamageDealt"] = { type = "value", }, ["statDamageTaken"] = { type = "value", }, ["statDeaths"] = { type = "value", }, ["statDistBoat"] = { type = "value", }, ["statDistClimbed"] = { type = "value", }, ["statDistDove"] = { type = "value", }, ["statDistFallen"] = { type = "value", }, ["statDistFlown"] = { type = "value", }, ["statDistHorse"] = { type = "value", }, ["statDistMinecart"] = { type = "value", }, ["statDistPig"] = { type = "value", }, ["statDistSwum"] = { type = "value", }, ["statDistWalked"] = { type = "value", }, ["statFishCaught"] = { type = "value", }, ["statGamesQuit"] = { type = "value", }, ["statInvalid"] = { type = "value", }, ["statItemsDropped"] = { type = "value", }, ["statJumps"] = { type = "value", }, ["statJunkFished"] = { type = "value", }, ["statMinutesPlayed"] = { type = "value", }, ["statMobKills"] = { type = "value", }, ["statPlayerKills"] = { type = "value", }, ["statTreasureFished"] = { type = "value", }, }