Hello. I'm looking for a way to use an AsyncPlayerPreLoginEvent in a skript.
I am not looking for a solution such as kick a player when he joins after 1ms. It is not the same thing.
I've seen skjade addon which offers such an event but doesn't offer disallow like in the code above.
Has anyone seen a solution to this problem? Thanks in advance
Code:
@EventHandler
public void onPreLogin(AsyncPlayerPreLoginEvent event) {
///
event.disallow(AsyncPlayerPreLoginEvent.Result.KICK_BANNED, "You cant join");
}
I am not looking for a solution such as kick a player when he joins after 1ms. It is not the same thing.
I've seen skjade addon which offers such an event but doesn't offer disallow like in the code above.
Has anyone seen a solution to this problem? Thanks in advance