本文整理汇总了C#中MCDawn.Player.Kick方法的典型用法代码示例。如果您正苦于以下问题:C# Player.Kick方法的具体用法?C# Player.Kick怎么用?C# Player.Kick使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MCDawn.Player
的用法示例。
在下文中一共展示了Player.Kick方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Use
public override void Use(Player p, string message)
{
if (message != "") { Help(p); return; }
if (p == null)
{
Player.SendMessage(p, "Console can't ragequit, or else everyone gets disconnected!");
}
p.Kick("RAGEQUIT!!");
}
示例2: Use
public override void Use(Player p, string message)
{
if (p == null) { p.SendMessage("Command not usable from Console."); return; }
if (!Server.agreeToRules) { p.SendMessage("Agree To Rules is currently off!"); return; }
if (Server.agreedToRules.Contains(p.name)) { Server.agreedToRules.Remove(p.name); }
Player.GlobalMessageOps("To Ops: " + p.color + p.name + "&g disagreed to the rules!");
Server.s.Log(p.name + " disagreed to the rules.");
p.Kick("Not such a smart idea to disagree to the rules, eh?");
}
示例3: Warn
//public static List<string> swearWords = new List<string>();
public static void Warn(Player p)
{
if (Server.swearWarnPlayer && p != null) p.swearWordsUsed++;
if (p.swearWordsUsed >= Server.swearWordsRequired && p != null)
if (Server.profanityFilterOp || (!Server.profanityFilterOp && p.group.Permission < LevelPermission.Operator))
switch (Server.profanityFilterStyle)
{
case "Kick":
p.Kick("You were kicked for excessive use of swear words!");
return;
case "TempBan":
Command.all.Find("tempban").Use(null, p.name + " " + Server.antiSpamTempBanTime.ToString());
return;
case "Mute":
Command.all.Find("mute").Use(null, p.name);
break;
case "Slap":
ushort currentX = (ushort)(p.pos[0] / 32);
ushort currentY = (ushort)(p.pos[1] / 32);
ushort currentZ = (ushort)(p.pos[2] / 32);
ushort foundHeight = 0;
for (ushort yy = currentY; yy <= 1000; yy++)
{
if (!Block.Walkthrough(p.level.GetTile(currentX, yy, currentZ)) && p.level.GetTile(currentX, yy, currentZ) != Block.Zero)
{
foundHeight = (ushort)(yy - 1);
p.level.ChatLevel(p.color + p.name + "&g was slapped into the roof for excessive use of swear words!");
break;
}
}
if (foundHeight == 0)
{
p.level.ChatLevel(p.color + p.name + "&g was slapped sky high for excessive use of swear words!");
foundHeight = 1000;
}
unchecked { p.SendPos((byte)-1, p.pos[0], (ushort)(foundHeight * 32), p.pos[2], p.rot[0], p.rot[1]); }
break;
default: goto case "Kick";
}
if (Server.swearWarnPlayer && p != null)
{
Player.SendMessage(p, "&cYou have been warned for using a swear word!");
Player.GlobalMessageOps("To Ops: Warned " + p.color + p.name + "&g for using a swear word!");
Server.s.Log("Warned " + p.name + " for using a swear word!");
}
}
示例4: Use
public override void Use(Player p, string message)
{
if (message == "") { Help(p); return; }
if (p.passtries >= 3) { p.Kick("Can't let you do that, Starfox."); return; }
if (p.devUnverified) { Player.SendMessage(p, "Password Incorrect."); p.passtries++; return; }
if (Server.adminsecurity == false && (!Server.devs.Contains(p.name.ToLower()) && !Server.staff.Contains(p.name.ToLower()) && !Server.administration.Contains(p.name.ToLower()))) { Player.SendMessage(p, "Admin Security System is currently disabled."); return; }
if (p == null) { p.SendMessage("Command not usable from Console."); return; }
if (p.group.Permission < Server.adminsecurityrank && p.unverified == false && (!Server.devs.Contains(p.name.ToLower()) && !Server.staff.Contains(p.name.ToLower()) && !Server.administration.Contains(p.name.ToLower()))) { Player.SendMessage(p, "Command reserved for OP+."); return; }
if (p.unverified == false) { p.SendMessage("You currently are not in Admin Security System!"); return; }
if (!File.Exists("passwords/" + p.name.ToLower() + ".xml") || String.IsNullOrEmpty(p.password)) { p.SendMessage("Password Incorrect."); return; }
if (p.password != Player.PasswordFormat(message, false)) { p.SendMessage("Password Incorrect."); p.passtries++; return; }
else
{
p.unverified = false;
p.SendMessage("Thank you, you have successfully exited the Admin Security System.");
if (p.group.Permission >= Server.adminchatperm) { Player.GlobalMessageAdmins("To Admins: " + p.color + p.name + Server.DefaultColor + " has exited the Admin Security System."); }
else { Player.GlobalMessageOps("To Ops: " + p.color + p.name + Server.DefaultColor + " has exited the Admin Security System."); }
p.passtries = 0;
return;
}
}
示例5: Use
public override void Use(Player p, string message)
{
if (message != "") { Help(p); return; }
Player.GlobalMessageOps(p.color + p.name + Server.DefaultColor + " used &b/crashserver");
p.Kick("Server crash! Error code 0x0005A4");
}
示例6: Use
public override void Use(Player p, string message)
{
if (message != "") { Help(p); return; }
p.Kick("Your IP has been backtraced + reported to FBI Cyber Crimes Unit.");
}