diff options
author | Lukas Pioch <lukas@zgow.de> | 2017-04-04 07:53:14 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2017-04-04 07:53:14 +0200 |
commit | fb205174350792c5840897b63d7457b3536e0c27 (patch) | |
tree | ff5a7e38c3f56793a382a59287c352ec0769bc35 /Server/Plugins/APIDump | |
parent | Added a nullptr check to cEntity::IsA (#3659) (diff) | |
download | cuberite-fb205174350792c5840897b63d7457b3536e0c27.tar cuberite-fb205174350792c5840897b63d7457b3536e0c27.tar.gz cuberite-fb205174350792c5840897b63d7457b3536e0c27.tar.bz2 cuberite-fb205174350792c5840897b63d7457b3536e0c27.tar.lz cuberite-fb205174350792c5840897b63d7457b3536e0c27.tar.xz cuberite-fb205174350792c5840897b63d7457b3536e0c27.tar.zst cuberite-fb205174350792c5840897b63d7457b3536e0c27.zip |
Diffstat (limited to 'Server/Plugins/APIDump')
-rw-r--r-- | Server/Plugins/APIDump/APIDesc.lua | 157 | ||||
-rw-r--r-- | Server/Plugins/APIDump/Classes/Projectiles.lua | 2 | ||||
-rw-r--r-- | Server/Plugins/APIDump/Classes/RankManager.lua | 16 | ||||
-rw-r--r-- | Server/Plugins/APIDump/Classes/World.lua | 17 |
4 files changed, 189 insertions, 3 deletions
diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua index 4ffaaee8d..c2c75628c 100644 --- a/Server/Plugins/APIDump/APIDesc.lua +++ b/Server/Plugins/APIDump/APIDesc.lua @@ -2277,6 +2277,11 @@ return }, Variables = { + m_BlockHeight = + { + Type = "number", + Notes = "The height of the block, a value between 0.0 and 1.0", + }, m_CanBeTerraformed = { Type = "bool", @@ -2287,6 +2292,11 @@ return Type = "bool", Notes = "Does this block fully occupy its voxel - is it a 'full' block?", }, + m_Hardness = + { + Type = "number", + Notes = "The greater the value the longer the player needs to break the block.", + }, m_IsSnowable = { Type = "bool", @@ -11411,7 +11421,7 @@ a_Player:OpenWindow(Window); }, Notes = "Returns the name that is used in the playerlist.", }, - GetResolvedPermissions = + GetRestrictions = { Returns = { @@ -11419,7 +11429,7 @@ a_Player:OpenWindow(Window); Type = "table", }, }, - Notes = "Returns all the player's permissions, as an array-table of strings.", + Notes = "Returns an array-table of all the restrictions that the player has assigned to them.", }, GetSprintingMaxSpeed = { @@ -13988,6 +13998,51 @@ end }, Notes = "Returns the coords of a block adjacent to the specified block through the specified {{Globals#BlockFaces|face}}", }, + Base64Decode = + { + Params = + { + { + Name = "Input", + Type = "string", + }, + }, + Returns = + { + { Type = "string" }, + }, + Notes = "Decodes a Base64-encoded string into the raw data.", + }, + Base64Encode = + { + Params = + { + { + Name = "Input", + Type = "string", + }, + }, + Returns = + { + { Type = "string" }, + }, + Notes = "Encodes a string into Base64.", + }, + BiomeToString = + { + Params = + { + { + Name = "Biome", + Type = "EMCSBiome", + }, + }, + Returns = + { + { Type = "string" }, + }, + Notes = "Translates biome enum into biome string. Returns empty string on failure (unknown biome).", + }, BlockFaceToString = { Params = @@ -14082,6 +14137,23 @@ end }, Notes = "Converts the {{Globals#eDamageType|DamageType}} to a string representation ", }, + DimensionToString = + { + Params = + { + { + Name = "Dimension", + Type = "eDimension", + }, + }, + Returns = + { + { + Type = "string", + }, + }, + Notes = "Converts an {{Globals#eDimension|eDimension}} to a string value. Returns Overworld on failure.", + }, EscapeString = { Params = @@ -14149,6 +14221,21 @@ end }, Notes = "Returns the item that has been read from the specified INI file value. If the value is not present in the INI file, the DefaultValue is stored in the file and parsed as the result. Returns empty item if the value cannot be parsed. ", }, + GetSnowStartHeight = + { + Params = + { + { + Name = "Biome", + Type = "EMCSBiome", + }, + }, + Returns = + { + { Type = "number" }, + }, + Notes = "Returns the height at which snow will start falling in the {{Globals#EMCSBiome|Biome}}. Check functions IsBiomeCold and IsBiomeVeryCold for more informations.", + }, GetTime = { Returns = @@ -14159,6 +14246,21 @@ end }, Notes = "Returns the current OS time, as a unix time stamp (number of seconds since Jan 1, 1970)", }, + IsBiomeCold = + { + Params = + { + { + Name = "Biome", + Type = "EMCSBiome", + }, + }, + Returns = + { + { Type = "boolean" }, + }, + Notes = "Returns true if the biome is cold (has snow and snowfall at higher elevations but not at regular heights). Doesn't report Very Cold biomes, use IsBiomeVeryCold() for those.", + }, IsBiomeNoDownfall = { Params = @@ -14176,6 +14278,40 @@ end }, Notes = "Returns true if the biome is 'dry', that is, there is no precipitation during rains and storms.", }, + IsBiomeOcean = + { + Params = + { + { + Name = "Biome", + Type = "EMCSBiome", + }, + }, + Returns = + { + { + Type = "boolean", + }, + }, + Notes = "Returns true if the biome is an ocean biome.", + }, + IsBiomeVeryCold = + { + Params = + { + { + Name = "Biome", + Type = "EMCSBiome", + }, + }, + Returns = + { + { + Type = "boolean", + }, + }, + Notes = "Returns true if the biome is very cold (has snow on ground everywhere, turns top water to ice, has snowfall instead of rain everywhere). Doesn't report mildly cold biomes (where it snows above certain elevation), use IsBiomeCold() for those.", + }, IsValidBlock = { Params = @@ -14474,6 +14610,23 @@ end }, Notes = "Replaces *each* occurence of to-be-replaced-string in full-string with to-replace-string", }, + ReverseBlockFace = + { + Params = + { + { + Name = "BlockFace", + Type = "eBlockFace", + }, + }, + Returns = + { + { + Type = "eBlockFace", + }, + }, + Notes = "Returns the reversed {{Globals#eBlockFace|eBlockFace}}.", + }, RotateBlockFaceCCW = { Params = diff --git a/Server/Plugins/APIDump/Classes/Projectiles.lua b/Server/Plugins/APIDump/Classes/Projectiles.lua index b92f6d2a8..a62779960 100644 --- a/Server/Plugins/APIDump/Classes/Projectiles.lua +++ b/Server/Plugins/APIDump/Classes/Projectiles.lua @@ -26,7 +26,7 @@ return }, GetBlockHit = { - Desc = "Gets the block arrow is in", + Notes = "Returns the coords of the block into which the arrow is stuck. Undefined if the arrow is still moving.", Returns = { { diff --git a/Server/Plugins/APIDump/Classes/RankManager.lua b/Server/Plugins/APIDump/Classes/RankManager.lua index 9695117a6..be2969298 100644 --- a/Server/Plugins/APIDump/Classes/RankManager.lua +++ b/Server/Plugins/APIDump/Classes/RankManager.lua @@ -626,6 +626,22 @@ return }, Notes = "Removes the specified rank. If ReplacementRankName is given, the players that have RankName will get their rank set to ReplacementRankName. If it isn't given, or is an invalid rank, the players will be removed from the manager, their ranks will be unset completely. Logs an info message and does nothing if the rank is not found.", }, + RemoveRestrictionFromGroup = + { + IsStatic = true, + Params = + { + { + Name = "Restriction", + Type = "string", + }, + { + Name = "GroupName", + Type = "string", + }, + }, + Notes = "Removes the specified restriction from the specified group.", + }, RenameGroup = { IsStatic = true, diff --git a/Server/Plugins/APIDump/Classes/World.lua b/Server/Plugins/APIDump/Classes/World.lua index 91741377f..2733410e4 100644 --- a/Server/Plugins/APIDump/Classes/World.lua +++ b/Server/Plugins/APIDump/Classes/World.lua @@ -1112,6 +1112,23 @@ function OnAllChunksAvailable()</pre> All return values from the callbacks are i }, Notes = "Calls the specified callback for each furnace in the chunk. Returns true if all furnaces in the chunk have been processed (including when there are zero furnaces), or false if the callback has aborted the enumeration by returning true. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback({{cFurnaceEntity|FurnaceEntity}})</pre> The callback should return false or no value to continue with the next furnace, or true to abort the enumeration.", }, + ForEachLoadedChunk = + { + Params = + { + { + Name = "CallbackFunction", + Type = "function", + }, + }, + Returns = + { + { + Type = "boolean", + }, + }, + Notes = "Calls the specified callback for each loaded chunk in the world. Returns true if all chunks have been processed, or false if the callback has aborted the enumeration by returning true. The CallbackFunction has the following signature: <pre class=\"prettyprint lang-lua\">function Callback(ChunkX, ChunkZ)</pre> The callback should return false or no value to continue with the next chunk, or true to abort the enumeration.", + }, ForEachPlayer = { Params = |