public static FindByUserId ( int id ) : Player | ||
id | int | |
Результат | Player |
protected virtual void OnFailure(int userid, string errorMessage) { Player player = Player.FindByUserId(userid); WriteLine(player, errorMessage); OnFailure(player); }
protected virtual void OnFailure(int userid, Exception exception) { Player player = Player.FindByUserId(userid); WriteLine(player, exception.Message); WriteLine(player, exception.StackTrace); OnFailure(player); }
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); }
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); } }
protected virtual void OnFailure(int userid) { OnFailure(Player.FindByUserId(userid)); }
protected void OnSuccess(int userid) { OnSuccess(Player.FindByUserId(userid)); }