package eu.m724.tweaks; import eu.m724.tweaks.chat.ChatCommands; import eu.m724.tweaks.chat.ChatManager; import eu.m724.tweaks.door.DoorListener; import eu.m724.tweaks.ping.F3NameListener; import eu.m724.tweaks.ping.PingChecker; import eu.m724.tweaks.ping.PingCommands; import org.bukkit.plugin.java.JavaPlugin; import java.util.Objects; public class TweaksPlugin extends JavaPlugin { @Override public void onEnable() { ChatManager chatManager = new ChatManager(this); chatManager.init(); ChatCommands chatCommands = new ChatCommands(chatManager); Objects.requireNonNull(getCommand("chat")).setExecutor(chatCommands); Objects.requireNonNull(getCommand("chatmanage")).setExecutor(chatCommands); getServer().getPluginManager().registerEvents(new DoorListener(), this); new F3NameListener(this).init(); new PingChecker(this).init(); Objects.requireNonNull(getCommand("ping")).setExecutor(new PingCommands()); Objects.requireNonNull(getCommand("dkick")).setExecutor(new PingCommands()); } }