mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-27 20:57:35 +01:00
Fix #1401 bungeecord message sent even if disabled
This commit is contained in:
parent
80f9ec88b8
commit
7d6c61258b
@ -71,13 +71,11 @@ public class BungeeService implements SettingsDependent, PluginMessageListener {
|
|||||||
* @param player The player to send.
|
* @param player The player to send.
|
||||||
*/
|
*/
|
||||||
public void connectPlayerOnLogin(Player player) {
|
public void connectPlayerOnLogin(Player player) {
|
||||||
if (!isEnabled || destinationServerOnLogin.isEmpty()) {
|
if (isEnabled && !destinationServerOnLogin.isEmpty()) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
service.scheduleSyncDelayedTask(() ->
|
service.scheduleSyncDelayedTask(() ->
|
||||||
sendBungeecordMessage("Connect", player.getName(), destinationServerOnLogin), 20L);
|
sendBungeecordMessage("Connect", player.getName(), destinationServerOnLogin), 20L);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends a message to the AuthMe plugin messaging channel, if enabled.
|
* 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) {
|
public void sendAuthMeBungeecordMessage(String type, String playerName) {
|
||||||
if (isEnabled) {
|
if (isEnabled) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
sendBungeecordMessage("AuthMe", type, playerName.toLowerCase());
|
sendBungeecordMessage("AuthMe", type, playerName.toLowerCase());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPluginMessageReceived(String channel, Player player, byte[] data) {
|
public void onPluginMessageReceived(String channel, Player player, byte[] data) {
|
||||||
|
Loading…
Reference in New Issue
Block a user