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
2 geänderte Dateien mit 2 neuen und 3 gelöschten Zeilen
Nur Änderungen aus Commit 859e404536 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -83,7 +83,7 @@ public class Fight {
public static void playSound(Sound sound, float volume, float pitch) { public static void playSound(Sound sound, float volume, float pitch) {
if(Config.recording()) if(Config.recording())
RecordSystem.soundAtPlayer(sound.name(), SoundCategory.AMBIENT.name(), volume, pitch); RecordSystem.soundAtPlayer(sound.name(), volume, pitch);
//volume: max. 100, pitch: max. 2 //volume: max. 100, pitch: max. 2
Bukkit.getServer().getOnlinePlayers().forEach(player -> player.playSound(player.getLocation(), sound, volume, pitch)); Bukkit.getServer().getOnlinePlayers().forEach(player -> player.playSound(player.getLocation(), sound, volume, pitch));
} }

Datei anzeigen

@ -201,10 +201,9 @@ public class RecordSystem {
Recorder.flush(); Recorder.flush();
} }
public static synchronized void soundAtPlayer(String soundType, String soundCategory, float volume, float pitch){ public static synchronized void soundAtPlayer(String soundType, float volume, float pitch){
Recorder.rByte(0x34); Recorder.rByte(0x34);
Recorder.rString(soundType); Recorder.rString(soundType);
Recorder.rString(soundCategory);
Recorder.rFloat(volume); Recorder.rFloat(volume);
Recorder.rFloat(pitch); Recorder.rFloat(pitch);
Recorder.flush(); Recorder.flush();