package eu.mhsl.minenet.minigames.handler;

import eu.mhsl.minenet.minigames.handler.global.AddEntityToInstanceEventListener;
import eu.mhsl.minenet.minigames.handler.global.ChatFormatHandler;
import eu.mhsl.minenet.minigames.handler.global.PlayerLeaveHandler;
import eu.mhsl.minenet.minigames.handler.global.PlayerLoginHandler;
import net.minestom.server.MinecraftServer;
import net.minestom.server.event.EventListener;

public enum Listeners {
    SPAWN(new AddEntityToInstanceEventListener()),
    LOGIN(new PlayerLoginHandler()),
    LEAVE(new PlayerLeaveHandler()),
    CHAT(new ChatFormatHandler());

    Listeners(EventListener<?> event) {
        MinecraftServer.getGlobalEventHandler().addListener(event);
    }
}
