Browse Source

Empty check when reading enum

combat-2
MagicBot 8 months ago
parent
commit
c390ebe0c6
  1. 1
      src/engine/objects/Item.java

1
src/engine/objects/Item.java

@ -153,6 +153,7 @@ public class Item extends AbstractWorldObject { @@ -153,6 +153,7 @@ public class Item extends AbstractWorldObject {
String flagString = rs.getString("item_flags");
if (flagString.isEmpty() == false)
for (String itemFlag : flagString.split(";"))
this.flags.add(Enum.ItemFlags.valueOf(itemFlag));

Loading…
Cancel
Save