NoteBlockAPI Integration
Santa Says features a built-in radio system that plays background music during games. To hear the classic tunes while playing, you must install the NoteBlockAPI plugin on your server.
Installation
Section titled “Installation”- Download the latest version of NoteBlockAPI.
- Drop the
.jarfile into your server’spluginsfolder. - Restart your server.
Default Song
Section titled “Default Song”By default, the plugin comes with a NoteBlock version of Scott Joplin’s “The Entertainer”. This song plays for all participants in an active game session and is automatically handled by the plugin’s internal NBAPIRadio system.
Using Custom Music
Section titled “Using Custom Music”You are not limited to the default track! You can easily replace the background music with any .nbs file.
How to change the song:
Section titled “How to change the song:”- Navigate to your server folder:
/plugins/SantaSays/song/. - Delete the existing
song.nbs. - Upload your custom
.nbsfile and rename it exactly tosong.nbs. - Restart the server or reload the plugin.
Developer Note
Section titled “Developer Note”The plugin uses a Radio interface to manage music playback. When a game starts, the NBAPIRadio class creates a RadioSongPlayer for that specific game instance, ensuring that only players within that arena hear the music.
// Internal logic for adding players to the radio@Overridepublic void addGame(Game game) { RadioSongPlayer radio = gameRadios.computeIfAbsent(game, (k) -> new RadioSongPlayer(song)); game.getPlayers().forEach(radio::addPlayer);}