本文整理汇总了C#中MCForge.Player.ReviewTimer方法的典型用法代码示例。如果您正苦于以下问题:C# Player.ReviewTimer方法的具体用法?C# Player.ReviewTimer怎么用?C# Player.ReviewTimer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MCForge.Player
的用法示例。
在下文中一共展示了Player.ReviewTimer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Use
public override void Use(Player p, string message)
{
if (p != null && message == "")
{
message = "enter";
}
switch (message.ToLower())
{
case "enter":
if (p == null)
{
Player.SendMessage(p, "You can't execute this command as Console!");
return;
}
if (p.canusereview)
{
Group gre = Group.findPerm(Server.reviewenter);
LevelPermission lpe = gre.Permission;
if (p.group.Permission >= lpe)
{
foreach (string testwho in Server.reviewlist)
{
if (testwho == p.name)
{
Player.SendMessage(p, "You already entered the review queue!");
return;
}
}
bool isopson = false;
try
{
foreach (Player pl in Player.players)
{
if (pl.group.Permission >= Server.opchatperm && !pl.hidden)
{
isopson = true;
break; // We're done, break out of this loop
}
}
}
catch/* (Exception e)*/
{
isopson = true;
}
if (isopson == true)
{
Server.reviewlist.Add(p.name);
int reviewlistpos = Server.reviewlist.IndexOf(p.name);
if (reviewlistpos > 1) { Player.SendMessage(p, "You entered the &creview " + Server.DefaultColor + "queue. You have &c" + reviewlistpos.ToString() + Server.DefaultColor + " people in front of you in the queue"); }
if (reviewlistpos == 1) { Player.SendMessage(p, "You entered the &creview " + Server.DefaultColor + "queue. There is &c1 " + Server.DefaultColor + "person in front of you in the queue"); }
if ((reviewlistpos + 1) == 1) { Player.SendMessage(p, "You entered the &creview " + Server.DefaultColor + "queue. You are &cfirst " + Server.DefaultColor + "in line!"); }
Player.SendMessage(p, "The Online Operators have been notified. Someone should be with you shortly.");
Player.GlobalMessageOps(p.color + " - " + p.name + " - " + Server.DefaultColor + "entered the review queue");
if ((reviewlistpos + 1) > 1) { Player.GlobalMessageOps("There are now &c" + (reviewlistpos + 1) + Server.DefaultColor + " people waiting for &creview!"); }
else { Player.GlobalMessageOps("There is now &c1 " + Server.DefaultColor + "person waiting for &creview!"); }
p.ReviewTimer();
}
else
{
Player.SendMessage(p, "&cThere are no operators on to review your build. Please wait for one to come on and try again.");
}
}
}
else
{
Player.SendMessage(p, "You have to wait " + Server.reviewcooldown + " seconds everytime you use this command");
}
break;
case "list":
case "view":
if (p == null)
{
if (Server.reviewlist.Count != 0)
{
Player.SendMessage(p, "Players in the review queue:");
int viewnumb = 1;
foreach (string golist in Server.reviewlist)
{
string FoundRank = Group.findPlayer(golist.ToLower());
Player.SendMessage(p, viewnumb.ToString() + ". " + golist + " - Current Rank: " + FoundRank);
viewnumb++;
}
}
else
{
Player.SendMessage(p, "There are no players in the review queue!");
}
return;
}
Group grv = Group.findPerm(Server.reviewview);
LevelPermission lpv = grv.Permission;
if (p.group.Permission >= lpv && p != null)
{
if (Server.reviewlist.Count != 0)
{
Player.SendMessage(p, "&9Players in the review queue:");
int viewnumb = 1;
foreach (string golist in Server.reviewlist)
//.........这里部分代码省略.........