Package net.md_5.bungee.api.event
Class LoginEvent
- java.lang.Object
-
- net.md_5.bungee.api.plugin.Event
-
- net.md_5.bungee.api.event.AsyncEvent<LoginEvent>
-
- net.md_5.bungee.api.event.LoginEvent
-
- All Implemented Interfaces:
Cancellable
public class LoginEvent extends AsyncEvent<LoginEvent> implements Cancellable
Event called to represent a player logging in.
-
-
Constructor Summary
Constructors Constructor Description LoginEvent(PendingConnection connection, Callback<LoginEvent> done)
LoginEvent(PendingConnection connection, Callback<LoginEvent> done, LoginResult loginResult)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
String
getCancelReason()
Deprecated.Use component methods instead.BaseComponent[]
getCancelReasonComponents()
Message to use when kicking if this event is canceled.PendingConnection
getConnection()
Connection attempting to login.LoginResult
getLoginResult()
The player's login result containing his texturesint
hashCode()
boolean
isCancelled()
Cancelled state.void
setCancelled(boolean cancelled)
Cancelled state.void
setCancelReason(String cancelReason)
Deprecated.void
setCancelReason(BaseComponent... cancelReason)
void
setLoginResult(LoginResult loginResult)
The player's login result containing his texturesString
toString()
-
Methods inherited from class net.md_5.bungee.api.event.AsyncEvent
completeIntent, postCall, registerIntent
-
-
-
-
Constructor Detail
-
LoginEvent
public LoginEvent(PendingConnection connection, Callback<LoginEvent> done)
-
LoginEvent
public LoginEvent(PendingConnection connection, Callback<LoginEvent> done, LoginResult loginResult)
-
-
Method Detail
-
getCancelReason
@Deprecated public String getCancelReason()
Deprecated.Use component methods instead.- Returns:
- reason to be displayed
-
setCancelReason
@Deprecated public void setCancelReason(String cancelReason)
Deprecated.- Parameters:
cancelReason
- reason to be displayed
-
setCancelReason
public void setCancelReason(BaseComponent... cancelReason)
-
isCancelled
public boolean isCancelled()
Cancelled state.- Specified by:
isCancelled
in interfaceCancellable
- Returns:
- the cancelled state of this event
-
getCancelReasonComponents
public BaseComponent[] getCancelReasonComponents()
Message to use when kicking if this event is canceled.
-
getLoginResult
public LoginResult getLoginResult()
The player's login result containing his textures
-
getConnection
public PendingConnection getConnection()
Connection attempting to login.
-
setCancelled
public void setCancelled(boolean cancelled)
Cancelled state.- Specified by:
setCancelled
in interfaceCancellable
- Parameters:
cancelled
- the state to set
-
setLoginResult
public void setLoginResult(LoginResult loginResult)
The player's login result containing his textures
-
toString
public String toString()
- Overrides:
toString
in classAsyncEvent<LoginEvent>
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classAsyncEvent<LoginEvent>
-
canEqual
protected boolean canEqual(Object other)
- Overrides:
canEqual
in classAsyncEvent<LoginEvent>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAsyncEvent<LoginEvent>
-
-