SteamWar/FightSystem
Archiviert
13
1

Implementing sending teams

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2020-09-07 18:24:28 +02:00
Ursprung 38b95a144b
Commit 6aa99d2d4c

Datei anzeigen

@ -47,6 +47,8 @@ public class RecordSystem {
Bukkit.getScheduler().runTaskTimer(FightSystem.getPlugin(), RecordSystem::checkWorldState, 1, 1); Bukkit.getScheduler().runTaskTimer(FightSystem.getPlugin(), RecordSystem::checkWorldState, 1, 1);
new SpectateConnection(); new SpectateConnection();
new FileRecorder(); new FileRecorder();
if(Config.event())
teamIds(Config.EventTeamBlueID, Config.EventTeamRedID);
} }
/* /*
@ -76,6 +78,7 @@ public class RecordSystem {
* SystemPacket (0xA2) + String message * SystemPacket (0xA2) + String message
* BlueSchemPacket (0xB0) + int blueSchemId * BlueSchemPacket (0xB0) + int blueSchemId
* RedSchemPacket (0xB1) + int redSchemId * RedSchemPacket (0xB1) + int redSchemId
* TeamIDPacket (0xB2) + int blueTeamId, redTeamId
* ScoreboardTitlePacket (0xC0) + String scoreboardTitle * ScoreboardTitlePacket (0xC0) + String scoreboardTitle
* ScoreboardDataPacket (0xC1) + String key + int value * ScoreboardDataPacket (0xC1) + String key + int value
* *
@ -239,6 +242,13 @@ public class RecordSystem {
Recorder.flush(); Recorder.flush();
} }
public static synchronized void teamIds(int blueTeamId, int redTeamId) {
Recorder.rByte(0xB2);
Recorder.rInt(blueTeamId);
Recorder.rInt(redTeamId);
Recorder.flush();
}
public static synchronized void scoreboardTitle(String title){ public static synchronized void scoreboardTitle(String title){
Recorder.rByte(0xC0); Recorder.rByte(0xC0);
Recorder.rString(title); Recorder.rString(title);