Fix #1401 bungeecord message sent even if disabled

This commit is contained in:
ljacqu 2017-11-04 10:17:52 +01:00
parent 80f9ec88b8
commit 7d6c61258b

View File

@ -71,12 +71,10 @@ public class BungeeService implements SettingsDependent, PluginMessageListener {
* @param player The player to send.
*/
public void connectPlayerOnLogin(Player player) {
if (!isEnabled || destinationServerOnLogin.isEmpty()) {
return;
if (isEnabled && !destinationServerOnLogin.isEmpty()) {
service.scheduleSyncDelayedTask(() ->
sendBungeecordMessage("Connect", player.getName(), destinationServerOnLogin), 20L);
}
service.scheduleSyncDelayedTask(() ->
sendBungeecordMessage("Connect", player.getName(), destinationServerOnLogin), 20L);
}
/**
@ -87,10 +85,8 @@ public class BungeeService implements SettingsDependent, PluginMessageListener {
*/
public void sendAuthMeBungeecordMessage(String type, String playerName) {
if (isEnabled) {
return;
sendBungeecordMessage("AuthMe", type, playerName.toLowerCase());
}
sendBungeecordMessage("AuthMe", type, playerName.toLowerCase());
}
@Override