FindByUserId() public static method

public static FindByUserId ( int id ) : Player
id int
return Player
Ejemplo n.º 1
0
        protected virtual void OnFailure(int userid, string errorMessage)
        {
            Player player = Player.FindByUserId(userid);

            WriteLine(player, errorMessage);
            OnFailure(player);
        }
Ejemplo n.º 2
0
        protected virtual void OnFailure(int userid, Exception exception)
        {
            Player player = Player.FindByUserId(userid);

            WriteLine(player, exception.Message);
            WriteLine(player, exception.StackTrace);
            OnFailure(player);
        }
Ejemplo n.º 3
0
        private static void ResolvedPrivileges(PlayerInfo pi, Privileges priv)
        {
            Player player = Player.FindByUserId(pi.UserId);

            // Player isn't in the server any more, just stop it.
            if (player == null)
            {
                return;
            }

            OnAssignPrivileges(player, priv == null ? player.Privileges : priv);
        }
Ejemplo n.º 4
0
        private static void ResolvedBans(BanInfo information)
        {
            if (information == null)
            {
                return;
            }

            Player target = Player.FindByUserId(information.Player.UserId);

            if (target == null)
            {
                return;
            }

            if (!target.Privileges.HasPrivilege("noban"))
            {
                target.Kick(information.Reason);
            }
        }
Ejemplo n.º 5
0
 protected virtual void OnFailure(int userid)
 {
     OnFailure(Player.FindByUserId(userid));
 }
Ejemplo n.º 6
0
 protected void OnSuccess(int userid)
 {
     OnSuccess(Player.FindByUserId(userid));
 }