fix(gui): check empty name/skin
This commit is contained in:
parent
95cb60a6b3
commit
2cf7f4c8d4
2 changed files with 14 additions and 6 deletions
|
@ -36,7 +36,11 @@ public class PlayerInformationItem extends AsyncItem {
|
|||
|
||||
if (optionalProfile.isPresent()) {
|
||||
final NickoProfile profile = optionalProfile.get();
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.Admin.CHECK, player.getName(), (profile.hasData() ? "§a✔" : "§c❌"), profile.getName(), profile.getSkin());
|
||||
final ItemTranslation translation = i18n.translateItem(I18NDict.GUI.Admin.CHECK,
|
||||
player.getName(),
|
||||
(profile.hasData() ? "§a✔" : "§c❌"),
|
||||
(profile.getName() == null ? "§cN/A" : profile.getName()),
|
||||
(profile.getSkin() == null ? "§cN/A" : profile.getSkin()));
|
||||
skull.setDisplayName("§6" + translation.getName());
|
||||
translation.getLore().forEach(skull::addLoreLines);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue