From 97212dac465d38dbc7f4104e8a6fe0a76ada8744 Mon Sep 17 00:00:00 2001 From: Petr Ilin Date: Sun, 25 Dec 2022 16:36:08 +0300 Subject: Fire AuthUnregisterEvent on /forceunreg --- .../java/net/elytrium/limboauth/command/ForceUnregisterCommand.java | 2 ++ 1 file changed, 2 insertions(+) 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)); -- cgit