SteamWar/FightSystem
Archiviert
13
1

RecordSystem (Beta) #199

Manuell gemergt
Lixfel hat 40 Commits von recordSystem nach master 2020-11-01 20:11:45 +01:00 zusammengeführt
Nur Änderungen aus Commit 6aa99d2d4c werden angezeigt - Alle Commits anzeigen

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);