/* * This file is a part of the SteamWar software. * * Copyright (C) 2024 SteamWar.de-Serverteam * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ package de.steamwar.tntleague import de.steamwar.kotlin.message.ComponentMessage import de.steamwar.tntleague.command.AcceptCommand import de.steamwar.tntleague.command.InviteCommand import de.steamwar.tntleague.command.LeaveCommand import de.steamwar.tntleague.command.RemoveCommand import de.steamwar.tntleague.events.GlobalListener import de.steamwar.tntleague.events.LobbyListener import net.kyori.adventure.key.Key import net.kyori.adventure.translation.GlobalTranslator import net.kyori.adventure.translation.TranslationRegistry import net.kyori.adventure.util.UTF8ResourceBundleControl import org.bukkit.plugin.java.JavaPlugin import java.util.* lateinit var plugin: TNTLeague lateinit var message: ComponentMessage class TNTLeague : JavaPlugin() { init { plugin = this } override fun onEnable() { saveResource("config.yml", false) saveDefaultConfig() message = ComponentMessage("de.steamwar.tntleague.TNTLeague", classLoader) server.pluginManager.registerEvents(LobbyListener, this) server.pluginManager.registerEvents(GlobalListener, this) logger.info("TNTLeague enabled") InviteCommand.register() AcceptCommand.register() RemoveCommand.register() LeaveCommand.register() } }