diff options
Diffstat (limited to 'Server/Plugins/APIDump/APIDesc.lua')
-rw-r--r-- | Server/Plugins/APIDump/APIDesc.lua | 154 |
1 files changed, 77 insertions, 77 deletions
diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua index 243f96914..40bda49d7 100644 --- a/Server/Plugins/APIDump/APIDesc.lua +++ b/Server/Plugins/APIDump/APIDesc.lua @@ -407,19 +407,19 @@ return ]], Functions = { - CanBeTerraformed = { Params = "Type", Return = "bool", Notes = "(STATIC) Returns true if the block is suitable to be changed by a generator" }, - FullyOccupiesVoxel = { Params = "Type", Return = "bool", Notes = "(STATIC) Returns whether the specified block fully occupies its voxel." }, - Get = { Params = "Type", Return = "{{cBlockInfo}}", Notes = "(STATIC) Returns the {{cBlockInfo}} structure for the specified type." }, - GetBlockHeight = { Params = "Type", Return = "number", Notes = "(STATIC) Returns the block's hitbox height." }, - GetLightValue = { Params = "Type", Return = "number", Notes = "(STATIC) Returns how much light the specified block emits on its own." }, - GetPlaceSound = { Params = "Type", Return = "", Notes = "(STATIC) Returns the name of the sound that is played when placing the block." }, - GetSpreadLightFalloff = { Params = "Type", Return = "number", Notes = "(STATIC) Returns how much light the specified block consumes." }, - IsOneHitDig = { Params = "Type", Return = "bool", Notes = "(STATIC) Returns whether the specified block will be destroyed after a single hit." }, - IsPistonBreakable = { Params = "Type", Return = "bool", Notes = "(STATIC) Returns whether a piston can break the specified block." }, - IsSnowable = { Params = "Type", Return = "bool", Notes = "(STATIC) Returns whether the specified block can hold snow atop." }, - IsSolid = { Params = "Type", Return = "bool", Notes = "(STATIC) Returns whether the specified block is solid." }, - IsTransparent = { Params = "Type", Return = "bool", Notes = "(STATIC) Returns whether the specified block is transparent." }, - RequiresSpecialTool = { Params = "Type", Return = "bool", Notes = "(STATIC) Returns whether the specified block requires a special tool to drop." }, + CanBeTerraformed = { Params = "Type", Return = "bool", IsStatic = true, Notes = "Returns true if the block is suitable to be changed by a generator" }, + FullyOccupiesVoxel = { Params = "Type", Return = "bool", IsStatic = true, Notes = "Returns whether the specified block fully occupies its voxel." }, + Get = { Params = "Type", Return = "{{cBlockInfo}}", IsStatic = true, Notes = "Returns the {{cBlockInfo}} structure for the specified type." }, + GetBlockHeight = { Params = "Type", Return = "number", IsStatic = true, Notes = "Returns the block's hitbox height." }, + GetLightValue = { Params = "Type", Return = "number", IsStatic = true, Notes = "Returns how much light the specified block emits on its own." }, + GetPlaceSound = { Params = "Type", Return = "", IsStatic = true, Notes = "Returns the name of the sound that is played when placing the block." }, + GetSpreadLightFalloff = { Params = "Type", Return = "number", IsStatic = true, Notes = "Returns how much light the specified block consumes." }, + IsOneHitDig = { Params = "Type", Return = "bool", IsStatic = true, Notes = "Returns whether the specified block will be destroyed after a single hit." }, + IsPistonBreakable = { Params = "Type", Return = "bool", IsStatic = true, Notes = "Returns whether a piston can break the specified block." }, + IsSnowable = { Params = "Type", Return = "bool", IsStatic = true, Notes = "Returns whether the specified block can hold snow atop." }, + IsSolid = { Params = "Type", Return = "bool", IsStatic = true, Notes = "Returns whether the specified block is solid." }, + IsTransparent = { Params = "Type", Return = "bool", IsStatic = true, Notes = "Returns whether the specified block is transparent." }, + RequiresSpecialTool = { Params = "Type", Return = "bool", IsStatic = true, Notes = "Returns whether the specified block requires a special tool to drop." }, }, Variables = { @@ -581,7 +581,7 @@ end Functions = { - GenerateOfflineUUID = { Params = "Username", Return = "string", Notes = "(STATIC) Generates an UUID based on the player name provided. This is used for the offline (non-auth) mode, when there's no UUID source. Each username generates a unique and constant UUID, so that when the player reconnects with the same name, their UUID is the same. Returns a 32-char UUID (no dashes)." }, + GenerateOfflineUUID = { Params = "Username", Return = "string", IsStatic = true, Notes = "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 = { Params = "", Return = "string", Notes = "Returns the brand that the client has sent in their MC|Brand plugin message." }, GetIPString = { Params = "", Return = "string", Notes = "Returns the IP address of the connection, as a string. Only the address part is returned, without the port number." }, GetLocale = { Params = "", Return = "Locale", Notes = "Returns the locale string that the client sends as part of the protocol handshake. Can be used to provide localized strings." }, @@ -594,7 +594,7 @@ end GetViewDistance = { Params = "", Return = "number", Notes = "Returns the viewdistance (number of chunks loaded for the player in each direction)" }, GetRequestedViewDistance = { Params = "", Return = "number", Notes = "Returns the view distance that the player request, not the used view distance." }, HasPluginChannel = { Params = "ChannelName", Return = "bool", Notes = "Returns true if the client has registered to receive messages on the specified plugin channel." }, - IsUUIDOnline = { Params = "UUID", Return = "bool", Notes = "(STATIC) Returns true if the UUID is generated by online auth, false if it is an offline-generated UUID. We use Version-3 UUIDs for offline UUIDs, online UUIDs are Version-4, thus we can tell them apart. Accepts both 32-char and 36-char UUIDs (with and without dashes). If the string given is not a valid UUID, returns false."}, + IsUUIDOnline = { Params = "UUID", Return = "bool", IsStatic = true, Notes = "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 = { Params = "Reason", Return = "", Notes = "Kicks the user with the specified reason" }, SendPluginMessage = { Params = "Channel, Message", Return = "", Notes = "Sends the plugin message on the specified channel." }, SetClientBrand = { Params = "ClientBrand", Return = "", Notes = "Sets the value of the client's brand. Normally this value is received from the client by a MC|Brand plugin message, this function lets plugins overwrite the value." }, @@ -758,10 +758,10 @@ local Hash = cCryptoHash.sha1HexString("DataToHash") Functions = { - md5 = { Params = "Data", Return = "string", Notes = "(STATIC) Calculates the md5 hash of the data, returns it as a raw (binary) string of 16 characters." }, - md5HexString = { Params = "Data", Return = "string", Notes = "(STATIC) Calculates the md5 hash of the data, returns it as a hex-encoded string of 32 characters." }, - sha1 = { Params = "Data", Return = "string", Notes = "(STATIC) Calculates the sha1 hash of the data, returns it as a raw (binary) string of 20 characters." }, - sha1HexString = { Params = "Data", Return = "string", Notes = "(STATIC) Calculates the sha1 hash of the data, returns it as a hex-encoded string of 40 characters." }, + md5 = { Params = "Data", Return = "string", IsStatic = true, Notes = "Calculates the md5 hash of the data, returns it as a raw (binary) string of 16 characters." }, + md5HexString = { Params = "Data", Return = "string", IsStatic = true, Notes = "Calculates the md5 hash of the data, returns it as a hex-encoded string of 32 characters." }, + sha1 = { Params = "Data", Return = "string", IsStatic = true, Notes = "Calculates the sha1 hash of the data, returns it as a raw (binary) string of 20 characters." }, + sha1HexString = { Params = "Data", Return = "string", IsStatic = true, Notes = "Calculates the sha1 hash of the data, returns it as a hex-encoded string of 40 characters." }, }, }, -- cCryptoHash @@ -796,7 +796,7 @@ local Hash = cCryptoHash.sha1HexString("DataToHash") GetLevel = { Params = "EnchantmentNumID", Return = "number", Notes = "Returns the level of the specified enchantment stored in this object; 0 if not stored" }, IsEmpty = { Params = "", Return = "bool", Notes = "Returns true if the object stores no enchantments" }, SetLevel = { Params = "EnchantmentNumID, Level", Return = "", Notes = "Sets the level for the specified enchantment, adding it if not stored before, or removing it if Level < = 0" }, - StringToEnchantmentID = { Params = "EnchantmentTextID", Return = "number", Notes = "(STATIC) Returns the enchantment numerical ID, -1 if not understood. Case insensitive. Also understands plain numbers." }, + StringToEnchantmentID = { Params = "EnchantmentTextID", Return = "number", IsStatic = true, Notes = "Returns the enchantment numerical ID, -1 if not understood. Case insensitive. Also understands plain numbers." }, ToString = { Params = "", Return = "string", Notes = "Returns the string description of all the enchantments stored in this object, in numerical-ID form" }, }, Constants = @@ -1043,24 +1043,24 @@ cFile:DeleteFile("/usr/bin/virus.exe"); ]], Functions = { - ChangeFileExt = { Params = "FileName, NewExt", Return = "string", Notes = "(STATIC) Returns FileName with its extension changed to NewExt. NewExt may begin with a dot, but needn't, the result is the same in both cases (the first dot, if present, is ignored). FileName may contain path elements, extension is recognized as the last dot after the last path separator in the string." }, - Copy = { Params = "SrcFileName, DstFileName", Return = "bool", Notes = "(STATIC) Copies a single file to a new destination. Returns true if successful. Fails if the destination already exists." }, - CreateFolder = { Params = "FolderPath", Return = "bool", Notes = "(STATIC) Creates a new folder. Returns true if successful. Only a single level can be created at a time, use CreateFolderRecursive() to create multiple levels of folders at once." }, - CreateFolderRecursive = { Params = "FolderPath", Return = "bool", Notes = "(STATIC) Creates a new folder, creating its parents if needed. Returns true if successful." }, - Delete = { Params = "Path", Return = "bool", Notes = "(STATIC) Deletes the specified file or folder. Returns true if successful. Only deletes folders that are empty.<br/><b>NOTE</b>: If you already know if the object is a file or folder, use DeleteFile() or DeleteFolder() explicitly." }, - DeleteFile = { Params = "FilePath", Return = "bool", Notes = "(STATIC) Deletes the specified file. Returns true if successful." }, - DeleteFolder = { Params = "FolderPath", Return = "bool", Notes = "(STATIC) Deletes the specified file or folder. Returns true if successful. Only deletes folders that are empty." }, - DeleteFolderContents = { Params = "FolderPath", Return = "bool", Notes = "(STATIC) Deletes everything from the specified folder, recursively. The specified folder stays intact. Returns true if successful." }, - Exists = { Params = "Path", Return = "bool", Notes = "(STATIC) Returns true if the specified file or folder exists.<br/><b>OBSOLETE</b>, use IsFile() or IsFolder() instead" }, - GetExecutableExt = { Params = "", Return = "string", Notes = "(STATIC) Returns the customary executable extension (including the dot) used by the current platform (\".exe\" on Windows, empty string on Linux). " }, - GetFolderContents = { Params = "FolderName", Return = "array table of strings", Notes = "(STATIC) Returns the contents of the specified folder, as an array table of strings. Each filesystem object is listed. Use the IsFile() and IsFolder() functions to determine the object type." }, - GetLastModificationTime = { Params = "Path", Return = "number", Notes = "(STATIC) Returns the last modification time (in current timezone) of the specified file or folder. Returns zero if file not found / not accessible. The returned value is in the same units as values returned by os.time()." }, - GetPathSeparator = { Params = "", Return = "string", Notes = "(STATIC) Returns the primary path separator used by the current platform. Returns \"\\\" on Windows and \"/\" on Linux. Note that the platform or CRT may support additional path separators, those are not reported." }, - GetSize = { Params = "FileName", Return = "number", Notes = "(STATIC) Returns the size of the file, or -1 on failure." }, - IsFile = { Params = "Path", Return = "bool", Notes = "(STATIC) Returns true if the specified path points to an existing file." }, - IsFolder = { Params = "Path", Return = "bool", Notes = "(STATIC) Returns true if the specified path points to an existing folder." }, - ReadWholeFile = { Params = "FileName", Return = "string", Notes = "(STATIC) Returns the entire contents of the specified file. Returns an empty string if the file cannot be opened." }, - Rename = { Params = "OrigPath, NewPath", Return = "bool", Notes = "(STATIC) Renames a file or a folder. Returns true if successful. Undefined result if NewPath already exists." }, + ChangeFileExt = { Params = "FileName, NewExt", Return = "string", IsStatic = true, Notes = "Returns FileName with its extension changed to NewExt. NewExt may begin with a dot, but needn't, the result is the same in both cases (the first dot, if present, is ignored). FileName may contain path elements, extension is recognized as the last dot after the last path separator in the string." }, + Copy = { Params = "SrcFileName, DstFileName", Return = "bool", IsStatic = true, Notes = "Copies a single file to a new destination. Returns true if successful. Fails if the destination already exists." }, + CreateFolder = { Params = "FolderPath", Return = "bool", IsStatic = true, Notes = "Creates a new folder. Returns true if successful. Only a single level can be created at a time, use CreateFolderRecursive() to create multiple levels of folders at once." }, + CreateFolderRecursive = { Params = "FolderPath", Return = "bool", IsStatic = true, Notes = "Creates a new folder, creating its parents if needed. Returns true if successful." }, + Delete = { Params = "Path", Return = "bool", IsStatic = true, Notes = "Deletes the specified file or folder. Returns true if successful. Only deletes folders that are empty.<br/><b>NOTE</b>: If you already know if the object is a file or folder, use DeleteFile() or DeleteFolder() explicitly." }, + DeleteFile = { Params = "FilePath", Return = "bool", IsStatic = true, Notes = "Deletes the specified file. Returns true if successful." }, + DeleteFolder = { Params = "FolderPath", Return = "bool", IsStatic = true, Notes = "Deletes the specified file or folder. Returns true if successful. Only deletes folders that are empty." }, + DeleteFolderContents = { Params = "FolderPath", Return = "bool", IsStatic = true, Notes = "Deletes everything from the specified folder, recursively. The specified folder stays intact. Returns true if successful." }, + Exists = { Params = "Path", Return = "bool", IsStatic = true, Notes = "Returns true if the specified file or folder exists.<br/><b>OBSOLETE</b>, use IsFile() or IsFolder() instead" }, + GetExecutableExt = { Params = "", Return = "string", IsStatic = true, Notes = "Returns the customary executable extension (including the dot) used by the current platform (\".exe\" on Windows, empty string on Linux). " }, + GetFolderContents = { Params = "FolderName", Return = "array table of strings", IsStatic = true, Notes = "Returns the contents of the specified folder, as an array table of strings. Each filesystem object is listed. Use the IsFile() and IsFolder() functions to determine the object type." }, + GetLastModificationTime = { Params = "Path", Return = "number", IsStatic = true, Notes = "Returns the last modification time (in current timezone) of the specified file or folder. Returns zero if file not found / not accessible. The returned value is in the same units as values returned by os.time()." }, + GetPathSeparator = { Params = "", Return = "string", IsStatic = true, Notes = "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 = { Params = "FileName", Return = "number", IsStatic = true, Notes = "Returns the size of the file, or -1 on failure." }, + IsFile = { Params = "Path", Return = "bool", IsStatic = true, Notes = "Returns true if the specified path points to an existing file." }, + IsFolder = { Params = "Path", Return = "bool", IsStatic = true, Notes = "Returns true if the specified path points to an existing folder." }, + ReadWholeFile = { Params = "FileName", Return = "string", IsStatic = true, Notes = "Returns the entire contents of the specified file. Returns an empty string if the file cannot be opened." }, + Rename = { Params = "OrigPath, NewPath", Return = "bool", IsStatic = true, Notes = "Renames a file or a folder. Returns true if successful. Undefined result if NewPath already exists." }, }, }, -- cFile @@ -1366,7 +1366,7 @@ These ItemGrids are available in the API and can be manipulated by the plugins, IsLoreEmpty = { Params = "", Return = "", Notes = "Returns if the lore of the cItem is empty." }, GetEnchantability = { Params = "", Return = "number", Notes = "Returns the enchantability of the item. When the item hasn't a enchantability, it will returns 0" }, EnchantByXPLevels = { Params = "NumXPLevels", Return = "bool", Notes = "Enchants the item using the specified number of XP levels. Returns true if item enchanted, false if not." }, - IsEnchantable = { Params = "ItemType, WithBook", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is enchantable. If WithBook is true, the function is used in the anvil inventory with book enchantments. So it checks the \"only book enchantments\" too. Example: You can only enchant a hoe with a book." }, + IsEnchantable = { Params = "ItemType, WithBook", Return = "bool", IsStatic = true, Notes = "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." }, }, Variables = { @@ -1802,12 +1802,12 @@ a_Player:OpenWindow(Window); ]], Functions = { - AddPlayerNameToUUIDMapping = { Params = "PlayerName, UUID", Return = "", Notes = "(STATIC) Adds the specified PlayerName-to-UUID mapping into the cache, with current timestamp. Accepts both short or dashed UUIDs. " }, - GetPlayerNameFromUUID = { Params = "UUID, [UseOnlyCached]", Return = "PlayerName", Notes = "(STATIC) Returns the playername that corresponds to the given UUID, or an empty string on error. If UseOnlyCached is false (the default), queries the Mojang servers if the UUID is not in the cache. The UUID can be either short or dashed. <br /><b>WARNING</b>: Do NOT use this function with UseOnlyCached set to false while the server is running. Only use it when the server is starting up (inside the Initialize() method), otherwise you will lag the server severely." }, - GetUUIDFromPlayerName = { Params = "PlayerName, [UseOnlyCached]", Return = "UUID", Notes = "(STATIC) Returns the (short) UUID that corresponds to the given playername, or an empty string on error. If UseOnlyCached is false (the default), queries the Mojang servers if the playername is not in the cache. <br /><b>WARNING</b>: Do NOT use this function with UseOnlyCached set to false while the server is running. Only use it when the server is starting up (inside the Initialize() method), otherwise you will lag the server severely." }, - GetUUIDsFromPlayerNames = { Params = "PlayerNames, [UseOnlyCached]", Return = "table", Notes = "(STATIC) Returns a table that contains the map, 'PlayerName' -> '(short) UUID', for all valid playernames in the input array-table. PlayerNames not recognized will not be set in the returned map. If UseOnlyCached is false (the default), queries the Mojang servers for the results that are not in the cache. <br /><b>WARNING</b>: Do NOT use this function with UseOnlyCached set to false while the server is running. Only use it when the server is starting up (inside the Initialize() method), otherwise you will lag the server severely." }, - MakeUUIDDashed = { Params = "UUID", Return = "DashedUUID", Notes = "(STATIC) Converts the UUID to a dashed format (\"01234567-8901-2345-6789-012345678901\"). Accepts both dashed or short UUIDs. Logs a warning and returns an empty string if UUID format not recognized." }, - MakeUUIDShort = { Params = "UUID", Return = "ShortUUID", Notes = "(STATIC) Converts the UUID to a short format (without dashes, \"01234567890123456789012345678901\"). Accepts both dashed or short UUIDs. Logs a warning and returns an empty string if UUID format not recognized." }, + AddPlayerNameToUUIDMapping = { Params = "PlayerName, UUID", Return = "", IsStatic = true, Notes = "Adds the specified PlayerName-to-UUID mapping into the cache, with current timestamp. Accepts both short or dashed UUIDs. " }, + GetPlayerNameFromUUID = { Params = "UUID, [UseOnlyCached]", Return = "PlayerName", IsStatic = true, Notes = "Returns the playername that corresponds to the given UUID, or an empty string on error. If UseOnlyCached is false (the default), queries the Mojang servers if the UUID is not in the cache. The UUID can be either short or dashed. <br /><b>WARNING</b>: Do NOT use this function with UseOnlyCached set to false while the server is running. Only use it when the server is starting up (inside the Initialize() method), otherwise you will lag the server severely." }, + GetUUIDFromPlayerName = { Params = "PlayerName, [UseOnlyCached]", Return = "UUID", IsStatic = true, Notes = "Returns the (short) UUID that corresponds to the given playername, or an empty string on error. If UseOnlyCached is false (the default), queries the Mojang servers if the playername is not in the cache. <br /><b>WARNING</b>: Do NOT use this function with UseOnlyCached set to false while the server is running. Only use it when the server is starting up (inside the Initialize() method), otherwise you will lag the server severely." }, + GetUUIDsFromPlayerNames = { Params = "PlayerNames, [UseOnlyCached]", Return = "table", IsStatic = true, Notes = "Returns a table that contains the map, 'PlayerName' -> '(short) UUID', for all valid playernames in the input array-table. PlayerNames not recognized will not be set in the returned map. If UseOnlyCached is false (the default), queries the Mojang servers for the results that are not in the cache. <br /><b>WARNING</b>: Do NOT use this function with UseOnlyCached set to false while the server is running. Only use it when the server is starting up (inside the Initialize() method), otherwise you will lag the server severely." }, + MakeUUIDDashed = { Params = "UUID", Return = "DashedUUID", IsStatic = true, Notes = "Converts the UUID to a dashed format (\"01234567-8901-2345-6789-012345678901\"). Accepts both dashed or short UUIDs. Logs a warning and returns an empty string if UUID format not recognized." }, + MakeUUIDShort = { Params = "UUID", Return = "ShortUUID", IsStatic = true, Notes = "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." }, }, }, @@ -1826,14 +1826,14 @@ a_Player:OpenWindow(Window); SetCustomName = { Params = "string", Return = "", Notes = "Sets the custom name of the monster. You see the name over the monster. If you want to disable the custom name, simply set an empty string." }, IsCustomNameAlwaysVisible = { Params = "", Return = "bool", Notes = "Is the custom name of this monster always visible? If not, you only see the name when you sight the mob." }, SetCustomNameAlwaysVisible = { Params = "bool", Return = "", Notes = "Sets the custom name visiblity of this monster. If it's false, you only see the name when you sight the mob. If it's true, you always see the custom name." }, - FamilyFromType = { Params = "{{Globals#MobType|MobType}}", Return = "{{cMonster#MobFamily|MobFamily}}", Notes = "(STATIC) Returns the mob family ({{cMonster#MobFamily|mfXXX}} constants) based on the mob type ({{Globals#MobType|mtXXX}} constants)" }, + FamilyFromType = { Params = "{{Globals#MobType|MobType}}", Return = "{{cMonster#MobFamily|MobFamily}}", IsStatic = true, Notes = "Returns the mob family ({{cMonster#MobFamily|mfXXX}} constants) based on the mob type ({{Globals#MobType|mtXXX}} constants)" }, GetMobFamily = { Params = "", Return = "{{cMonster#MobFamily|MobFamily}}", Notes = "Returns this mob's family ({{cMonster#MobFamily|mfXXX}} constant)" }, GetMobType = { Params = "", Return = "{{Globals#MobType|MobType}}", Notes = "Returns the type of this mob ({{Globals#MobType|mtXXX}} constant)" }, - GetSpawnDelay = { Params = "{{cMonster#MobFamily|MobFamily}}", Return = "number", Notes = "(STATIC) Returns the spawn delay - the number of game ticks between spawn attempts - for the specified mob family." }, - MobTypeToString = { Params = "{{Globals#MobType|MobType}}", Return = "string", Notes = "(STATIC) Returns the string representing the given mob type ({{Globals#MobType|mtXXX}} constant), or empty string if unknown type." }, - MobTypeToVanillaName = { Params = "{{Globals#MobType|MobType}}", Return = "string", Notes = "(STATIC) Returns the vanilla name of the given mob type, or empty string if unknown type." }, + GetSpawnDelay = { Params = "{{cMonster#MobFamily|MobFamily}}", Return = "number", IsStatic = true, Notes = "Returns the spawn delay - the number of game ticks between spawn attempts - for the specified mob family." }, + MobTypeToString = { Params = "{{Globals#MobType|MobType}}", Return = "string", IsStatic = true, Notes = "Returns the string representing the given mob type ({{Globals#MobType|mtXXX}} constant), or empty string if unknown type." }, + MobTypeToVanillaName = { Params = "{{Globals#MobType|MobType}}", Return = "string", IsStatic = true, Notes = "Returns the vanilla name of the given mob type, or empty string if unknown type." }, MoveToPosition = { Params = "Position", Return = "", Notes = "Moves mob to the specified position" }, - StringToMobType = { Params = "string", Return = "{{Globals#MobType|MobType}}", Notes = "(STATIC) Returns the mob type ({{Globals#MobType|mtXXX}} constant) parsed from the string type (\"creeper\"), or mtInvalidType if unrecognized." }, + StringToMobType = { Params = "string", Return = "{{Globals#MobType|MobType}}", IsStatic = true, Notes = "Returns the mob type ({{Globals#MobType|mtXXX}} constant) parsed from the string type (\"creeper\"), or mtInvalidType if unrecognized." }, GetRelativeWalkSpeed = { Params = "", Return = "number", Notes = "Returns the relative walk speed of this mob. Standard is 1.0" }, SetRelativeWalkSpeed = { Params = "number", Return = "", Notes = "Sets the relative walk speed of this mob. Standard is 1.0" }, SetAge = { Params = "number", Return = "", Notes = "Sets the age of the monster" }, @@ -1986,7 +1986,7 @@ a_Player:OpenWindow(Window); Functions = { AddFoodExhaustion = { Params = "Exhaustion", Return = "", Notes = "Adds the specified number to the food exhaustion. Only positive numbers expected." }, - CalcLevelFromXp = { Params = "XPAmount", Return = "number", Notes = "(STATIC) Returns the level which is reached with the specified amount of XP. Inverse of XpForLevel()." }, + CalcLevelFromXp = { Params = "XPAmount", Return = "number", IsStatic = true, Notes = "Returns the level which is reached with the specified amount of XP. Inverse of XpForLevel()." }, CanFly = { Return = "bool", Notes = "Returns if the player is able to fly." }, CloseWindow = { Params = "[CanRefuse]", Return = "", Notes = "Closes the currently open UI window. If CanRefuse is true (default), the window may refuse the closing." }, CloseWindowIfID = { Params = "WindowID, [CanRefuse]", Return = "", Notes = "Closes the currently open UI window if its ID matches the given ID. If CanRefuse is true (default), the window may refuse the closing." }, @@ -2047,7 +2047,7 @@ a_Player:OpenWindow(Window); LoadRank = { Params = "", Return = "", Notes = "Reloads the player's rank, message visuals and permissions from the {{cRankManager}}, based on the player's current rank." }, MoveTo = { Params = "{{Vector3d|NewPosition}}", Return = "Tries to move the player into the specified position." }, OpenWindow = { Params = "{{cWindow|Window}}", Return = "", Notes = "Opens the specified UI window for the player." }, - PermissionMatches = { Params = "Permission, Template", Return = "bool", Notes = "(STATIC) Returns true if the specified permission matches the specified template. The template may contain wildcards." }, + PermissionMatches = { Params = "Permission, Template", Return = "bool", IsStatic = true, Notes = "Returns true if the specified permission matches the specified template. The template may contain wildcards." }, PlaceBlock = { Params = "BlockX, BlockY, BlockZ, BlockType, BlockMeta", Return = "bool", Notes = "Places a block while impersonating the player. The {{OnPlayerPlacingBlock|HOOK_PLAYER_PLACING_BLOCK}} hook is called before the placement, and if it succeeds, the block is placed and the {{OnPlayerPlacedBlock|HOOK_PLAYER_PLACED_BLOCK}} hook is called. Returns true iff the block is successfully placed. Assumes that the block is in a currently loaded chunk." }, Respawn = { Params = "", Return = "", Notes = "Restores the health, extinguishes fire, makes visible and sends the Respawn packet." }, SendBlocksAround = { Params = "BlockX, BlockY, BlockZ, [Range]", Return = "", Notes = "Sends all the world's blocks in Range from the specified coords to the player, as a BlockChange packet. Range defaults to 1 (only one block sent)." }, @@ -2085,7 +2085,7 @@ a_Player:OpenWindow(Window); TossHeldItem = { Params = "[Amount]", Return = "", Notes = "Tosses the item held by the cursor, then the player is in a UI window. Amount defaults to 1." }, TossPickup = { Params = "{{cItem|Item}}", Return = "", Notes = "Tosses a pickup newly created from the specified item." }, Unfreeze = { Params = "", Return = "", Notes = "Allows the player to move again, canceling the effects of Freeze()" }, - XpForLevel = { Params = "XPLevel", Return = "number", Notes = "(STATIC) Returns the total amount of XP needed for the specified XP level. Inverse of CalcLevelFromXp()." }, + XpForLevel = { Params = "XPLevel", Return = "number", IsStatic = true, Notes = "Returns the total amount of XP needed for the specified XP level. Inverse of CalcLevelFromXp()." }, }, Constants = { @@ -2194,16 +2194,16 @@ a_Player:OpenWindow(Window); DoWithPlayerByUUID = { Params = "PlayerUUID, CallbackFunction", Return = "bool", Notes = "If there is the player with the uuid, calls the CallbackFunction with the {{cPlayer}} parameter representing the player. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cPlayer|Player}})</pre> The function returns false if the player was not found, or whatever bool value the callback returned if the player was found." }, ForEachPlayer = { Params = "CallbackFunction", Return = "", Notes = "Calls the given callback function for each player. The callback function has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cPlayer|cPlayer}})</pre>" }, ForEachWorld = { Params = "CallbackFunction", Return = "", Notes = "Calls the given callback function for each world. The callback function has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cWorld|cWorld}})</pre>" }, - Get = { Params = "", Return = "Root object", Notes = "(STATIC) This function returns the cRoot object." }, - GetBrewingRecipe = { Params = "{{cItem|cItem}}, {{cItem|cItem}}", Return = "{{cItem|cItem}}", Notes = "(STATIC) Returns the result item, if a recipe has been found. If no recipe is found, returns no value." }, - GetBuildCommitID = { Params = "", Return = "string", Notes = "(STATIC) For official builds (Travis CI / Jenkins) it returns the exact commit hash used for the build. For unofficial local builds, returns the approximate commit hash (since the true one cannot be determined), formatted as \"approx: <CommitHash>\"." }, - GetBuildDateTime = { Params = "", Return = "string", Notes = "(STATIC) For official builds (Travic CI / Jenkins) it returns the date and time of the build. For unofficial local builds, returns the approximate datetime of the commit (since the true one cannot be determined), formatted as \"approx: <DateTime-iso8601>\"." }, - GetBuildID = { Params = "", Return = "string", Notes = "(STATIC) For official builds (Travis CI / Jenkins) it returns the unique ID of the build, as recognized by the build system. For unofficial local builds, returns the string \"Unknown\"." }, - GetBuildSeriesName = { Params = "", Return = "string", Notes = "(STATIC) For official builds (Travis CI / Jenkins) it returns the series name of the build (for example \"Cuberite Windows x64 Master\"). For unofficial local builds, returns the string \"local build\"." }, + Get = { Params = "", Return = "Root object", IsStatic = true, Notes = "This function returns the cRoot object." }, + GetBrewingRecipe = { Params = "{{cItem|cItem}}, {{cItem|cItem}}", Return = "{{cItem|cItem}}", IsStatic = true, Notes = "Returns the result item, if a recipe has been found. If no recipe is found, returns no value." }, + GetBuildCommitID = { Params = "", Return = "string", IsStatic = true, Notes = "For official builds (Travis CI / Jenkins) it returns the exact commit hash used for the build. For unofficial local builds, returns the approximate commit hash (since the true one cannot be determined), formatted as \"approx: <CommitHash>\"." }, + GetBuildDateTime = { Params = "", Return = "string", IsStatic = true, Notes = "For official builds (Travic CI / Jenkins) it returns the date and time of the build. For unofficial local builds, returns the approximate datetime of the commit (since the true one cannot be determined), formatted as \"approx: <DateTime-iso8601>\"." }, + GetBuildID = { Params = "", Return = "string", IsStatic = true, Notes = "For official builds (Travis CI / Jenkins) it returns the unique ID of the build, as recognized by the build system. For unofficial local builds, returns the string \"Unknown\"." }, + GetBuildSeriesName = { Params = "", Return = "string", IsStatic = true, Notes = "For official builds (Travis CI / Jenkins) it returns the series name of the build (for example \"Cuberite Windows x64 Master\"). For unofficial local builds, returns the string \"local build\"." }, GetCraftingRecipes = { Params = "", Return = "{{cCraftingRecipe|cCraftingRecipe}}", Notes = "Returns the CraftingRecipes object" }, GetDefaultWorld = { Params = "", Return = "{{cWorld|cWorld}}", Notes = "Returns the world object from the default world." }, - GetFurnaceFuelBurnTime = { Params = "{{cItem|Fuel}}", Return = "number", Notes = "(STATIC) Returns the number of ticks for how long the item would fuel a furnace. Returns zero if not a fuel." }, - GetFurnaceRecipe = { Params = "{{cItem|InItem}}", Return = "{{cItem|OutItem}}, NumTicks, {{cItem|InItem}}", Notes = "(STATIC) Returns the furnace recipe for smelting the specified input. If a recipe is found, returns the smelted result, the number of ticks required for the smelting operation, and the input consumed (note that Cuberite supports smelting M items into N items and different smelting rates). If no recipe is found, returns no value." }, + GetFurnaceFuelBurnTime = { Params = "{{cItem|Fuel}}", Return = "number", IsStatic = true, Notes = "Returns the number of ticks for how long the item would fuel a furnace. Returns zero if not a fuel." }, + GetFurnaceRecipe = { Params = "{{cItem|InItem}}", Return = "{{cItem|OutItem}}, NumTicks, {{cItem|InItem}}", IsStatic = true, Notes = "Returns the furnace recipe for smelting the specified input. If a recipe is found, returns the smelted result, the number of ticks required for the smelting operation, and the input consumed (note that Cuberite supports smelting M items into N items and different smelting rates). If no recipe is found, returns no value." }, GetPhysicalRAMUsage = { Params = "", Return = "number", Notes = "Returns the amount of physical RAM that the entire Cuberite process is using, in KiB. Negative if the OS doesn't support this query." }, GetPluginManager = { Params = "", Return = "{{cPluginManager|cPluginManager}}", Notes = "Returns the cPluginManager object." }, GetPrimaryServerVersion = { Params = "", Return = "number", Notes = "Returns the servers primary server version." }, @@ -2369,10 +2369,10 @@ local CompressedString = cStringCompression.CompressStringGZIP("DataToCompress") ]], Functions = { - GetDefaultPort = { Params = "Scheme", Return = "number", Notes = "(STATIC) Returns the default port that should be used for the given scheme (protocol). Returns zero if the scheme is not known." }, - IsKnownScheme = { Params = "Scheme", Return = "bool", Notes = "(STATIC) Returns true if the scheme (protocol) is recognized by the parser." }, - Parse = { Params = "URL", Return = "Scheme, Username, Password, Host, Port, Path, Query, Fragment", Notes = "(STATIC) Returns the individual parts of the URL. Parts that are not explicitly specified in the URL are empty, the default port for the scheme is used. If parsing fails, the function returns nil and an error message." }, - ParseAuthorityPart = { Params = "AuthPart", Return = "Username, Password, Host, Port", Notes = "(STATIC) Parses the Authority part of the URL. Parts that are not explicitly specified in the AuthPart are returned empty, the port is returned zero. If parsing fails, the function returns nil and an error message." }, + GetDefaultPort = { Params = "Scheme", Return = "number", IsStatic = true, Notes = "Returns the default port that should be used for the given scheme (protocol). Returns zero if the scheme is not known." }, + IsKnownScheme = { Params = "Scheme", Return = "bool", IsStatic = true, Notes = "Returns true if the scheme (protocol) is recognized by the parser." }, + Parse = { Params = "URL", Return = "Scheme, Username, Password, Host, Port, Path, Query, Fragment", IsStatic = true, Notes = "Returns the individual parts of the URL. Parts that are not explicitly specified in the URL are empty, the default port for the scheme is used. If parsing fails, the function returns nil and an error message." }, + ParseAuthorityPart = { Params = "AuthPart", Return = "Username, Password, Host, Port", IsStatic = true, Notes = "Parses the Authority part of the URL. Parts that are not explicitly specified in the AuthPart are returned empty, the port is returned zero. If parsing fails, the function returns nil and an error message." }, }, AdditionalInfo = { @@ -2754,18 +2754,18 @@ World:ForEachEntity( ]], Functions = { - IsArmor = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of an armor." }, - IsAxe = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of an axe." }, - IsBoots = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of boots." }, - IsMinecart = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of a minecart." }, - IsChestPlate = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of a chestplate." }, - IsHelmet = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of a helmet." }, - IsHoe = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of a hoe." }, - IsLeggings = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of a leggings." }, - IsPickaxe = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of a pickaxe." }, - IsShovel = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of a shovel." }, - IsSword = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of a sword." }, - IsTool = { Params = "ItemType", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is any kind of a tool (axe, hoe, pickaxe, shovel or FIXME: sword)" }, + IsArmor = { Params = "ItemType", Return = "bool", IsStatic = true, Notes = "Returns true if the specified item type is any kind of an armor." }, + IsAxe = { Params = "ItemType", Return = "bool", IsStatic = true, Notes = "Returns true if the specified item type is any kind of an axe." }, + IsBoots = { Params = "ItemType", Return = "bool", IsStatic = true, Notes = "Returns true if the specified item type is any kind of boots." }, + IsMinecart = { Params = "ItemType", Return = "bool", IsStatic = true, Notes = "Returns true if the specified item type is any kind of a minecart." }, + IsChestPlate = { Params = "ItemType", Return = "bool", IsStatic = true, Notes = "Returns true if the specified item type is any kind of a chestplate." }, + IsHelmet = { Params = "ItemType", Return = "bool", IsStatic = true, Notes = "Returns true if the specified item type is any kind of a helmet." }, + IsHoe = { Params = "ItemType", Return = "bool", IsStatic = true, Notes = "Returns true if the specified item type is any kind of a hoe." }, + IsLeggings = { Params = "ItemType", Return = "bool", IsStatic = true, Notes = "Returns true if the specified item type is any kind of a leggings." }, + IsPickaxe = { Params = "ItemType", Return = "bool", IsStatic = true, Notes = "Returns true if the specified item type is any kind of a pickaxe." }, + IsShovel = { Params = "ItemType", Return = "bool", IsStatic = true, Notes = "Returns true if the specified item type is any kind of a shovel." }, + IsSword = { Params = "ItemType", Return = "bool", IsStatic = true, Notes = "Returns true if the specified item type is any kind of a sword." }, + IsTool = { Params = "ItemType", Return = "bool", IsStatic = true, Notes = "Returns true if the specified item type is any kind of a tool (axe, hoe, pickaxe, shovel or FIXME: sword)" }, }, AdditionalInfo = { |