AsyncPlayerPreLoginEvent
is preferred to keep the secondary threads
asynchronous.@Deprecated public class PlayerPreLoginEvent extends Event
Modifier and Type | Class and Description |
---|---|
static class |
PlayerPreLoginEvent.Result
Deprecated.
Basic kick reasons for communicating to plugins
|
Constructor and Description |
---|
PlayerPreLoginEvent(@NotNull String name,
@NotNull InetAddress ipAddress)
Deprecated.
|
PlayerPreLoginEvent(@NotNull String name,
@NotNull InetAddress ipAddress,
@NotNull UUID uniqueId)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
allow()
Deprecated.
Allows the player to log in
|
void |
disallow(@NotNull PlayerPreLoginEvent.Result result,
net.kyori.adventure.text.Component message)
Deprecated.
Disallows the player from logging in, with the given reason
|
void |
disallow(@NotNull PlayerPreLoginEvent.Result result,
@NotNull String message)
Deprecated.
|
@NotNull InetAddress |
getAddress()
Deprecated.
Gets the player IP address.
|
static @NotNull HandlerList |
getHandlerList()
Deprecated.
|
@NotNull HandlerList |
getHandlers()
Deprecated.
|
@NotNull String |
getKickMessage()
Deprecated.
in favour of
kickMessage() |
@NotNull String |
getName()
Deprecated.
Gets the player's name.
|
@NotNull PlayerPreLoginEvent.Result |
getResult()
Deprecated.
Gets the current result of the login, as an enum
|
@NotNull UUID |
getUniqueId()
Deprecated.
Gets the player's unique ID.
|
net.kyori.adventure.text.Component |
kickMessage()
Deprecated.
Gets the current kick message that will be used if getResult() !=
Result.ALLOWED
|
void |
kickMessage(net.kyori.adventure.text.Component message)
Deprecated.
Sets the kick message to display if getResult() != Result.ALLOWED
|
void |
setKickMessage(@NotNull String message)
Deprecated.
in favour of
kickMessage(net.kyori.adventure.text.Component) |
void |
setResult(@NotNull PlayerPreLoginEvent.Result result)
Deprecated.
Sets the new result of the login, as an enum
|
callEvent, getEventName, isAsynchronous
@Deprecated public PlayerPreLoginEvent(@NotNull @NotNull String name, @NotNull @NotNull InetAddress ipAddress)
@NotNull public @NotNull PlayerPreLoginEvent.Result getResult()
public void setResult(@NotNull @NotNull PlayerPreLoginEvent.Result result)
result
- New result to set@NotNull public net.kyori.adventure.text.Component kickMessage()
public void kickMessage(@NotNull net.kyori.adventure.text.Component message)
message
- New kick messagepublic void disallow(@NotNull @NotNull PlayerPreLoginEvent.Result result, @NotNull net.kyori.adventure.text.Component message)
result
- New result for disallowing the playermessage
- Kick message to display to the user@Deprecated @NotNull public @NotNull String getKickMessage()
kickMessage()
@Deprecated public void setKickMessage(@NotNull @NotNull String message)
kickMessage(net.kyori.adventure.text.Component)
message
- New kick messagepublic void allow()
@Deprecated public void disallow(@NotNull @NotNull PlayerPreLoginEvent.Result result, @NotNull @NotNull String message)
disallow(org.bukkit.event.player.PlayerPreLoginEvent.Result, net.kyori.adventure.text.Component)
result
- New result for disallowing the playermessage
- Kick message to display to the user@NotNull public @NotNull String getName()
@NotNull public @NotNull InetAddress getAddress()
@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class Event
@NotNull public @NotNull UUID getUniqueId()
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2021. All rights reserved.