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,13 +71,11 @@ 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);
}
}
/**
* Sends a message to the AuthMe plugin messaging channel, if enabled.
@ -87,11 +85,9 @@ public class BungeeService implements SettingsDependent, PluginMessageListener {
*/
public void sendAuthMeBungeecordMessage(String type, String playerName) {
if (isEnabled) {
return;
}
sendBungeecordMessage("AuthMe", type, playerName.toLowerCase());
}
}
@Override
public void onPluginMessageReceived(String channel, Player player, byte[] data) {