ServerActivation

Represents a server activation.

Types

Link copied to clipboard
interface Builder
Builder interface for creating server activations.
Link copied to clipboard
interface Requirements
Interface for defining activation requirements.
Link copied to clipboard
enum Result
Result for activation event handlers.

Functions

Link copied to clipboard
abstract fun addPermission(@NotNull permission: @NotNull String)
Adds a permission to the activation.
Link copied to clipboard
open fun calculateAllowedDistance(distance: Int): Int
Link copied to clipboard
open fun checkDistance(distance: Int): Boolean
Link copied to clipboard
abstract fun checkPermissions(@NotNull serverPlayer: @NotNull McPlayer): Boolean
Checks if a player has any of the required permissions for the activation.
open fun checkPermissions(@NotNull player: @NotNull VoicePlayer): Boolean
Checks if a voice player has any of the required permissions for the activation.
Link copied to clipboard
open fun clearListeners()
Clears all activation listeners.
Link copied to clipboard
abstract fun clearPermissions()
Clears all permissions.
Link copied to clipboard
Clears all player activation end listeners.
Link copied to clipboard
Clears all player activation listeners.
Link copied to clipboard
Clears all player activation start listeners.
Link copied to clipboard
@NotNull
abstract fun getAddon(): @NotNull AddonContainer
Gets the addon associated with the activation.
Link copied to clipboard
abstract fun getDefaultDistance(): Int
Link copied to clipboard
abstract fun getDistances(): List<Integer>
Link copied to clipboard
Link copied to clipboard
abstract fun getIcon(): @NotNull String
Link copied to clipboard
abstract fun getId(): @NotNull UUID
Link copied to clipboard
abstract fun getMaxDistance(): Int
Link copied to clipboard
abstract fun getMinDistance(): Int
Link copied to clipboard
abstract fun getName(): @NotNull String
Link copied to clipboard
@NotNull
abstract fun getPermissions(): @NotNull Collection<String>
Gets the permissions associated with the activation.
Link copied to clipboard
@NotNull
abstract fun getRequirements(): @NotNull Optional<ServerActivation.Requirements>
Gets the optional requirements associated with the activation.
Link copied to clipboard
abstract fun getTranslation(): @NotNull String
Link copied to clipboard
open fun getWeight(): Int
Link copied to clipboard
abstract fun isProximity(): Boolean
Link copied to clipboard
Link copied to clipboard
abstract fun isTransitive(): Boolean
Link copied to clipboard
abstract fun onPlayerActivation(@NotNull activationListener: @NotNull ServerActivation.PlayerActivationListener)
Adds a new listener that will be invoked when a player uses the activation and meets all requirements:
Link copied to clipboard
abstract fun onPlayerActivationEnd(@NotNull activationEndListener: @NotNull ServerActivation.PlayerActivationEndListener)
Adds a new listener that will be invoked when a player sends PlayerAudioEndPacket and meets all requirements:
Link copied to clipboard
abstract fun onPlayerActivationStart(@NotNull activationStartListener: @NotNull ServerActivation.PlayerActivationStartListener)
Adds a new listener that will be invoked when a player starts using the activation and meets all requirements:
Link copied to clipboard
abstract fun removePermission(@NotNull permission: @NotNull String)
Removes a permission from the activation.
Link copied to clipboard
abstract fun removePlayerActivationEndListener(@NotNull activationListener: @NotNull ServerActivation.PlayerActivationEndListener): Boolean
Removes a player activation end listener.
Link copied to clipboard
abstract fun removePlayerActivationListener(@NotNull activationListener: @NotNull ServerActivation.PlayerActivationListener): Boolean
Removes a player activation listener.
Link copied to clipboard
Removes a player activation start listener.
Link copied to clipboard
abstract fun setDistances(@NotNull distances: @NotNull List<Integer>, defaultDistance: Int)
Sets the available distances for the activation.
Link copied to clipboard
abstract fun setProximity(proximity: Boolean)
Sets whether the activation has proximity output.
Link copied to clipboard
abstract fun setTransitive(transitive: Boolean)
Sets whether the activation is transitive.