public class AsyncPlayerPreLoginEvent extends Event
This event is asynchronous, and not run using main thread.
Modifier and Type | Class and Description |
---|---|
static class |
AsyncPlayerPreLoginEvent.Result
Basic kick reasons for communicating to plugins
|
Constructor and Description |
---|
AsyncPlayerPreLoginEvent(@NotNull String name,
@NotNull InetAddress ipAddress)
Deprecated.
|
AsyncPlayerPreLoginEvent(@NotNull String name,
@NotNull InetAddress ipAddress,
@NotNull InetAddress rawAddress,
@NotNull UUID uniqueId,
@NotNull PlayerProfile profile) |
AsyncPlayerPreLoginEvent(@NotNull String name,
@NotNull InetAddress ipAddress,
@NotNull UUID uniqueId) |
AsyncPlayerPreLoginEvent(@NotNull String name,
@NotNull InetAddress ipAddress,
@NotNull UUID uniqueId,
@NotNull PlayerProfile profile)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
allow()
Allows the player to log in
|
void |
disallow(@NotNull AsyncPlayerPreLoginEvent.Result result,
net.kyori.adventure.text.Component message)
Disallows the player from logging in, with the given reason
|
void |
disallow(@NotNull AsyncPlayerPreLoginEvent.Result result,
@NotNull String message)
|
void |
disallow(PlayerPreLoginEvent.Result result,
net.kyori.adventure.text.Component message)
Deprecated.
This method uses a deprecated enum from
PlayerPreLoginEvent |
void |
disallow(PlayerPreLoginEvent.Result result,
@NotNull String message)
Deprecated.
This method uses a deprecated enum from
PlayerPreLoginEvent |
@NotNull InetAddress |
getAddress()
Gets the player IP address.
|
static @NotNull HandlerList |
getHandlerList() |
@NotNull HandlerList |
getHandlers() |
@NotNull String |
getKickMessage()
Deprecated.
in favour of
kickMessage() |
@NotNull AsyncPlayerPreLoginEvent.Result |
getLoginResult()
Gets the current result of the login, as an enum
|
@NotNull String |
getName()
Gets the player's name.
|
@NotNull PlayerProfile |
getPlayerProfile()
Gets the PlayerProfile of the player logging in
|
@NotNull InetAddress |
getRawAddress()
Gets the raw address of the player logging in
|
PlayerPreLoginEvent.Result |
getResult()
Deprecated.
This method uses a deprecated enum from
PlayerPreLoginEvent |
@NotNull UUID |
getUniqueId()
Gets the player's unique ID.
|
net.kyori.adventure.text.Component |
kickMessage()
Gets the current kick message that will be used if getResult() !=
Result.ALLOWED
|
void |
kickMessage(net.kyori.adventure.text.Component message)
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 |
setLoginResult(@NotNull AsyncPlayerPreLoginEvent.Result result)
Sets the new result of the login, as an enum
|
void |
setPlayerProfile(@NotNull PlayerProfile profile) |
void |
setResult(PlayerPreLoginEvent.Result result)
Deprecated.
This method uses a deprecated enum from
PlayerPreLoginEvent |
callEvent, getEventName, isAsynchronous
@Deprecated public AsyncPlayerPreLoginEvent(@NotNull @NotNull String name, @NotNull @NotNull InetAddress ipAddress)
public AsyncPlayerPreLoginEvent(@NotNull @NotNull String name, @NotNull @NotNull InetAddress ipAddress, @NotNull @NotNull UUID uniqueId)
@Deprecated public AsyncPlayerPreLoginEvent(@NotNull @NotNull String name, @NotNull @NotNull InetAddress ipAddress, @NotNull @NotNull UUID uniqueId, @NotNull @NotNull PlayerProfile profile)
public AsyncPlayerPreLoginEvent(@NotNull @NotNull String name, @NotNull @NotNull InetAddress ipAddress, @NotNull @NotNull InetAddress rawAddress, @NotNull @NotNull UUID uniqueId, @NotNull @NotNull PlayerProfile profile)
@NotNull public @NotNull PlayerProfile getPlayerProfile()
public void setPlayerProfile(@NotNull @NotNull PlayerProfile profile)
@NotNull public @NotNull InetAddress getRawAddress()
@NotNull public @NotNull AsyncPlayerPreLoginEvent.Result getLoginResult()
@Deprecated @NotNull public PlayerPreLoginEvent.Result getResult()
PlayerPreLoginEvent
getLoginResult()
public void setLoginResult(@NotNull @NotNull AsyncPlayerPreLoginEvent.Result result)
result
- New result to set@Deprecated public void setResult(@NotNull PlayerPreLoginEvent.Result result)
PlayerPreLoginEvent
result
- New result to setsetLoginResult(Result)
@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 AsyncPlayerPreLoginEvent.Result result, @NotNull net.kyori.adventure.text.Component message)
result
- New result for disallowing the playermessage
- Kick message to display to the user@Deprecated public void disallow(@NotNull PlayerPreLoginEvent.Result result, @NotNull net.kyori.adventure.text.Component message)
PlayerPreLoginEvent
result
- New result for disallowing the playermessage
- Kick message to display to the userdisallow(Result, String)
@NotNull @Deprecated 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 AsyncPlayerPreLoginEvent.Result result, @NotNull @NotNull String message)
disallow(org.bukkit.event.player.AsyncPlayerPreLoginEvent.Result, net.kyori.adventure.text.Component)
result
- New result for disallowing the playermessage
- Kick message to display to the user@Deprecated public void disallow(@NotNull PlayerPreLoginEvent.Result result, @NotNull @NotNull String message)
PlayerPreLoginEvent
result
- New result for disallowing the playermessage
- Kick message to display to the userdisallow(Result, String)
@NotNull public @NotNull String getName()
@NotNull public @NotNull InetAddress getAddress()
@NotNull public @NotNull UUID getUniqueId()
@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2021. All rights reserved.