Detect ClassiCube users and Remove the +

Detect ClassiCube users and Remove the +

Postby Leeizazombie » 18 Dec 2013, 00:01

I know there's already an option to remove the + from ClassiCube users, but I thought that I could it make more creative and make it tell you that the person joined with ClassiCube!
There's no command for this, once it's /cmdload it will work from there!
Hope you like it! <ok>

Code:
Code: Select all
using System;

namespace MCDzienny
{
   public class CmdCcuser : Command
   {
      public override string name { get { return ""; } }
      public override string shortcut { get { return ""; } }
      public override string type { get { return "other"; } }
      public override bool museumUsable { get { return false; } }
      public override LevelPermission defaultRank { get { return LevelPermission.Banned; } }
      public override void Use(Player p, string message)
      {
         Player.SendMessage(p, "Hello World!");
      }

        public override void Init()
        {

            Player.Joined += (object sender, PlayerEventArgs e) =>
            {
                if (e.Player.PublicName.Contains("+"))
                {
                    e.Player.PublicName = e.Player.PublicName.Replace("+", "");
                    Player.GlobalMessage("%b" + e.Player.PublicName + " %fis a ClassiCube user.");
                }
            };
        }
      public override void Help(Player p)
      {
         Player.SendMessage(p, "");
      }
   }
}
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.

Re: Detect ClassiCube users and Remove the +

Postby joppiesaus » 18 Dec 2013, 16:04

Elegant and usefull command. <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: Detect ClassiCube users and Remove the +

Postby lordmaker1234 » 18 Dec 2013, 18:51

Cool Command and helpfull if you still want to know they logged in with ClassiCube :D
lordmaker1234
 
Posts: 9
Joined: 15 Dec 2013, 18:25


Return to Custom Commands

Who is online

Users browsing this forum: No registered users and 5 guests

cron