Interface VoiceWiretapService


public interface VoiceWiretapService
Service managing covert spy microphones, spatial eavesdropping subscriptions, mobile entity bug tracking, and direct cassette recording.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addListener(@NotNull String name, @NotNull UUID playerUuid)
    Subscribes a player to live eavesdropping on a wiretap.
    default void
    addListener(@NotNull String name, @NotNull org.bukkit.entity.Player player)
     
    void
    attachToEntity(@NotNull String name, @NotNull org.bukkit.entity.Entity entity)
    Attaches an existing wiretap to a target entity.
    @NotNull VoiceWiretap
    createWiretap(@NotNull String name, @NotNull org.bukkit.Location location)
    Creates a static wiretap listening point at a specific location.
    @NotNull VoiceWiretap
    createWiretap(@NotNull String name, @NotNull org.bukkit.entity.Entity entity)
    Creates a mobile wiretap bug attached to an entity.
    void
    detachFromEntity(@NotNull String name)
    Detaches a wiretap from its entity, freezing its current coordinates.
    de.maxhenkel.voicechat.api.VoicechatServerApi
    Gets the underlying VoicechatServerApi instance.
    @Nullable VoiceWiretap
    getWiretap(@NotNull String name)
    Retrieves a wiretap by name.
    @Nullable VoiceWiretap
    getWiretap(@NotNull UUID uuid)
    Retrieves a wiretap by UUID.
    Returns all active wiretaps.
    void
    init(@NotNull de.maxhenkel.voicechat.api.VoicechatServerApi api)
    Initializes the wiretap service with the Simple Voice Chat server API.
    void
    Reloads saved wiretaps from disk.
    void
    register(@NotNull VoiceWiretap wiretap)
    Registers a wiretap into the service registry.
    void
    removeListener(@NotNull String name, @NotNull UUID playerUuid)
    Unsubscribes a player from live eavesdropping.
    default void
    removeListener(@NotNull String name, @NotNull org.bukkit.entity.Player player)
     
    void
    removeListenerFromAll(@NotNull UUID playerUuid)
    Unsubscribes a player from all active wiretaps.
    void
    removeWiretap(@NotNull String name)
    Removes a wiretap by its name.
    void
    removeWiretap(@NotNull UUID uuid)
    Removes a wiretap by its UUID.
    void
    Saves all active wiretaps to disk.
    @Nullable VoiceRecording
    startRecording(@NotNull String name)
    Starts covert audio recording on a wiretap.
    @Nullable VoiceRecording
    stopRecording(@NotNull String name)
    Stops active covert audio recording on a wiretap.
  • Method Details

    • init

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

      de.maxhenkel.voicechat.api.VoicechatServerApi getAPI()
      Gets the underlying VoicechatServerApi instance.
      Returns:
      the active API instance
    • createWiretap

      @NotNull @NotNull VoiceWiretap createWiretap(@NotNull @NotNull String name, @NotNull @NotNull org.bukkit.Location location)
      Creates a static wiretap listening point at a specific location.
      Parameters:
      name - the wiretap identifier
      location - the location in world
      Returns:
      the created VoiceWiretap
    • createWiretap

      @NotNull @NotNull VoiceWiretap createWiretap(@NotNull @NotNull String name, @NotNull @NotNull org.bukkit.entity.Entity entity)
      Creates a mobile wiretap bug attached to an entity.
      Parameters:
      name - the wiretap identifier
      entity - the entity to attach to
      Returns:
      the created VoiceWiretap
    • attachToEntity

      void attachToEntity(@NotNull @NotNull String name, @NotNull @NotNull org.bukkit.entity.Entity entity)
      Attaches an existing wiretap to a target entity.
      Parameters:
      name - the wiretap name
      entity - the entity to attach to
    • detachFromEntity

      void detachFromEntity(@NotNull @NotNull String name)
      Detaches a wiretap from its entity, freezing its current coordinates.
      Parameters:
      name - the wiretap name
    • register

      void register(@NotNull @NotNull VoiceWiretap wiretap)
      Registers a wiretap into the service registry.
      Parameters:
      wiretap - the wiretap instance
    • removeWiretap

      void removeWiretap(@NotNull @NotNull String name)
      Removes a wiretap by its name.
      Parameters:
      name - the wiretap name
    • removeWiretap

      void removeWiretap(@NotNull @NotNull UUID uuid)
      Removes a wiretap by its UUID.
      Parameters:
      uuid - the wiretap UUID
    • getWiretap

      @Nullable @Nullable VoiceWiretap getWiretap(@NotNull @NotNull String name)
      Retrieves a wiretap by name.
      Parameters:
      name - the wiretap name
      Returns:
      the VoiceWiretap, or null if not found
    • getWiretap

      @Nullable @Nullable VoiceWiretap getWiretap(@NotNull @NotNull UUID uuid)
      Retrieves a wiretap by UUID.
      Parameters:
      uuid - the wiretap UUID
      Returns:
      the VoiceWiretap, or null if not found
    • getWiretaps

      @NotNull @NotNull Collection<VoiceWiretap> getWiretaps()
      Returns all active wiretaps.
      Returns:
      collection of VoiceWiretaps
    • addListener

      void addListener(@NotNull @NotNull String name, @NotNull @NotNull UUID playerUuid)
      Subscribes a player to live eavesdropping on a wiretap.
      Parameters:
      name - the wiretap name
      playerUuid - the player UUID
    • addListener

      default void addListener(@NotNull @NotNull String name, @NotNull @NotNull org.bukkit.entity.Player player)
    • removeListener

      void removeListener(@NotNull @NotNull String name, @NotNull @NotNull UUID playerUuid)
      Unsubscribes a player from live eavesdropping.
      Parameters:
      name - the wiretap name
      playerUuid - the player UUID
    • removeListener

      default void removeListener(@NotNull @NotNull String name, @NotNull @NotNull org.bukkit.entity.Player player)
    • removeListenerFromAll

      void removeListenerFromAll(@NotNull @NotNull UUID playerUuid)
      Unsubscribes a player from all active wiretaps.
      Parameters:
      playerUuid - the player UUID
    • startRecording

      @Nullable @Nullable VoiceRecording startRecording(@NotNull @NotNull String name)
      Starts covert audio recording on a wiretap.
      Parameters:
      name - the wiretap name
      Returns:
      the started VoiceRecording, or null if wiretap not found
    • stopRecording

      @Nullable @Nullable VoiceRecording stopRecording(@NotNull @NotNull String name)
      Stops active covert audio recording on a wiretap.
      Parameters:
      name - the wiretap name
      Returns:
      the finished VoiceRecording, or null if not recording
    • save

      void save()
      Saves all active wiretaps to disk.
    • load

      void load()
      Reloads saved wiretaps from disk.