Class KickedFromServerEvent.Notify
- java.lang.Object
-
- com.velocitypowered.api.event.player.KickedFromServerEvent.Notify
-
- All Implemented Interfaces:
KickedFromServerEvent.ServerKickResult,ResultedEvent.Result
- Enclosing class:
- KickedFromServerEvent
public static final class KickedFromServerEvent.Notify extends Object implements KickedFromServerEvent.ServerKickResult
Notifies the player with the specified message but does nothing else. This is only a valid result to use if the player was trying to connect to a different server, otherwise it is treated like aKickedFromServerEvent.DisconnectPlayerresult.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static KickedFromServerEvent.Notifycreate(Component message)Notifies the player with the specified message but does nothing else.static KickedFromServerEvent.Notifycreate(net.kyori.text.Component message)Deprecated.Usecreate(net.kyori.adventure.text.Component)insteadnet.kyori.text.ComponentgetMessage()Deprecated.ComponentgetMessageComponent()booleanisAllowed()Returns whether or not the event is allowed to proceed.
-
-
-
Method Detail
-
isAllowed
public boolean isAllowed()
Description copied from interface:ResultedEvent.ResultReturns whether or not the event is allowed to proceed. Plugins may choose to skip denied events, and the proxy will respect the result of this method.- Specified by:
isAllowedin interfaceResultedEvent.Result- Returns:
- whether or not the event is allowed to proceed
-
getMessage
@Deprecated public net.kyori.text.Component getMessage()
Deprecated.
-
getMessageComponent
public Component getMessageComponent()
-
create
@Deprecated public static KickedFromServerEvent.Notify create(net.kyori.text.Component message)
Deprecated.Usecreate(net.kyori.adventure.text.Component)insteadNotifies the player with the specified message but does nothing else.- Parameters:
message- the server to send the player to- Returns:
- the redirect result
-
create
public static KickedFromServerEvent.Notify create(Component message)
Notifies the player with the specified message but does nothing else.- Parameters:
message- the server to send the player to- Returns:
- the redirect result
-
-