mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-09 20:41:23 +01:00
Don't add itemflags if none are present
This commit is contained in:
parent
16a496c706
commit
09af6ad186
@ -309,7 +309,7 @@ public class ItemDb implements IConf, net.ess3.api.IItemDb {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Set<ItemFlag> flags = meta.getItemFlags();
|
Set<ItemFlag> flags = meta.getItemFlags();
|
||||||
if (flags != null) {
|
if (flags != null && meta.getItemFlags().size() > 0) {
|
||||||
sb.append("itemflags:");
|
sb.append("itemflags:");
|
||||||
boolean first = true;
|
boolean first = true;
|
||||||
for (ItemFlag flag : flags) {
|
for (ItemFlag flag : flags) {
|
||||||
|
@ -258,7 +258,7 @@ public class MetaItemStack {
|
|||||||
|
|
||||||
public void addItemFlags(final String string) throws Exception {
|
public void addItemFlags(final String string) throws Exception {
|
||||||
String[] separate = splitPattern.split(string, 2);
|
String[] separate = splitPattern.split(string, 2);
|
||||||
if(separate.length != 2) {
|
if (separate.length != 2) {
|
||||||
throw new Exception(tl("invalidItemFlagMeta", string));
|
throw new Exception(tl("invalidItemFlagMeta", string));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user