From 00c6b17f3e5a88570f459a831c813eecb1ac34c5 Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Tue, 1 Dec 2015 15:42:02 +0100 Subject: [PATCH] Add customizable anto bot message --- .../java/fr/xephi/authme/listener/AuthMePlayerListener.java | 2 +- src/main/java/fr/xephi/authme/settings/MessageKey.java | 2 ++ src/main/resources/messages/messages_en.yml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/fr/xephi/authme/listener/AuthMePlayerListener.java b/src/main/java/fr/xephi/authme/listener/AuthMePlayerListener.java index 8400d572f..03c3f70f8 100644 --- a/src/main/java/fr/xephi/authme/listener/AuthMePlayerListener.java +++ b/src/main/java/fr/xephi/authme/listener/AuthMePlayerListener.java @@ -288,7 +288,7 @@ public class AuthMePlayerListener implements Listener { // TODO: Add message to the messages file!!! if (Settings.isKickNonRegisteredEnabled && !isAuthAvailable) { if (Settings.antiBotInAction) { - event.setKickMessage("AntiBot service in action! You actually need to be registered!"); + event.setKickMessage(m.retrieveSingle(MessageKey.KICK_ANTIBOT)); event.setResult(PlayerLoginEvent.Result.KICK_OTHER); return; } else { diff --git a/src/main/java/fr/xephi/authme/settings/MessageKey.java b/src/main/java/fr/xephi/authme/settings/MessageKey.java index 2fc1520ad..72e71b631 100644 --- a/src/main/java/fr/xephi/authme/settings/MessageKey.java +++ b/src/main/java/fr/xephi/authme/settings/MessageKey.java @@ -5,6 +5,8 @@ package fr.xephi.authme.settings; */ public enum MessageKey { + KICK_ANTIBOT("kick_antibot"), + UNKNOWN_USER("unknown_user"), UNSAFE_QUIT_LOCATION("unsafe_spawn"), diff --git a/src/main/resources/messages/messages_en.yml b/src/main/resources/messages/messages_en.yml index dd191d24c..fdb361a31 100644 --- a/src/main/resources/messages/messages_en.yml +++ b/src/main/resources/messages/messages_en.yml @@ -1,3 +1,4 @@ +kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' unknown_user: '&cCan''t find the requested user in the database!' unsafe_spawn: '&cYour quit location was unsafe, you have been teleported to the world''s spawnpoint.' not_logged_in: '&cYou''re not logged in!'