From 09af6ad186647298b1003c73531471d764ce3c93 Mon Sep 17 00:00:00 2001 From: Trent Hensler Date: Mon, 22 Jan 2018 16:37:01 -0800 Subject: [PATCH] Don't add itemflags if none are present --- Essentials/src/com/earth2me/essentials/ItemDb.java | 2 +- Essentials/src/com/earth2me/essentials/MetaItemStack.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/ItemDb.java b/Essentials/src/com/earth2me/essentials/ItemDb.java index 0ddaa4f8a..d379de4d2 100644 --- a/Essentials/src/com/earth2me/essentials/ItemDb.java +++ b/Essentials/src/com/earth2me/essentials/ItemDb.java @@ -309,7 +309,7 @@ public class ItemDb implements IConf, net.ess3.api.IItemDb { } Set flags = meta.getItemFlags(); - if (flags != null) { + if (flags != null && meta.getItemFlags().size() > 0) { sb.append("itemflags:"); boolean first = true; for (ItemFlag flag : flags) { diff --git a/Essentials/src/com/earth2me/essentials/MetaItemStack.java b/Essentials/src/com/earth2me/essentials/MetaItemStack.java index 7daf11656..bb4e7c03e 100644 --- a/Essentials/src/com/earth2me/essentials/MetaItemStack.java +++ b/Essentials/src/com/earth2me/essentials/MetaItemStack.java @@ -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)); }