Merge pull request #10 from DaJokni/main
fix commands being executed if player wasnt successfully on the server
This commit is contained in:
commit
003ff97a95
@ -51,6 +51,11 @@ public final class Listeners {
|
||||
if (!configuration.isLeaveEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!e.getLoginStatus().equals(DisconnectEvent.LoginStatus.SUCCESSFUL_LOGIN)){
|
||||
return;
|
||||
}
|
||||
|
||||
if(!configuration.getLeavecmd().isEmpty())for(String s : configuration.getLeavecmd()){proxyServer.getCommandManager().executeAsync(proxyServer.getConsoleCommandSource(), s);}
|
||||
final Player p = e.getPlayer();
|
||||
final Optional<ServerConnection> server = p.getCurrentServer();
|
||||
|
Loading…
Reference in New Issue
Block a user