public static void AutoMessageSetTimer(User user, float timerInSecond) { MOTDPlugin.autoMsg.timerInSecond = timerInSecond; MOTDPlugin.Conf.Set <AutoMessage>("AutoMessage", MOTDPlugin.autoMsg); MOTDPlugin.Reload(); ChatManager.ServerMessageToPlayer($"Successfully set the timer between each message to {timerInSecond} seconds", user); }
public static void AutoMessageOff(User user) { MOTDPlugin.autoMsg.isActive = false; MOTDPlugin.Conf.Set <AutoMessage>("AutoMessage", MOTDPlugin.autoMsg); MOTDPlugin.Reload(); ChatManager.ServerMessageToPlayer($"Auto message turn off", user); }
public static void AutoMessageAdd(User user, string newMessage) { List <string> lst = MOTDPlugin.autoMsg.messages.ToList(); lst.Add(newMessage); MOTDPlugin.autoMsg.messages = lst.ToArray(); MOTDPlugin.Conf.Set <AutoMessage>("AutoMessage", MOTDPlugin.autoMsg); MOTDPlugin.Reload(); ChatManager.ServerMessageToPlayer($"Successfully added {newMessage} to auto message list", user); }
public static void AutoMessageReload(User user) { MOTDPlugin.Reload(); ChatManager.ServerMessageToPlayer($"Auto message config successfully reloaded", user); }