/xeliminate

/xeliminate

Postby Bboy505 » 28 Sep 2013, 01:21

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 :D)
Founder of McClassicHosting
Need to contact me? Visit:
irc.geekshed.net
#mcclassichosting, #Panda
Bboy505
 
Posts: 13
Joined: 24 Jun 2013, 01:24

Re: /xeliminate

Postby HETAL » 28 Sep 2013, 02:07

Nice Job, you might want to change the ban to banip
YOU HAVENT SEEN THE LAST OF ME ISMELLIKE
HETAL
 
Posts: 397
Joined: 24 May 2013, 12:10

Re: /xeliminate

Postby joppiesaus » 28 Sep 2013, 09:18

Nice, but if you ban something... they get automaticly kicked, right?
Anyways, nice command. Keep it up <ok>
joppiesaus
 
Posts: 379
Joined: 20 Aug 2012, 07:28
Location: in a obsedian house, with glass in it so i can see the lava!

Re: /xeliminate

Postby dzienny » 29 Sep 2013, 10:56

Congratulations on your first published command. My first custom comand looked very similar ;)
User avatar
dzienny
Administrator
 
Posts: 1181
Joined: 23 Jan 2011, 14:27


Return to Custom Commands

Who is online

Users browsing this forum: No registered users and 3 guests

cron