diff options
author | Petr Ilin <hevav@hevav.dev> | 2022-12-25 16:36:08 +0300 |
---|---|---|
committer | Petr Ilin <hevav@hevav.dev> | 2022-12-25 16:36:08 +0300 |
commit | 97212dac465d38dbc7f4104e8a6fe0a76ada8744 (patch) | |
tree | da2b3dd355825b3f8223331f944927dfdfb57b41 | |
parent | 244a5ea0a6f1712e1781bdd391da602f7f6d93b1 (diff) | |
download | LimboAuth-97212dac465d38dbc7f4104e8a6fe0a76ada8744.tar.gz LimboAuth-97212dac465d38dbc7f4104e8a6fe0a76ada8744.tar.bz2 LimboAuth-97212dac465d38dbc7f4104e8a6fe0a76ada8744.zip |
Fire AuthUnregisterEvent on /forceunreg
-rw-r--r-- | src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java b/src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java index 2fd12ca..72b11a9 100644 --- a/src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java +++ b/src/main/java/net/elytrium/limboauth/command/ForceUnregisterCommand.java @@ -29,6 +29,7 @@ import net.elytrium.java.commons.mc.serialization.Serializer; import net.elytrium.java.commons.mc.velocity.commands.SuggestUtils; import net.elytrium.limboauth.LimboAuth; import net.elytrium.limboauth.Settings; +import net.elytrium.limboauth.event.AuthUnregisterEvent; import net.elytrium.limboauth.model.RegisteredPlayer; import net.kyori.adventure.text.Component; @@ -70,6 +71,7 @@ public class ForceUnregisterCommand implements SimpleCommand { Serializer serializer = LimboAuth.getSerializer(); try { + this.plugin.getServer().getEventManager().fireAndForget(new AuthUnregisterEvent(playerNick)); this.playerDao.deleteById(playerNick.toLowerCase(Locale.ROOT)); this.plugin.removePlayerFromCache(playerNick); this.server.getPlayer(playerNick).ifPresent(player -> player.disconnect(this.kick)); |