1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-02 14:29:07 +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
public String getDisplayName(ItemMeta meta) {
return serialize(meta.displayName());
return meta.displayName() == null ? null : serialize(meta.displayName());
}
@Override
public String getLine(SignChangeEvent event, int line) {
return serialize(event.line(line));
return event.line(line) == null ? "" : serialize(event.line(line));
}
@Override
@ -79,8 +79,10 @@ public final class Complement2 implements Complement {
public List<String> getLore(ItemMeta meta) {
List<String> lore = new ArrayList<>();
for (Component comp : meta.lore()) {
lore.add(serialize(comp));
if (meta.hasLore()) {
for (Component comp : meta.lore()) {
lore.add(serialize(comp));
}
}
return lore;