public override void Unload(bool shutdown) { Command.Unregister(Command.Find("Accept")); Command.Unregister(Command.Find("Deny")); Command.Unregister(Command.Find("Divorce")); Command.Unregister(Command.Find("Marry")); OnlineStat.Stats.Remove(onlineLine); OfflineStat.Stats.Remove(offlineLine); }
public override void Unload(bool shutdown) { Command.Unregister(Command.Find("Adventure")); Command.Unregister(Command.Find("Announce")); Command.Unregister(Command.Find("Boost")); Command.Unregister(Command.Find("ListLevels")); Command.Unregister(Command.Find("MoveEverything")); Command.Unregister(Command.Find("SilentHold")); Command.Unregister(Command.Find("SilentModel")); }
public override void Unload(bool shutdown) { if (AutoReward) { OnPlayerConnectEvent.Unregister(HandlePlayerConnect); } else { Command.Unregister(Command.Find("DailyBonus")); } }
void DoBlockLoop(SchedulerTask task) { Player[] players = PlayerInfo.Online.Items; foreach (Player pl in players) { // Get MOTD of map LevelConfig cfg = LevelInfo.GetConfig(pl.level.name, out pl.level); if (!cfg.MOTD.ToLower().Contains("+hold") && !Server.Config.MOTD.Contains("+hold")) { break; } if (!pl.Model.Contains("human") && !pl.Model.Contains("hold") && !pl.Model.Contains("-own")) { break; } BlockID block = pl.GetHeldBlock(); string holding = Block.GetName(pl, block); if (pl.Extras.GetString("HOLDING_BLOCK") != holding) { int scale = block; if (scale >= 66) { scale = block - 256; // Need to convert block if ID is over 66 } if (scale >= 100) { Command.Find("SilentModel").Use(pl, "-own hold|1." + scale); } else if (scale >= 10) { Command.Find("SilentModel").Use(pl, "-own hold|1.0" + scale); } else if (scale > 0) { Command.Find("SilentModel").Use(pl, "-own hold|1.00" + scale); } else { Command.Find("SilentModel").Use(pl, "-own humanoid|1"); } } pl.Extras["HOLDING_BLOCK"] = holding; } Task = task; }
public override void Use(Player p, string message) { string[] args = message.SplitSpaces(2); if (args.Length < 2) { Help(p); return; } //Note: you can change the "%m" to any color code you want. This is just what I chose string reason = args.Length < 2 ? "" : "%m" + args[1]; string target = PlayerInfo.FindMatchesPreferOnline(p, args[0]); Command.Find("warn").Use(p, target + " %fBlacklisted from the freebuilds for: " + reason); Command.Find("send").Use(p, target + " &fYou have been blacklisted from the freebuilds for: " + reason); //The text in the warn/send can be customized, as well as the name of the maps you're choosing to blacklist them from. Command.Find("perbuild").Use(p, "freebuild " + "-" + target); Command.Find("perbuild").Use(p, "pixel " + "-" + target); Command.Find("UndoPlayer").Use(p, target + " all"); }
public override void Use(Player p, string message) { string[] args = message.SplitSpaces(2); //you can set the 3 here to be any number. int minLength = 3; if (args[0] == "") { Command.Find("Nick").Use(p, "-own"); return; } //edit text/ValidFlairs.txt to change the flairs you can use. Note that ValidFlairs.txt must be saved in UTF-8 encoding List <string> validList = Utils.ReadAllLinesList("text/ValidFlairs.txt"); if (args.Length > 1) { string nick = args[1]; string UncoloredNick = Regex.Replace(nick, @"%.", ""); string flair = args[0]; string UncoloredFlair = Regex.Replace(flair, @"%.", ""); if (!(validList.Contains(UncoloredFlair))) { p.Message("%cYou are using an invalid flair."); return; } if ((p.name).CaselessContains(UncoloredNick)) { if (UncoloredNick.Length >= minLength) { Command.Find("Nick").Use(p, "-own " + flair + " " + nick); } else { p.Message("%cYou need to have your name be " + minLength.ToString() + " characters or longer."); } } else { p.Message("%cNew name must be part of original name."); } } else { string nick = args[0]; string UncoloredNick = Regex.Replace(nick, @"%.", ""); if ((p.name).CaselessContains(UncoloredNick)) { if (UncoloredNick.Length >= 3) { Command.Find("Nick").Use(p, "-own " + nick); } else { p.Message("%cYou need to have your name be " + minLength.ToString() + " characters or longer."); } } else { p.Message("%cNew name must be part of original name."); } } }
public override void Unload(bool shutdown) { OnPlayerConnectEvent.Unregister(HandlePlayerConnect); Command.Unregister(Command.Find("SilentModel")); Server.MainScheduler.Cancel(Task); }
public override void Unload(bool shutdown) { Command.Unregister(Command.Find("TimeAFK")); }
public override void Use(Player p, string message, CommandData data) { Command.Find("Map").Use(p, "buildable"); Command.Find("Map").Use(p, "deletable"); }
public override void Unload(bool shutdown) { Command.Unregister(Command.Find("Something")); }
public override void Unload(bool shutdown) { OnChannelMessageEvent.Unregister(HandleDiscordMessage); Command.Unregister(Command.Find("Verify")); }
public override void Use(Player p, string message, CommandData data) { Command.Find("Nick").Use(p, "bot " + message); }