Class VoiceWiretap
java.lang.Object
fr.dreamin.dreamvoice.api.wiretap.model.VoiceWiretap
Model representing a covert spy microphone / wiretap listening point.
Can be fixed in the world or attached to moving entities with live eavesdropping and recording.
-
Constructor Summary
ConstructorsConstructorDescriptionVoiceWiretap(@NotNull String name, @NotNull org.bukkit.Location location) VoiceWiretap(@NotNull String name, @NotNull org.bukkit.entity.Entity targetEntity) VoiceWiretap(@NotNull UUID uuid, @NotNull String name, @NotNull org.bukkit.Location location) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(@NotNull UUID playerUuid) Adds an eavesdropping listener player to this wiretap.Returns an unmodifiable set of all active listener player UUIDs.@NotNull org.bukkit.LocationResolves the wiretap position, dynamically tracking the target entity if attached and valid.@NotNull List<VoiceRecording> Returns an unmodifiable list of all completed recordings from this wiretap.booleanhasListener(@NotNull UUID playerUuid) Checks whether a player is actively listening to this wiretap.booleanChecks whether this wiretap is actively attached to a valid entity.booleanChecks whether this wiretap is actively recording audio.voidremoveListener(@NotNull UUID playerUuid) Removes an eavesdropping listener player from this wiretap.@NotNull VoiceRecordingStarts secret audio recording on this wiretap.@Nullable VoiceRecordingStops active secret recording and stores the completed recording in history.
-
Constructor Details
-
VoiceWiretap
-
VoiceWiretap
public VoiceWiretap(@NotNull @NotNull String name, @NotNull @NotNull org.bukkit.entity.Entity targetEntity) -
VoiceWiretap
-
-
Method Details
-
getLocation
@NotNull public @NotNull org.bukkit.Location getLocation()Resolves the wiretap position, dynamically tracking the target entity if attached and valid.- Returns:
- current
Location
-
isAttachedToEntity
public boolean isAttachedToEntity()Checks whether this wiretap is actively attached to a valid entity.- Returns:
trueif attached
-
addListener
Adds an eavesdropping listener player to this wiretap.- Parameters:
playerUuid- the player UUID
-
removeListener
Removes an eavesdropping listener player from this wiretap.- Parameters:
playerUuid- the player UUID
-
hasListener
Checks whether a player is actively listening to this wiretap.- Parameters:
playerUuid- the player UUID- Returns:
trueif listening
-
getListeners
-
startRecording
Starts secret audio recording on this wiretap.- Returns:
- the started
VoiceRecording
-
stopRecording
Stops active secret recording and stores the completed recording in history.- Returns:
- the finished
VoiceRecording, ornullif not recording
-
isRecording
public boolean isRecording()Checks whether this wiretap is actively recording audio.- Returns:
trueif recording
-
getRecordings
Returns an unmodifiable list of all completed recordings from this wiretap.- Returns:
- list of
VoiceRecordings
-