/// <summary> /// Gets a compatible and JSON serializable <see cref="CommandSender"/>. /// </summary> /// <param name="sender">The sender to be checked.</param> /// <returns>Returns the compatible <see cref="CommandSender"/>.</returns> public static CommandSender GetCompatible(this CommandSender sender) { if (sender.GetType() != typeof(RemoteAdmin.PlayerCommandSender)) { return(sender); } return(new PlayerCommandSender(sender.SenderId, sender.Nickname, sender.Permissions, sender.KickPower, sender.FullPermissions)); }