GetGroup() public static method

Get the group of a given player
public static GetGroup ( string name ) : Group
name string The players name
return Group
Ejemplo n.º 1
0
 // Code to run when used by a player
 public override void Use(Player p, string message)
 {
     if (message != "")
     {
         Player target = Player.Find(message);
         if (target == null || (target.hidden && p.Rank < target.Rank))
         {
             if (Player.left.ContainsKey(message.ToLower()))
             {
                 string playerName = message.ToLower();
                 string ip         = Player.left[playerName];
                 message = "&e" + playerName + " is " + Player.GetColor(playerName) + Player.GetGroup(playerName).Name + "&e.";
                 if (p.Rank >= GroupEnum.Operator)
                 {
                     message += " IP: " + ip + ".";
                 }
                 p.SendChat(p, message);
             }
             else
             {
                 p.SendMessage("No entry found for \"" + message + "\".");
             }
         }
         else
         {
             p.SendMessage(target.color + target.name + "&e is online, use /whois instead.");
         }
     }
     else
     {
         Help(p);
     }
 }