diff --git a/README.md b/README.md index bc4c1245..fe2916eb 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ So they don't need to enter passwords. This is also called auto login (auto-logi * Plugin: ProtocolSupport is supported and can be used as an alternative to ProtocolLib * No client modifications needed * Good performance by using async non blocking operations +* Locale messages * Free * Open source diff --git a/bukkit/pom.xml b/bukkit/pom.xml index 4e8120be..74850629 100644 --- a/bukkit/pom.xml +++ b/bukkit/pom.xml @@ -101,6 +101,7 @@ com.github.lenis0012 LoginSecurity-2 + -9c09e73b7f-1 diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/commands/CrackedCommand.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/commands/CrackedCommand.java index f479ed98..a1d0c553 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/commands/CrackedCommand.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/commands/CrackedCommand.java @@ -31,7 +31,10 @@ public class CrackedCommand implements CommandExecutor { if (plugin.isBungeeCord()) { notifiyBungeeCord(sender, sender.getName()); - sender.sendMessage(plugin.getCore().getMessage("wait-on-proxy")); + String message = plugin.getCore().getMessage("wait-on-proxy"); + if (message != null) { + sender.sendMessage(message); + } } else { //todo: load async if it's not in the cache anymore final PlayerProfile profile = plugin.getCore().getStorage().loadProfile(sender.getName()); @@ -59,7 +62,10 @@ public class CrackedCommand implements CommandExecutor { if (plugin.isBungeeCord()) { notifiyBungeeCord(sender, args[0]); - sender.sendMessage(plugin.getCore().getMessage("wait-on-proxy")); + String message = plugin.getCore().getMessage("wait-on-proxy"); + if (message != null) { + sender.sendMessage(message); + } } else { //todo: load async if it's not in the cache anymore final PlayerProfile profile = plugin.getCore().getStorage().loadProfile(args[0]); diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/commands/PremiumCommand.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/commands/PremiumCommand.java index ac3fbd75..ae4310da 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/commands/PremiumCommand.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/commands/PremiumCommand.java @@ -36,7 +36,10 @@ public class PremiumCommand implements CommandExecutor { if (plugin.isBungeeCord()) { notifiyBungeeCord(sender, sender.getName()); - sender.sendMessage(plugin.getCore().getMessage("wait-on-proxy")); + String message = plugin.getCore().getMessage("wait-on-proxy"); + if (message != null) { + sender.sendMessage(message); + } } else { // //todo: load async if it's not in the cache anymore final PlayerProfile profile = plugin.getCore().getStorage().loadProfile(sender.getName()); @@ -65,7 +68,10 @@ public class PremiumCommand implements CommandExecutor { if (plugin.isBungeeCord()) { notifiyBungeeCord(sender, args[0]); - sender.sendMessage(plugin.getCore().getMessage("wait-on-proxy")); + String message = plugin.getCore().getMessage("wait-on-proxy"); + if (message != null) { + sender.sendMessage(message); + } } else { //todo: load async if it's not in the cache anymore final PlayerProfile profile = plugin.getCore().getStorage().loadProfile(args[0]); diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/tasks/ForceLoginTask.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/tasks/ForceLoginTask.java index 77280001..80906aa8 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/tasks/ForceLoginTask.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/tasks/ForceLoginTask.java @@ -89,16 +89,21 @@ public class ForceLoginTask implements Runnable { String message = plugin.getCore().getMessage("auto-register"); if (message != null) { message = message.replace("%password", generatedPassword); + player.sendMessage(message); } - player.sendMessage(message); return success; } private boolean forceLogin(BukkitAuthPlugin authPlugin, Player player) { plugin.getLogger().log(Level.FINE, "Logging player {0} in", player.getName()); boolean success = authPlugin.forceLogin(player); - player.sendMessage(plugin.getCore().getMessage("auto-login")); + + String message = plugin.getCore().getMessage("auto-login"); + if (message != null) { + player.sendMessage(message); + } + return success; }