#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:
Gabriele C 2016-07-11 22:34:15 +02:00
parent 2483f21ece
commit 1bb6270c43

View File

@ -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