package com.yourname.premiumah.listener;

import com.yourname.premiumah.gui.GuiManager;
import io.papermc.paper.event.player.AsyncChatEvent;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;

public final class ChatInputListener implements Listener {
    private final GuiManager guiManager;

    public ChatInputListener(GuiManager guiManager) {
        this.guiManager = guiManager;
    }

    @EventHandler(priority = EventPriority.LOWEST)
    public void onAsyncChat(AsyncChatEvent event) {
        guiManager.handleChat(event);
    }
}
