Interface VoiceRadioService


public interface VoiceRadioService
Service managing radio channels, frequency tuning, Roger Beep feedback, and radio transmission routing.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable RadioChannel
    getChannel(@NotNull String name)
    Retrieves a radio channel by name.
    @Nullable RadioChannel
    getChannelOfPlayer(@NotNull UUID playerUuid)
    Retrieves the active radio channel a player is currently tuned into.
    Returns all active radio frequency channels.
    @NotNull RadioChannel
    getOrCreateChannel(@NotNull String name)
    Retrieves an existing radio channel by name, or creates a new one if it does not exist.
    void
    init(@NotNull de.maxhenkel.voicechat.api.VoicechatServerApi api)
    Initializes the radio service with the Simple Voice Chat server API.
    void
    joinChannel(@NotNull UUID playerUuid, @NotNull String channelName)
    Tunes a player into a radio frequency channel.
    void
    leaveChannel(@NotNull UUID playerUuid)
    Disconnects a player from their active radio frequency channel.
    void
    Reloads saved radio channels from disk.
    void
    removeChannel(@NotNull String name)
    Deletes a radio channel by name.
    void
    Saves all radio channels to disk.
  • Method Details

    • init

      void init(@NotNull @NotNull de.maxhenkel.voicechat.api.VoicechatServerApi api)
      Initializes the radio service with the Simple Voice Chat server API.
      Parameters:
      api - the VoicechatServerApi instance
    • getChannels

      @NotNull @NotNull Collection<RadioChannel> getChannels()
      Returns all active radio frequency channels.
      Returns:
      collection of RadioChannels
    • getOrCreateChannel

      @NotNull @NotNull RadioChannel getOrCreateChannel(@NotNull @NotNull String name)
      Retrieves an existing radio channel by name, or creates a new one if it does not exist.
      Parameters:
      name - the channel name
      Returns:
      the RadioChannel
    • getChannel

      @Nullable @Nullable RadioChannel getChannel(@NotNull @NotNull String name)
      Retrieves a radio channel by name.
      Parameters:
      name - the channel name
      Returns:
      the RadioChannel, or null if not found
    • getChannelOfPlayer

      @Nullable @Nullable RadioChannel getChannelOfPlayer(@NotNull @NotNull UUID playerUuid)
      Retrieves the active radio channel a player is currently tuned into.
      Parameters:
      playerUuid - the player UUID
      Returns:
      the RadioChannel, or null if not on any radio
    • joinChannel

      void joinChannel(@NotNull @NotNull UUID playerUuid, @NotNull @NotNull String channelName)
      Tunes a player into a radio frequency channel.
      Parameters:
      playerUuid - the player UUID
      channelName - the channel name
    • leaveChannel

      void leaveChannel(@NotNull @NotNull UUID playerUuid)
      Disconnects a player from their active radio frequency channel.
      Parameters:
      playerUuid - the player UUID
    • removeChannel

      void removeChannel(@NotNull @NotNull String name)
      Deletes a radio channel by name.
      Parameters:
      name - the channel name
    • save

      void save()
      Saves all radio channels to disk.
    • load

      void load()
      Reloads saved radio channels from disk.