SteamWar/FightSystem
Archiviert
13
1

Implementing sound at player

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2020-09-06 11:43:09 +02:00
Ursprung 90737ca915
Commit 859e404536
2 geänderte Dateien mit 2 neuen und 3 gelöschten Zeilen

Datei anzeigen

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

Datei anzeigen

@ -201,10 +201,9 @@ public class RecordSystem {
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.rString(soundType);
Recorder.rString(soundCategory);
Recorder.rFloat(volume);
Recorder.rFloat(pitch);
Recorder.flush();