Don't add itemflags if none are present

This commit is contained in:
Trent Hensler 2018-01-22 16:37:01 -08:00
parent 16a496c706
commit 09af6ad186
2 changed files with 2 additions and 2 deletions

View File

@ -309,7 +309,7 @@ public class ItemDb implements IConf, net.ess3.api.IItemDb {
}
Set<ItemFlag> flags = meta.getItemFlags();
if (flags != null) {
if (flags != null && meta.getItemFlags().size() > 0) {
sb.append("itemflags:");
boolean first = true;
for (ItemFlag flag : flags) {

View File

@ -258,7 +258,7 @@ public class MetaItemStack {
public void addItemFlags(final String string) throws Exception {
String[] separate = splitPattern.split(string, 2);
if(separate.length != 2) {
if (separate.length != 2) {
throw new Exception(tl("invalidItemFlagMeta", string));
}