Permalink
Browse files

Fixed ItemCategory code example.

  • Loading branch information...
Howaner committed Aug 27, 2014
1 parent 690e6cb commit e555cb4ab3a783f9dc8980bd5f7e4523bd6711ce
Showing with 2 additions and 2 deletions.
  1. +2 −2 MCServer/Plugins/APIDump/APIDesc.lua
@@ -2570,8 +2570,8 @@ World:ForEachEntity(
The following code snippet checks if the player holds a shovel.
<pre class="prettyprint lang-lua">
-- a_Player is a {{cPlayer}} object, possibly received as a hook param
local HeldItem = a_Player:GetEquippedItem();
if (cItemCategory:IsShovel(HeldItem.m_ItemType)) then
local HeldItem = a_Player:GetEquippedItem()
if (ItemCategory.IsShovel(HeldItem.m_ItemType)) then
-- It's a shovel
end
</pre>

0 comments on commit e555cb4

Please sign in to comment.