Beispiel #1
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='start'>
 /// </param>
 /// <param name='end'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> GetApplicantsByLastModifiedAsync(this IAdvancement operations, System.DateTime start, System.DateTime end, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetApplicantsByLastModifiedWithHttpMessagesAsync(start, end, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Intializes a new <see cref="AdvancementSingleCommand"/>
 /// </summary>
 /// <param name="selector">Selector for selecting players to grant/revoke the advancement or advancement criterion for</param>
 /// <param name="grant">True if the advancement should be granted. False if it should be revoked</param>
 /// <param name="advancement">The advancement to grant/revoke</param>
 /// <param name="criterion">The advancement criterion to grant/revoke. Leave null to only grant/revoke the advancement</param>
 public AdvancementSingleCommand(BaseSelector selector, IAdvancement advancement, AdvancementObjects.ITrigger?criterion, bool grant = true)
 {
     Selector    = selector;
     Grant       = grant;
     Advancement = advancement;
     Criterion   = criterion;
 }
Beispiel #3
0
 /// <summary>
 /// grants/revokes the specified the advancement for the selected players
 /// (it also grants/revokes the specified advancement)
 /// </summary>
 /// <param name="player">the <see cref="BaseSelector"/> to use</param>
 /// <param name="advancement">the advancement to grant/revoke</param>
 /// <param name="revoke">if the advancement should be revoked instead of granted</param>
 /// <param name="trigger">the trigger in the advancement to revoke/grant. Null means the advancement itself will be granted/revoked</param>
 public void Only(BaseSelector player, IAdvancement advancement, bool revoke = false, AdvancementObjects.ITrigger?trigger = null)
 {
     ForFunction.AddCommand(new AdvancementSingleCommand(player, advancement, trigger, !revoke));
 }
Beispiel #4
0
 /// <summary>
 /// grants/revokes all advancements in the same branch as the specified advancement for the selected players
 /// (it also grants/revokes the specified advancement)
 /// </summary>
 /// <param name="player">the <see cref="BaseSelector"/> to use</param>
 /// <param name="advancement">an advancement in the branch to grant/revoke</param>
 /// <param name="revoke">if the advancement should be revoked instead of granted</param>
 public void Branch(BaseSelector player, IAdvancement advancement, bool revoke = false)
 {
     ForFunction.AddCommand(new AdvancementSomeCommand(player, advancement, ID.RelativeAdvancement.through, !revoke));
 }
Beispiel #5
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='start'>
 /// </param>
 /// <param name='end'>
 /// </param>
 public static object GetApplicantsByLastModified(this IAdvancement operations, System.DateTime start, System.DateTime end)
 {
     return(operations.GetApplicantsByLastModifiedAsync(start, end).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Intializes a new <see cref="ChildAdvancement"/>
 /// </summary>
 /// <param name="packNamespace">The namespace the advancement is in</param>
 /// <param name="fileName">The name of the advancement file</param>
 /// <param name="writeSetting">The setting for writing the file</param>
 /// <param name="requirements">The requirements for getting the advancement</param>
 /// <param name="reward">The rewards to get for getting the advancement</param>
 /// <param name="announceInChat">True if when the advancement is unlocked it will be announced in chat. False if not</param>
 /// <param name="description">The description on the advancement</param>
 /// <param name="frame">The frame around the icon</param>
 /// <param name="hidden">True if the advancement can't be seen unless it has been unlocked</param>
 /// <param name="icon">The icon on the advancement</param>
 /// <param name="name">The shown advancement name</param>
 /// <param name="showToast">True if when the advancement is unlocked it will display a toast in the top right corner. False if not</param>
 /// <param name="parent">The parent advancement</param>
 public ChildAdvancement(BasePackNamespace packNamespace, string?fileName, IAdvancement parent, Requirement[] requirements, Reward?reward, BaseJsonText name, BaseJsonText description, Item icon, ID.AdvancementFrame frame = ID.AdvancementFrame.task, bool announceInChat = false, bool showToast = true, bool hidden = false, WriteSetting writeSetting = WriteSetting.LockedAuto) : this(true, packNamespace, fileName, parent, requirements, reward, name, description, icon, frame, announceInChat, showToast, hidden, writeSetting)
 {
     FinishedConstructing();
 }
 /// <summary>
 /// Intializes a new <see cref="ChildAdvancement"/>. Inherite from this constructor
 /// </summary>
 /// <param name="packNamespace">The namespace the advancement is in</param>
 /// <param name="fileName">The name of the advancement file</param>
 /// <param name="writeSetting">The setting for writing the file</param>
 /// <param name="requirements">The requirements for getting the advancement</param>
 /// <param name="reward">The rewards to get for getting the advancement</param>
 /// <param name="announceInChat">True if when the advancement is unlocked it will be announced in chat. False if not</param>
 /// <param name="description">The description on the advancement</param>
 /// <param name="frame">The frame around the icon</param>
 /// <param name="hidden">True if the advancement can't be seen unless it has been unlocked</param>
 /// <param name="icon">The icon on the advancement</param>
 /// <param name="name">The shown advancement name</param>
 /// <param name="showToast">True if when the advancement is unlocked it will display a toast in the top right corner. False if not</param>
 /// <param name="parent">The parent advancement</param>
 /// <param name="_">Unused parameter used for specifing you want to use this constructor</param>
 protected ChildAdvancement(bool _, BasePackNamespace packNamespace, string?fileName, IAdvancement parent, Requirement[] requirements, Reward?reward, BaseJsonText name, BaseJsonText description, Item icon, ID.AdvancementFrame frame = ID.AdvancementFrame.task, bool announceInChat = false, bool showToast = true, bool hidden = false, WriteSetting writeSetting = WriteSetting.LockedAuto) : base(packNamespace, fileName, requirements, reward, name, description, icon, frame, announceInChat, showToast, hidden, writeSetting)
 {
     Parent = parent;
 }