Fix party info not showing if party owner is null
This commit is contained in:
parent
55918670bc
commit
5583abbbca
|
|
@ -46,10 +46,11 @@ public class Info implements SubCommand {
|
||||||
displayNames.add(Config.OFFLINE_PREFIX.append(partyUser.getDisplayName()));
|
displayNames.add(Config.OFFLINE_PREFIX.append(partyUser.getDisplayName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PartyUser owner = party.getPartyUser(party.getOwnerUuid());
|
||||||
source.sendMessage(Utility.parseMiniMessage(Config.PARTY_INFO,
|
source.sendMessage(Utility.parseMiniMessage(Config.PARTY_INFO,
|
||||||
Placeholder.unparsed("party", party.getPartyName()),
|
Placeholder.unparsed("party", party.getPartyName()),
|
||||||
Placeholder.unparsed("password", party.getPartyPassword()),
|
Placeholder.unparsed("password", party.getPartyPassword()),
|
||||||
Placeholder.component("owner", party.getPartyUser(party.getOwnerUuid()).getDisplayName()),
|
Placeholder.component("owner", owner == null ? MiniMessage.miniMessage().deserialize("Unknown Owner") : owner.getDisplayName()),
|
||||||
Placeholder.component("members", Component.join(JoinConfiguration.separator(Component.text(", ")), displayNames))
|
Placeholder.component("members", Component.join(JoinConfiguration.separator(Component.text(", ")), displayNames))
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user