Interface HTSoundsAPI<P,L,S>

All Superinterfaces:
SoundsAPI<P,L,S>

public interface HTSoundsAPI<P,L,S> extends SoundsAPI<P,L,S>
Hytale-specific extension of SoundsAPI. Provides MIDI playback support through the BlueArcade instrument pipeline.
Since:
3.3
  • Method Details

    • playMIDI

      void playMIDI(P player, String midiId)
      Play a MIDI melody for a player. The midiId is a path relative to the module's sounds/ folder, without the .midi extension (e.g. "effect/finish_game").
      Parameters:
      player - Player to play the melody for
      midiId - MIDI asset identifier
    • stopMIDI

      void stopMIDI(P player)
      Stop any MIDI melody currently playing for a player.
      Parameters:
      player - Player to stop the melody for
    • playRandomMIDI

      default void playRandomMIDI(P player, List<String> midiIds)
      Play a random MIDI melody from a list of IDs.
      Parameters:
      player - Player to play the melody for
      midiIds - List of MIDI asset identifiers