Localized BedrockAutoLogin
This commit is contained in:
parent
f2ccbf72a8
commit
e69ba501da
@ -3,6 +3,8 @@ package fr.xephi.authme.listener;
|
||||
|
||||
import fr.xephi.authme.AuthMe;
|
||||
import fr.xephi.authme.api.v3.AuthMeApi;
|
||||
import fr.xephi.authme.message.MessageKey;
|
||||
import fr.xephi.authme.message.Messages;
|
||||
import fr.xephi.authme.service.BukkitService;
|
||||
import fr.xephi.authme.settings.properties.HooksSettings;
|
||||
import fr.xephi.authme.settings.properties.SecuritySettings;
|
||||
@ -23,6 +25,8 @@ public class BedrockAutoLoginListener implements Listener {
|
||||
private BukkitService bukkitService;
|
||||
@Inject
|
||||
private AuthMe plugin;
|
||||
@Inject
|
||||
private Messages messages;
|
||||
|
||||
|
||||
public BedrockAutoLoginListener() {
|
||||
@ -39,7 +43,7 @@ public class BedrockAutoLoginListener implements Listener {
|
||||
UUID uuid = event.getPlayer().getUniqueId();
|
||||
if (isBedrockPlayer(uuid) && !authmeApi.isAuthenticated(player) && authmeApi.isRegistered(name)) {
|
||||
authmeApi.forceLogin(player);
|
||||
player.sendMessage("§a基岩版自动登录完成!");
|
||||
messages.send(player, MessageKey.BEDROCK_AUTO_LOGGED_IN);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,6 @@ public class DoubleLoginFixListener implements Listener {
|
||||
|
||||
public DoubleLoginFixListener() {
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||
Collection<? extends Player> PlayerList = Bukkit.getServer().getOnlinePlayers();
|
||||
|
||||
@ -4,6 +4,11 @@ package fr.xephi.authme.message;
|
||||
* Keys for translatable messages managed by {@link Messages}.
|
||||
*/
|
||||
public enum MessageKey {
|
||||
/**
|
||||
* Bedrock auto login success!
|
||||
*/
|
||||
BEDROCK_AUTO_LOGGED_IN("bedrock_auto_login.success"),
|
||||
|
||||
/**
|
||||
* %random Verification
|
||||
*/
|
||||
|
||||
@ -150,6 +150,7 @@ public class MessageUpdater {
|
||||
.put("time", "Time units")
|
||||
.put("two_factor", "Two-factor authentication")
|
||||
.put("gui_captcha", "3rd party features: GUI Captcha")
|
||||
.put("bedrock_auto_login", "3rd party features: Bedrock Auto Login")
|
||||
.build();
|
||||
|
||||
Set<String> addedKeys = new HashSet<>();
|
||||
|
||||
@ -166,3 +166,7 @@ gui_captcha:
|
||||
denied_message_sending: '&cPlease be verified before chatting!'
|
||||
kick_on_failed: '&cPlease complete the verification!'
|
||||
kick_on_timeout: '&cVerification timed out!'
|
||||
|
||||
# 3rd party features: Bedrock Auto Login
|
||||
bedrock_auto_login:
|
||||
success: '&aBedrock auto login success!'
|
||||
|
||||
@ -175,3 +175,7 @@ gui_captcha:
|
||||
denied_message_sending: '&c请先完成验证再聊天!'
|
||||
kick_on_failed: '&c请先完成验证!'
|
||||
kick_on_timeout: '&c验证超时'
|
||||
|
||||
# 3rd party features: Bedrock Auto Login
|
||||
bedrock_auto_login:
|
||||
success: "&a基岩版自动登录完成"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user