SteamWar/BungeeCore
Archiviert
13
2

Announce event fights on spectate
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2022-03-30 16:49:21 +02:00
Ursprung 82bd4b752d
Commit fa79a64d6b

Datei anzeigen

@ -59,11 +59,11 @@ public class EventStarter implements Runnable {
EventFight next; EventFight next;
while((next = nextFight(fights)) != null){ while((next = nextFight(fights)) != null){
if(!BungeeCore.EVENT_MODE && Event.get(next.getEventID()).spectateSystem())
break; //Don't start EventServer if not the event bungee
Team blue = Team.get(next.getTeamBlue()); Team blue = Team.get(next.getTeamBlue());
Team red = Team.get(next.getTeamRed()); Team red = Team.get(next.getTeamRed());
//Don't start EventServer if not the event bungee
if(BungeeCore.EVENT_MODE || !Event.get(next.getEventID()).spectateSystem()) {
ServerStarter starter = new ServerStarter().event(next); ServerStarter starter = new ServerStarter().event(next);
ProxiedPlayer leiter = ProxyServer.getInstance().getPlayer(SteamwarUser.get(next.getKampfleiter()).getUuid()); ProxiedPlayer leiter = ProxyServer.getInstance().getPlayer(SteamwarUser.get(next.getKampfleiter()).getUuid());
@ -76,6 +76,10 @@ public class EventStarter implements Runnable {
eventServer.put(red.getTeamId(), subserver); eventServer.put(red.getTeamId(), subserver);
Message.broadcast("EVENT_FIGHT_BROADCAST", "EVENT_FIGHT_BROADCAST_HOVER", Message.broadcast("EVENT_FIGHT_BROADCAST", "EVENT_FIGHT_BROADCAST_HOVER",
new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/event " + blue.getTeamKuerzel()), blue.getTeamColor(), blue.getTeamName(), red.getTeamColor(), red.getTeamName()); new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/event " + blue.getTeamKuerzel()), blue.getTeamColor(), blue.getTeamName(), red.getTeamColor(), red.getTeamName());
} else {
Message.broadcast("EVENT_FIGHT_BROADCAST", "EVENT_FIGHT_BROADCAST_HOVER",
new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/spectate"), blue.getTeamColor(), blue.getTeamName(), red.getTeamColor(), red.getTeamName());
}
} }
} }