public override void Load(bool startup) { config.LoadConfig(); if (config.Token == "" || config.ChannelID == "") { Logger.Log(LogType.Warning, "Invalid config! Please setup the Discord bot in discord.properties! (plugin reload required)"); return; } dc = new Discord.Discord(config.Token, config.ChannelID); OnPlayerConnectEvent.Register(PlayerConnect, Priority.Low); OnPlayerDisconnectEvent.Register(PlayerDisconnect, Priority.Low); OnPlayerChatEvent.Register(PlayerChat, Priority.Low); OnPlayerCommandEvent.Register(PlayerCommand, Priority.Low); OnModActionEvent.Register(ModAction, Priority.Low); OnMessageReceivedEvent.Register(DiscordMessage, Priority.Low); Command.Register(new CmdDiscordBot()); registered = true; }
public override void Load(bool startup) { OnPlayerConnectEvent.Register(DoKickJini, Priority.High); }
public override void Load(bool startup) { OnPlayerConnectEvent.Register(DisableNagle, Priority.High); }
public override void Load(bool startup) { whitelist = PlayerList.Load("extra/vpnwhitelist.txt"); OnPlayerConnectEvent.Register(HandlePlayerConnect, Priority.Low); }