fix commands being executed if player wasnt successfully on the server
This commit is contained in:
parent
75da02bd26
commit
8d532ecdae
@ -51,6 +51,11 @@ public final class Listeners {
|
|||||||
if (!configuration.isLeaveEnabled()) {
|
if (!configuration.isLeaveEnabled()) {
|
||||||
return;
|
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);}
|
if(!configuration.getLeavecmd().isEmpty())for(String s : configuration.getLeavecmd()){proxyServer.getCommandManager().executeAsync(proxyServer.getConsoleCommandSource(), s);}
|
||||||
final Player p = e.getPlayer();
|
final Player p = e.getPlayer();
|
||||||
final Optional<ServerConnection> server = p.getCurrentServer();
|
final Optional<ServerConnection> server = p.getCurrentServer();
|
||||||
|
Loading…
Reference in New Issue
Block a user