From 96234181e8edcf009a9d265d4fb49dc94c5a65ca Mon Sep 17 00:00:00 2001 From: Deichor Date: Tue, 10 Dec 2024 02:53:29 +0300 Subject: [PATCH] Added emailverified locale and config --- src/main/java/fr/xephi/authme/message/MessageKey.java | 3 +++ .../xephi/authme/settings/properties/RestrictionSettings.java | 4 ++++ src/main/resources/messages/messages_en.yml | 1 + 3 files changed, 8 insertions(+) diff --git a/src/main/java/fr/xephi/authme/message/MessageKey.java b/src/main/java/fr/xephi/authme/message/MessageKey.java index ab05738d..33ec1015 100644 --- a/src/main/java/fr/xephi/authme/message/MessageKey.java +++ b/src/main/java/fr/xephi/authme/message/MessageKey.java @@ -122,6 +122,9 @@ public enum MessageKey { /** Only registered users can join the server! Please visit http://example.com to register yourself! */ MUST_REGISTER_MESSAGE("registration.reg_only"), + /** Only users with verified email addresses can access this feature! Please check your inbox to verify your email! */ + MUST_VERIFIED_MESSAGE("email.verified_kick"), + /** You're already logged in! */ ALREADY_LOGGED_IN_ERROR("error.logged_in"), diff --git a/src/main/java/fr/xephi/authme/settings/properties/RestrictionSettings.java b/src/main/java/fr/xephi/authme/settings/properties/RestrictionSettings.java index 06eb2b55..10120dd6 100644 --- a/src/main/java/fr/xephi/authme/settings/properties/RestrictionSettings.java +++ b/src/main/java/fr/xephi/authme/settings/properties/RestrictionSettings.java @@ -100,6 +100,10 @@ public final class RestrictionSettings implements SettingsHolder { public static final Property KICK_NON_REGISTERED = newProperty("settings.restrictions.kickNonRegistered", false); + @Comment("Should unregistered players be kicked immediately?") + public static final Property KICK_NOT_VERIFIED = + newProperty("settings.restrictions.kickNotVerified", false); + @Comment("Should players be kicked on wrong password?") public static final Property KICK_ON_WRONG_PASSWORD = newProperty("settings.restrictions.kickOnWrongPassword", false); diff --git a/src/main/resources/messages/messages_en.yml b/src/main/resources/messages/messages_en.yml index 40ed034b..796bb72f 100644 --- a/src/main/resources/messages/messages_en.yml +++ b/src/main/resources/messages/messages_en.yml @@ -103,6 +103,7 @@ email: send_failure: 'The email could not be sent. Please contact an administrator.' change_password_expired: 'You cannot change your password using this command anymore.' email_cooldown_error: '&cAn email was already sent recently. You must wait %time before you can send a new one.' + verified_kick: "&cOnly users with verified email addresses can access this feature! Please check your inbox to verify your email!" # Password recovery by email recovery: