1
0
mirror of https://github.com/LOOHP/Limbo.git synced 2026-06-08 05:51:43 +00:00
This commit is contained in:
LOOHP
2021-04-06 21:14:05 +08:00
parent 05cfdb73a9
commit 6d14314bd9
126 changed files with 191394 additions and 0 deletions
@@ -0,0 +1,43 @@
package com.loohp.limbo.events.player;
import com.loohp.limbo.events.Cancellable;
import com.loohp.limbo.events.Event;
import com.loohp.limbo.server.ClientConnection;
import net.md_5.bungee.api.chat.BaseComponent;
public class PlayerLoginEvent extends Event implements Cancellable {
private ClientConnection connection;
private boolean cancelled;
private BaseComponent[] cancelReason;
public PlayerLoginEvent(ClientConnection connection, boolean cancelled, BaseComponent... cancelReason) {
this.connection = connection;
this.cancelled = cancelled;
this.cancelReason = cancelReason;
}
public ClientConnection getConnection() {
return connection;
}
public BaseComponent[] getCancelReason() {
return cancelReason;
}
public void setCancelReason(BaseComponent... cancelReason) {
this.cancelReason = cancelReason;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
@Override
public boolean isCancelled() {
return cancelled;
}
}