Interface VoiceRadioService
public interface VoiceRadioService
Service managing radio channels, frequency tuning, Roger Beep feedback, and radio transmission routing.
-
Method Summary
Modifier and TypeMethodDescription@Nullable RadioChannelgetChannel(@NotNull String name) Retrieves a radio channel by name.@Nullable RadioChannelgetChannelOfPlayer(@NotNull UUID playerUuid) Retrieves the active radio channel a player is currently tuned into.@NotNull Collection<RadioChannel> Returns all active radio frequency channels.@NotNull RadioChannelgetOrCreateChannel(@NotNull String name) Retrieves an existing radio channel by name, or creates a new one if it does not exist.voidinit(@NotNull de.maxhenkel.voicechat.api.VoicechatServerApi api) Initializes the radio service with the Simple Voice Chat server API.voidjoinChannel(@NotNull UUID playerUuid, @NotNull String channelName) Tunes a player into a radio frequency channel.voidleaveChannel(@NotNull UUID playerUuid) Disconnects a player from their active radio frequency channel.voidload()Reloads saved radio channels from disk.voidremoveChannel(@NotNull String name) Deletes a radio channel by name.voidsave()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
Returns all active radio frequency channels.- Returns:
- collection of
RadioChannels
-
getOrCreateChannel
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
Retrieves a radio channel by name.- Parameters:
name- the channel name- Returns:
- the
RadioChannel, ornullif not found
-
getChannelOfPlayer
Retrieves the active radio channel a player is currently tuned into.- Parameters:
playerUuid- the player UUID- Returns:
- the
RadioChannel, ornullif not on any radio
-
joinChannel
-
leaveChannel
Disconnects a player from their active radio frequency channel.- Parameters:
playerUuid- the player UUID
-
removeChannel
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.
-