Merge pull request 'Announce event fights on spectate' (#325) from announceSpectate into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #325 Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
Commit
02e13f5d9e
@ -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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren