Block non-CPE client players.

Block non-CPE client players.

Postby Leeizazombie » 16 Jan 2014, 18:51

A simple command to block non CPE players like wom or xwom users that can't support the use of the new blocks from ClassiCube. Hope you find it useful! <ok>
Note:There's no command to activate it, once you cmdload it, it's activated.
Code: Select all
using System;
using System.Threading;

namespace MCDzienny
{
    public class CmdCPEOnly : Command
    {
        public override string name { get { return ""; } }
        public override string shortcut { get { return ""; } }
        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)
        {
            Player.SendMessage(p, "Hello World!");
        }
        public override void Init()
        {

            Player.Joined += (object sender, PlayerEventArgs e) =>
            {
                if (!e.Player.IsCpeSupported)
                {
                    e.Player.Kick("You need a CPE supported client (www.classicube.net)");
                }
            };
        }
        public override void Help(Player p)
        {
            Player.SendMessage(p, "Blocks non CPE users.");
        }
    }
}
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