mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-03 09:10:01 +01:00
#842 remove the banned country message from the server ping
Useless in my opinion, it reduced performance and may cause #842
This commit is contained in:
parent
2483f21ece
commit
1bb6270c43
@ -38,16 +38,6 @@ public class AuthMeServerListener implements Listener {
|
||||
@Inject
|
||||
private PermissionsManager permissionsManager;
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void onServerPing(ServerListPingEvent event) {
|
||||
if (settings.getProperty(ProtectionSettings.ENABLE_PROTECTION)) {
|
||||
String playerIp = event.getAddress().getHostAddress();
|
||||
if (!validationService.isCountryAdmitted(playerIp)) {
|
||||
event.setMotd(messages.retrieveSingle(MessageKey.COUNTRY_BANNED_ERROR));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void onPluginDisable(PluginDisableEvent event) {
|
||||
// Make sure the plugin instance isn't null
|
||||
|
Loading…
Reference in New Issue
Block a user