Interface VoiceRoomService
public interface VoiceRoomService
Service managing acoustic rooms, soundproofing boundaries, and spatial reverberation zones.
-
Method Summary
Modifier and TypeMethodDescriptiondoublecalculateRoomAttenuationDb(@NotNull UUID senderUuid, @NotNull UUID receiverUuid) Checks whether two players can hear each other taking acoustic room boundaries into account.intgetEffectiveIsolation(@NotNull AcousticRoom room) Returns effective sound isolation percentage for a given room (0 to 100).@NotNull Optional<AcousticRoom> getPlayerRoom(@NotNull UUID playerUuid) Finds the acoustic room a player is currently located in.@NotNull Optional<RoomPreset> Retrieves an acoustic preset by ID.@NotNull Collection<RoomPreset> Retrieves all available room presets.@NotNull Optional<AcousticRoom> Retrieves an acoustic room by its identifier.@NotNull Optional<AcousticRoom> getRoomAt(@NotNull org.bukkit.Location location) Finds the acoustic room encompassing a specific world location.@NotNull Collection<AcousticRoom> getRooms()Retrieves all registered acoustic rooms.voidregisterPreset(@NotNull RoomPreset preset) Registers or updates an acoustic preset.voidregisterRoom(@NotNull AcousticRoom room) Registers a new acoustic room.voidreload()Reloads rooms and presets configuration.voidsave()Saves rooms data to storage.voidunregisterRoom(@NotNull String roomId) Deletes an acoustic room by ID.
-
Method Details
-
registerRoom
Registers a new acoustic room.- Parameters:
room- the room instance
-
unregisterRoom
Deletes an acoustic room by ID.- Parameters:
roomId- room identifier
-
getRoom
Retrieves an acoustic room by its identifier.- Parameters:
roomId- room identifier- Returns:
- optional room
-
getRooms
Retrieves all registered acoustic rooms.- Returns:
- collection of rooms
-
getRoomAt
Finds the acoustic room encompassing a specific world location.- Parameters:
location- world location- Returns:
- optional room
-
getPlayerRoom
Finds the acoustic room a player is currently located in.- Parameters:
playerUuid- player UUID- Returns:
- optional room
-
registerPreset
Registers or updates an acoustic preset.- Parameters:
preset- preset definition
-
getPreset
Retrieves an acoustic preset by ID.- Parameters:
presetId- preset ID- Returns:
- optional preset
-
getPresets
Retrieves all available room presets.- Returns:
- collection of presets
-
getEffectiveIsolation
Returns effective sound isolation percentage for a given room (0 to 100).- Parameters:
room- acoustic room- Returns:
- isolation percentage
-
calculateRoomAttenuationDb
double calculateRoomAttenuationDb(@NotNull @NotNull UUID senderUuid, @NotNull @NotNull UUID receiverUuid) Checks whether two players can hear each other taking acoustic room boundaries into account.- Parameters:
senderUuid- sender player UUIDreceiverUuid- receiver player UUID- Returns:
- attenuation loss in decibels (e.g. 0.0 for direct, 100.0 for completely blocked)
-
reload
void reload()Reloads rooms and presets configuration. -
save
void save()Saves rooms data to storage.
-