summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemHandler.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-04-24 20:41:25 +0200
committerHowaner <franzi.moos@googlemail.com>2014-04-24 20:41:25 +0200
commit9cbb3a339f98f1737ea78af7f40e1ae7d25027e8 (patch)
tree34544dccfab33203ed5aed209199ba99df1b207d /src/Items/ItemHandler.cpp
parentUpdated docs for StringToEnchantmentID. (diff)
downloadcuberite-9cbb3a339f98f1737ea78af7f40e1ae7d25027e8.tar
cuberite-9cbb3a339f98f1737ea78af7f40e1ae7d25027e8.tar.gz
cuberite-9cbb3a339f98f1737ea78af7f40e1ae7d25027e8.tar.bz2
cuberite-9cbb3a339f98f1737ea78af7f40e1ae7d25027e8.tar.lz
cuberite-9cbb3a339f98f1737ea78af7f40e1ae7d25027e8.tar.xz
cuberite-9cbb3a339f98f1737ea78af7f40e1ae7d25027e8.tar.zst
cuberite-9cbb3a339f98f1737ea78af7f40e1ae7d25027e8.zip
Diffstat (limited to 'src/Items/ItemHandler.cpp')
-rw-r--r--src/Items/ItemHandler.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp
index 5151eac38..2cb1471aa 100644
--- a/src/Items/ItemHandler.cpp
+++ b/src/Items/ItemHandler.cpp
@@ -8,6 +8,7 @@
#include "../BlockInServerPluginInterface.h"
// Handlers:
+#include "ItemArmor.h"
#include "ItemBed.h"
#include "ItemBoat.h"
#include "ItemBow.h"
@@ -90,6 +91,12 @@ cItemHandler * cItemHandler::GetItemHandler(int a_ItemType)
cItemHandler *cItemHandler::CreateItemHandler(int a_ItemType)
{
+ // Armor
+ if (ItemCategory::IsArmor(a_ItemType))
+ {
+ return new cItemArmorHandler(a_ItemType);
+ }
+
switch(a_ItemType)
{
default: return new cItemHandler(a_ItemType);