Skip to content

Commit

Permalink
fixed players not being able to equip armor
Browse files Browse the repository at this point in the history
  • Loading branch information
NeumimTo committed Feb 24, 2019
1 parent 7d54a3b commit 3dde9b1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -26,7 +27,7 @@ public Set<RPGItemType> deserialize(TypeToken<?> typeToken, ConfigurationNode co
String[] split = a.split(";");
Optional<ItemType> 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+"\")");
Expand Down

0 comments on commit 3dde9b1

Please sign in to comment.