- Code: Select all
//xEliminate By Bboy505 : Some code references to LeeIzaZombie's kick-hacker
using System;
using System.Threading;
namespace MCDzienny
{
public class CmdXeliminate : Command
{
public override string name { get { return "xeliminate"; } }
public override string shortcut { get { return "xelm"; } }
public override string type { get { return "mod"; } }
public override bool museumUsable { get { return false; } }
public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }
public override void Use(Player p, string message)
{
if (String.IsNullOrEmpty(message) || message.IndexOf(' ') != -1) { Help(p); return; }
Player who = Player.Find(message);
if (who == null)
{
Player.SendMessage(p, "Player not found.");
return;
}
{
//Beginning of player elimination
Player.GlobalMessage("&cEliminating Player: " + " " + who.color + who.PublicName + "&c");
Command.all.Find("mute").Use(p, who.PublicName);
Command.all.Find("jail").Use(p, who.PublicName);
Command.all.Find("freeze").Use(p, who.PublicName);
Command.all.Find("ban").Use(p, who.PublicName);
Player.SendMessage(who, "&2xEliminating Player: :" + " " + who.color + who.PublicName + "&2");
//Thread sleep set to 10000 to allow staff to give xeliminate reasoning to the player
Thread.Sleep(10000);
Command.all.Find("kick").Use(p, who.PublicName);
}
}
public override void Help(Player p)
{
Player.SendMessage(p, "/xeliminate - Permanently Eliminates an online player from the server.");
}
}
}
Mainly made for use in freebuilds but can also be used in other settings.
(Bboy's First Published Cmd )