Record Class ServerUnregisteredEvent
java.lang.Object
java.lang.Record
com.velocitypowered.api.event.proxy.server.ServerUnregisteredEvent
- Record Components:
unregisteredServer
- ARegisteredServer
that has been unregistered.
@Beta
public record ServerUnregisteredEvent(@NotNull RegisteredServer unregisteredServer)
extends Record
This event is fired by the proxy after a backend server is unregistered from the server map.
Currently, it may occur when a server is unregistered dynamically at runtime
or when a server is replaced due to configuration reload.
- Since:
- 3.3.0
- See Also:
-
Constructor Summary
ConstructorDescriptionServerUnregisteredEvent
(@NotNull RegisteredServer unregisteredServer) Creates an instance of aServerUnregisteredEvent
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.@NotNull RegisteredServer
Returns the value of theunregisteredServer
record component.
-
Constructor Details
-
ServerUnregisteredEvent
Creates an instance of aServerUnregisteredEvent
record class.- Parameters:
unregisteredServer
- the value for theunregisteredServer
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
unregisteredServer
Returns the value of theunregisteredServer
record component.- Returns:
- the value of the
unregisteredServer
record component
-