diff --git a/src/main/java/it/ohalee/minecraftgpt/handler/PlayerHandler.java b/src/main/java/it/ohalee/minecraftgpt/handler/PlayerHandler.java new file mode 100644 index 0000000..fc119ee --- /dev/null +++ b/src/main/java/it/ohalee/minecraftgpt/handler/PlayerHandler.java @@ -0,0 +1,19 @@ +package it.ohalee.minecraftgpt.handler; + +import it.ohalee.minecraftgpt.Main; +import lombok.RequiredArgsConstructor; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerQuitEvent; + +@RequiredArgsConstructor +public class PlayerHandler implements Listener { + + private final Main plugin; + + @EventHandler + public void onQuit(PlayerQuitEvent e) { + Main.CACHE.invalidate(e.getPlayer()); + } + +}