summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-08-30 15:06:43 +0200
committerHowaner <franzi.moos@googlemail.com>2014-08-30 15:06:43 +0200
commit3ee3a59e75ac1e6eb9284983a05a459aab5be1fd (patch)
tree893e7c82a6f61dc5609569f72eaa994af540f8ec
parentAPIDump: Added missing cItem things. (diff)
downloadcuberite-3ee3a59e75ac1e6eb9284983a05a459aab5be1fd.tar
cuberite-3ee3a59e75ac1e6eb9284983a05a459aab5be1fd.tar.gz
cuberite-3ee3a59e75ac1e6eb9284983a05a459aab5be1fd.tar.bz2
cuberite-3ee3a59e75ac1e6eb9284983a05a459aab5be1fd.tar.lz
cuberite-3ee3a59e75ac1e6eb9284983a05a459aab5be1fd.tar.xz
cuberite-3ee3a59e75ac1e6eb9284983a05a459aab5be1fd.tar.zst
cuberite-3ee3a59e75ac1e6eb9284983a05a459aab5be1fd.zip
-rw-r--r--MCServer/Plugins/APIDump/APIDesc.lua2
-rw-r--r--src/Item.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index d75911666..da8f9cd74 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -1209,7 +1209,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." },
+ IsEnchantable = { Params = "ItemType, WithBook", Return = "bool", Notes = "(STATIC) Returns true if the specified item type is enchantable. If WithBook is true, the function checks the enchantments with a book too." },
},
Variables =
{
diff --git a/src/Item.h b/src/Item.h
index 316928b9e..e7fd67b9a 100644
--- a/src/Item.h
+++ b/src/Item.h
@@ -183,7 +183,8 @@ public:
/** Loads the item data from JSON representation */
void FromJson(const Json::Value & a_Value);
- /** Returns true if the specified item type is enchantable. */
+ /** Returns true if the specified item type is enchantable.
+ If WithBook is true, the function checks the enchantments with a book too. */
static bool IsEnchantable(short a_ItemType, bool a_WithBook = false); // tolua_export
/** Returns the enchantability of the item. When the item hasn't a enchantability, it will returns 0 */