SteamWar/FightSystem
Archiviert
13
1

Fix Name if leader null
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2024-01-20 17:51:44 +01:00
Ursprung 169649204a
Commit edc77ca2d4

Datei anzeigen

@ -50,7 +50,8 @@ public class GUI {
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
private static void addTeamRequest(Player p, SWInventory inv, int pos, FightTeam team) { private static void addTeamRequest(Player p, SWInventory inv, int pos, FightTeam team) {
byte colorCode = ColorConverter.chat2dye(team.getColor()).getDyeData(); byte colorCode = ColorConverter.chat2dye(team.getColor()).getDyeData();
inv.setItem(pos, SWItem.getDye(colorCode), colorCode, msg.parse("JOIN_REQUEST_TEAM", p, team.getColor() + team.getLeader().getEntity().getName()), click -> { String name = team.getLeader() != null ? team.getLeader().getEntity().getName() : team.getName();
inv.setItem(pos, SWItem.getDye(colorCode), colorCode, msg.parse("JOIN_REQUEST_TEAM", p, team.getColor() + name), click -> {
p.closeInventory(); p.closeInventory();
new JoinRequest(p, team); new JoinRequest(p, team);
}); });