From 3dde9b159c4a5e720591cf898f2a23f087b1b539 Mon Sep 17 00:00:00 2001 From: NeumimTo Date: Mon, 25 Feb 2019 00:11:19 +0100 Subject: [PATCH] fixed players not being able to equip armor --- .../rpg/configuration/adapters/AllowedArmorListAdapter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Plugin/src/main/java/cz/neumimto/rpg/configuration/adapters/AllowedArmorListAdapter.java b/Plugin/src/main/java/cz/neumimto/rpg/configuration/adapters/AllowedArmorListAdapter.java index 385df4891..1993320ac 100644 --- a/Plugin/src/main/java/cz/neumimto/rpg/configuration/adapters/AllowedArmorListAdapter.java +++ b/Plugin/src/main/java/cz/neumimto/rpg/configuration/adapters/AllowedArmorListAdapter.java @@ -3,6 +3,7 @@ import com.google.common.reflect.TypeToken; import cz.neumimto.rpg.Log; import cz.neumimto.rpg.inventory.RPGItemType; +import cz.neumimto.rpg.inventory.WeaponClass; import ninja.leaping.configurate.ConfigurationNode; import ninja.leaping.configurate.objectmapping.ObjectMappingException; import org.spongepowered.api.Sponge; @@ -26,7 +27,7 @@ public Set deserialize(TypeToken typeToken, ConfigurationNode co String[] split = a.split(";"); Optional type = Sponge.getRegistry().getType(ItemType.class, split[0]); if (type.isPresent()) { - RPGItemType rpgItemType = new RPGItemType(type.get(), split.length == 2 ? split[1] : null, null, 0); + RPGItemType rpgItemType = new RPGItemType(type.get(), split.length == 2 ? split[1] : null, WeaponClass.ARMOR, 0); res.add(rpgItemType); } else { Log.warn(" - Unknown item \""+a+"\")");