1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-21 15:41:19 +01:00
This commit is contained in:
montlikadani 2021-02-28 07:44:03 +01:00
parent 269ee4c2ca
commit 297b99a0ba

View File

@ -26,12 +26,12 @@ public final class Complement2 implements Complement {
@Override @Override
public String getDisplayName(ItemMeta meta) { public String getDisplayName(ItemMeta meta) {
return serialize(meta.displayName()); return meta.displayName() == null ? null : serialize(meta.displayName());
} }
@Override @Override
public String getLine(SignChangeEvent event, int line) { public String getLine(SignChangeEvent event, int line) {
return serialize(event.line(line)); return event.line(line) == null ? "" : serialize(event.line(line));
} }
@Override @Override
@ -79,9 +79,11 @@ public final class Complement2 implements Complement {
public List<String> getLore(ItemMeta meta) { public List<String> getLore(ItemMeta meta) {
List<String> lore = new ArrayList<>(); List<String> lore = new ArrayList<>();
if (meta.hasLore()) {
for (Component comp : meta.lore()) { for (Component comp : meta.lore()) {
lore.add(serialize(comp)); lore.add(serialize(comp));
} }
}
return lore; return lore;
} }