mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-05 03:53:41 +00:00
Don't add itemflags if none are present
This commit is contained in:
parent
16a496c706
commit
09af6ad186
2 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue