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 TypeMethodDescriptionvoidaddListener(@NotNull String name, @NotNull UUID playerUuid) Subscribes a player to live eavesdropping on a wiretap.default voidaddListener(@NotNull String name, @NotNull org.bukkit.entity.Player player) voidattachToEntity(@NotNull String name, @NotNull org.bukkit.entity.Entity entity) Attaches an existing wiretap to a target entity.@NotNull VoiceWiretapcreateWiretap(@NotNull String name, @NotNull org.bukkit.Location location) Creates a static wiretap listening point at a specific location.@NotNull VoiceWiretapcreateWiretap(@NotNull String name, @NotNull org.bukkit.entity.Entity entity) Creates a mobile wiretap bug attached to an entity.voiddetachFromEntity(@NotNull String name) Detaches a wiretap from its entity, freezing its current coordinates.de.maxhenkel.voicechat.api.VoicechatServerApigetAPI()Gets the underlying VoicechatServerApi instance.@Nullable VoiceWiretapgetWiretap(@NotNull String name) Retrieves a wiretap by name.@Nullable VoiceWiretapgetWiretap(@NotNull UUID uuid) Retrieves a wiretap by UUID.@NotNull Collection<VoiceWiretap> Returns all active wiretaps.voidinit(@NotNull de.maxhenkel.voicechat.api.VoicechatServerApi api) Initializes the wiretap service with the Simple Voice Chat server API.voidload()Reloads saved wiretaps from disk.voidregister(@NotNull VoiceWiretap wiretap) Registers a wiretap into the service registry.voidremoveListener(@NotNull String name, @NotNull UUID playerUuid) Unsubscribes a player from live eavesdropping.default voidremoveListener(@NotNull String name, @NotNull org.bukkit.entity.Player player) voidremoveListenerFromAll(@NotNull UUID playerUuid) Unsubscribes a player from all active wiretaps.voidremoveWiretap(@NotNull String name) Removes a wiretap by its name.voidremoveWiretap(@NotNull UUID uuid) Removes a wiretap by its UUID.voidsave()Saves all active wiretaps to disk.@Nullable VoiceRecordingstartRecording(@NotNull String name) Starts covert audio recording on a wiretap.@Nullable VoiceRecordingstopRecording(@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 identifierlocation- 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 identifierentity- 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 nameentity- the entity to attach to
-
detachFromEntity
Detaches a wiretap from its entity, freezing its current coordinates.- Parameters:
name- the wiretap name
-
register
Registers a wiretap into the service registry.- Parameters:
wiretap- the wiretap instance
-
removeWiretap
Removes a wiretap by its name.- Parameters:
name- the wiretap name
-
removeWiretap
Removes a wiretap by its UUID.- Parameters:
uuid- the wiretap UUID
-
getWiretap
Retrieves a wiretap by name.- Parameters:
name- the wiretap name- Returns:
- the
VoiceWiretap, ornullif not found
-
getWiretap
Retrieves a wiretap by UUID.- Parameters:
uuid- the wiretap UUID- Returns:
- the
VoiceWiretap, ornullif not found
-
getWiretaps
Returns all active wiretaps.- Returns:
- collection of
VoiceWiretaps
-
addListener
-
addListener
default void addListener(@NotNull @NotNull String name, @NotNull @NotNull org.bukkit.entity.Player player) -
removeListener
-
removeListener
default void removeListener(@NotNull @NotNull String name, @NotNull @NotNull org.bukkit.entity.Player player) -
removeListenerFromAll
Unsubscribes a player from all active wiretaps.- Parameters:
playerUuid- the player UUID
-
startRecording
Starts covert audio recording on a wiretap.- Parameters:
name- the wiretap name- Returns:
- the started
VoiceRecording, ornullif wiretap not found
-
stopRecording
Stops active covert audio recording on a wiretap.- Parameters:
name- the wiretap name- Returns:
- the finished
VoiceRecording, ornullif not recording
-
save
void save()Saves all active wiretaps to disk. -
load
void load()Reloads saved wiretaps from disk.
-