22 package com.realtime.crossfire.jxclient.sound;
26 import org.jetbrains.annotations.NotNull;
44 @SuppressWarnings(
"FieldCanBeLocal")
48 public void commandMusicReceived(@NotNull
final String music) {
49 soundManager.
playMusic(music.equals(
"NONE") ? null : music);
final SoundManager soundManager
The SoundManager instance to watch.
final CrossfireMusicListener crossfireMusicListener
The crossfire stats listener.
MusicWatcher(@NotNull final CrossfireServerConnection crossfireServerConnection, @NotNull final SoundManager soundManager)
Creates a new instance.
Monitors music commands and generates appropriate sound effects.
Interface for listeners interested in "music" commands.
void playMusic(@Nullable final String name)
Plays a background music.
Adds encoding/decoding of crossfire protocol packets to a ServerConnection.