aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java
diff options
context:
space:
mode:
authormdxd44 <ogurec332@mail.ru>2021-12-23 12:15:10 +0900
committermdxd44 <ogurec332@mail.ru>2021-12-23 12:15:10 +0900
commit5fe79b92327c082384068fa45c3b1d2691800e3d (patch)
treeae8ab7382d969baa807da7d94c2a81bff8ba0405 /src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java
parentcff1b4a22bb47c8bcf064d5e8da8c7d7ef67ea52 (diff)
downloadLimboAuth-5fe79b92327c082384068fa45c3b1d2691800e3d.tar.gz
LimboAuth-5fe79b92327c082384068fa45c3b1d2691800e3d.tar.bz2
LimboAuth-5fe79b92327c082384068fa45c3b1d2691800e3d.zip
Titles, auth time, bossbar, max and min auth time, unsafe passwords. (Closes LimboAPI#8)
Diffstat (limited to 'src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java')
-rw-r--r--src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java b/src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java
index d45eae9..2b97143 100644
--- a/src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java
+++ b/src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java
@@ -40,7 +40,7 @@ public class ForceUnregisterCommand implements SimpleCommand {
private final ProxyServer server;
private final Dao<RegisteredPlayer, String> playerDao;
- private final Component successfulPlayer;
+ private final Component kick;
private final String successful;
private final String notSuccessful;
private final Component usage;
@@ -50,7 +50,7 @@ public class ForceUnregisterCommand implements SimpleCommand {
this.server = server;
this.playerDao = playerDao;
- this.successfulPlayer = LegacyComponentSerializer.legacyAmpersand().deserialize(Settings.IMP.MAIN.STRINGS.FORCE_UNREGISTER_SUCCESSFUL_PLAYER);
+ this.kick = LegacyComponentSerializer.legacyAmpersand().deserialize(Settings.IMP.MAIN.STRINGS.FORCE_UNREGISTER_KICK);
this.successful = Settings.IMP.MAIN.STRINGS.FORCE_UNREGISTER_SUCCESSFUL;
this.notSuccessful = Settings.IMP.MAIN.STRINGS.FORCE_UNREGISTER_NOT_SUCCESSFUL;
this.usage = LegacyComponentSerializer.legacyAmpersand().deserialize(Settings.IMP.MAIN.STRINGS.FORCE_UNREGISTER_USAGE);
@@ -83,9 +83,9 @@ public class ForceUnregisterCommand implements SimpleCommand {
String playerNick = args[0];
try {
this.playerDao.deleteById(playerNick.toLowerCase(Locale.ROOT));
+ this.plugin.removePlayerFromCache(playerNick);
this.server.getPlayer(playerNick).ifPresent(player -> {
- this.plugin.removePlayerFromCache(player);
- player.disconnect(this.successfulPlayer);
+ player.disconnect(this.kick);
});
source.sendMessage(LegacyComponentSerializer.legacyAmpersand().deserialize(MessageFormat.format(this.successful, playerNick)));
} catch (SQLException e) {