/cmddelete

/cmddelete

Postby Leeizazombie » 18 Dec 2013, 21:29

Here's just a command to add to the other cmd commands, basically deletes the .cs file so that you can add a new one and compile it over the old .dll.
I hope you find it usefull! <ok>
Code: Select all

using System;
using System.IO;

namespace MCDzienny
{
   public class CmdCmddel : Command
   {
      public override string name { get { return "cmddelete"; } }
      public override string shortcut { get { return "cmddel"; } }
      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 (File.Exists("extra/commands/source/Cmd" + message + ".cs"))
            {
                File.Delete("extra/commands/source/Cmd" + message + ".cs");
                Player.SendMessage(p, "%fCmd" + message + ".cs %ewas deleted.");
            }
            else
            {
                Player.SendMessage(p, "There is no such command.");
            }

      }
      public override void Help(Player p)
      {
         Player.SendMessage(p, "/cmddel [command] - Deletes [command].");
      }
   }
}

Owner of:
LeeIzaZombie Freebuild and Lava Survival V2 (Shut Down and updated)
LeeIzaZombie Survival (Comming back soon)

Contact:
Skype: leeizazombie
IRC: irc.geekshed.net, #leeizazombie, #mcclassichosting
User avatar
Leeizazombie
 
Posts: 536
Joined: 10 Jun 2013, 17:45
Location: Ireland.

Return to Custom Commands

Who is online

Users browsing this forum: No registered users and 1 guest

cron