Class ServerResourcePackRemoveEvent
java.lang.Object
com.velocitypowered.api.event.player.ServerResourcePackRemoveEvent
- All Implemented Interfaces:
ResultedEvent<ResultedEvent.GenericResult>
@AwaitingEvent
public class ServerResourcePackRemoveEvent
extends Object
implements ResultedEvent<ResultedEvent.GenericResult>
This event is fired when the downstream server tries to remove a resource pack from player
or clear all of them. The proxy will wait on this event to finish before forwarding the
action to the user. If this event is denied, no resource packs will be removed from player.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.velocitypowered.api.event.ResultedEvent
ResultedEvent.ComponentResult, ResultedEvent.GenericResult, ResultedEvent.Result
-
Constructor Summary
ConstructorDescriptionServerResourcePackRemoveEvent
(UUID packId, ServerConnection serverConnection) Instantiates this event. -
Method Summary
Modifier and TypeMethodDescription@Nullable UUID
Returns the id of the resource pack, if it's null all the resource packs from player will be cleared.Returns the result associated with this event.Returns the server that tries to remove a resource pack from player or clear all of them.void
setResult
(ResultedEvent.GenericResult result) Sets the result of this event.
-
Constructor Details
-
ServerResourcePackRemoveEvent
Instantiates this event.
-
-
Method Details
-
getPackId
Returns the id of the resource pack, if it's null all the resource packs from player will be cleared.- Returns:
- the id
-
getServerConnection
Returns the server that tries to remove a resource pack from player or clear all of them.- Returns:
- the server connection
-
getResult
Description copied from interface:ResultedEvent
Returns the result associated with this event.- Specified by:
getResult
in interfaceResultedEvent<ResultedEvent.GenericResult>
- Returns:
- the result of this event
-
setResult
Description copied from interface:ResultedEvent
Sets the result of this event. The result must be non-null.- Specified by:
setResult
in interfaceResultedEvent<ResultedEvent.GenericResult>
- Parameters:
result
- the new result
-