ItemCategory


Index:
Articles
Classes
Hooks

Quick navigation:
cArrowEntity
cBeaconEntity
cBlockArea
cBlockEntity
cBlockEntityWithItems
cBlockInfo
cBoundingBox
cBrewingstandEntity
cChatColor
cChestEntity
cChunkDesc
cClientHandle
cCommandBlockEntity
cCompositeChat
cCraftingGrid
cCraftingRecipe
cCryptoHash
cCuboid
cDispenserEntity
cDropperEntity
cDropSpenserEntity
cEnchantments
cEntity
cEntityEffect
cExpBottleEntity
cFile
cFireChargeEntity
cFireworkEntity
cFloater
cFlowerPotEntity
cFurnaceEntity
cGhastFireballEntity
cHangingEntity
cHopperEntity
cIniFile
cInventory
cItem
cItemFrame
cItemGrid
cItems
cJson
cJukeboxEntity
cLineBlockTracer
cLuaWindow
cMap
cMapManager
cMobHeadEntity
cMobSpawnerEntity
cMojangAPI
cMonster
cNetwork
cNoteEntity
cObjective
cPainting
cPawn
cPickup
cPlayer
cPlugin
cPluginLua
cPluginManager
cProjectileEntity
cRankManager
cRoot
cScoreboard
cServer
cServerHandle
cSignEntity
cSplashPotionEntity
cStatManager
cStringCompression
cTCPLink
cTeam
cThrownEggEntity
cThrownEnderPearlEntity
cThrownSnowballEntity
cTNTEntity
cTracer
cUDPEndpoint
cUrlClient
cUrlParser
cWebAdmin
cWindow
cWitherSkullEntity
cWorld
HTTPFormData
HTTPRequest
HTTPTemplateRequest
ItemCategory
lxp
sqlite3
TakeDamageInfo
tolua
Vector3d
Vector3f
Vector3i
Globals

Contents


ItemCategory class

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.


Functions

NameParametersReturn valueNotes
IsArmor ItemType bool (STATIC) Returns true if the specified item type is any kind of an armor.
IsAxe ItemType bool (STATIC) Returns true if the specified item type is any kind of an axe.
IsBoots ItemType bool (STATIC) Returns true if the specified item type is any kind of boots.
IsChestPlate ItemType bool (STATIC) Returns true if the specified item type is any kind of a chestplate.
IsHelmet ItemType bool (STATIC) Returns true if the specified item type is any kind of a helmet.
IsHoe ItemType bool (STATIC) Returns true if the specified item type is any kind of a hoe.
IsLeggings ItemType bool (STATIC) Returns true if the specified item type is any kind of a leggings.
IsMinecart ItemType bool (STATIC) Returns true if the specified item type is any kind of a minecart.
IsPickaxe ItemType bool (STATIC) Returns true if the specified item type is any kind of a pickaxe.
IsShovel ItemType bool (STATIC) Returns true if the specified item type is any kind of a shovel.
IsSword ItemType bool (STATIC) Returns true if the specified item type is any kind of a sword.
IsTool ItemType bool (STATIC) Returns true if the specified item type is any kind of a tool (axe, hoe, pickaxe, shovel or FIXME: sword)

Code example

The following code snippet checks if the player holds a shovel.
-- a_Player is a cPlayer object, possibly received as a hook param
local HeldItem = a_Player:GetEquippedItem()
if (ItemCategory.IsShovel(HeldItem.m_ItemType)) then
	-- It's a shovel
end
Generated on 2016-08-22 23:53:06, Build ID Unknown, Commit approx: 2ed4af74edd14ae17e1c6c64d44caa7b7fc30d5a