Implementing sound at player
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
90737ca915
Commit
859e404536
@ -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));
|
||||||
}
|
}
|
||||||
|
@ -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();
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren