Add PostLoginEvent. Resolve #72

This commit is contained in:
Leymooo
2018-09-11 16:15:54 +03:00
parent f9a98ae41c
commit 74bf246c39
2 changed files with 55 additions and 22 deletions

View File

@@ -0,0 +1,29 @@
package com.velocitypowered.api.event.connection;
import com.google.common.base.Preconditions;
import com.velocitypowered.api.proxy.Player;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* This event is fired once the player has been successfully authenticated and
* fully initialized and player will be connected to server after this event
*/
public class PostLoginEvent {
private final Player player;
public PostLoginEvent(@NonNull Player player) {
this.player = Preconditions.checkNotNull(player, "player");
}
public Player getPlayer() {
return player;
}
@Override
public String toString() {
return "PostLoginEvent{"
+ "player=" + player
+ '}';
}
}