Command64 : inv-checked rewards, cron scheduler + icon

Command64 : inv-checked rewards, cron scheduler + -----

Automagically run any command with different triggers, delays, inv-checks, & perm-checks




- Added Cron Scheduler: schedule commands to be ran at any time. To use this feature, add this new config module and enable it:

Code (YAML):

# -----------------------------------cronSchedule--------------------------------------- #
# consoleCommand gets scheduled by the entry's cron expression.
#
# Use https://crontab.guru/ for help.
# -------------------------------------------------------------------------------------- #
cronSchedule
:
  enabled
: false
  taskEntries
:
  # - "m h dom mon dow consoleCommand"
    - "0 0 */1 * * say This command is triggered at midnight!"
    - "0,*/10 11-14 * * * say This command is triggered every 10 minutes between 11:00 AM and 2:59 PM!"
 
----------, Nov 21, 2024

- Fixed exceptions stemming from the rewardEntries' new optional argument
----------, Nov 9, 2024

- Added sudo sub-command. Use /cmd sudo CONSOLE/<player> <cmd> to run a command as someone else (underscores convert to spaces in cmd).
- Added optional quantity argument to give sub-command. Use /cmd give <itemKey> [player] [amount] to spawn custom items.
----------, Nov 9, 2024

- Added an optional <argument> for rewardEntries (underscores convert to spaces)
- Added an optional <argument2> for customCommandEntries (underscores convert to spaces)
- Reordered command usage logging before dispatching
- Improved default config comments
----------, Nov 8, 2024

- Added a configurable message for players when they receive a reward. To use it, add a string to rewardSystem.newRewardMessage. For example:
Code (YAML):
newRewardMessage : "&8[&fRewards&8] &aYou just received a reward, claim it with &2/redeemreward&a!"
----------, Nov 7, 2024

- Added the reward system: admins give players rewards, and players redeem their rewards when they want to (with per-reward inventory checks). All a player has to do is run /redeemreward, and they will receive the first reward in their queue. If their inventory is full and the reward requires space, they will instead receive the first reward that doesn't require space (if any exists). This is particularly useful for plugins that give items directly to the user without checking inventory space. To use this feature, add this new config module and enable it:

Code (YAML):
# -------------------------------------------------------------------------------------- #
# This module gives players the ability redeem pending rewards (commands).
# 1st) Admins/Console add rewardEntries to a player's pending queue
#        by using `/cmd reward <rewardName> <username>`.
# 2nd) Players redeem rewards (in-order, unless there are skips due to full inv) by using `/redeemreward`.
#      -- If the player has no pending rewards, they will be sent noPendingRewardMessage.
#      -- Else if the the player has inventory space, the first rewardEntry's consoleCommands
#           in the player's pending queue will be run.
#      -- Else if there is no pending reward without an invCheck, they will be sent noInvSpaceMessage.
#      -- Else the first rewardEntry's consoleCommands that doesn't have a invCheck will be run.
#
# Optional Argument:
# <player> == player who is rewarded
# -------------------------------------------------------------------------------------- #
rewardSystem
:
  enabled
: false
  saveDataInterval
: 15 # save data to json every X minutes, -1 to only save on shutdown
  pendingRewardsJoinMessage
:
    message
: "&8[&fRewards&8] &aYou have reward(s) to claim! &2/redeemreward"
    tickDelay
: 300
  redeemMessages
:
    noRewardMessage
: "&8[&fRewards&8] &cYou don't have any pending rewards!"
    noInvSpaceMessage
: "&8[&fRewards&8] &cYou don't have enough inventory space for your reward!"
    rewardedMessage
: "&8[&fRewards&8] &aYou redeemed a reward!"
  rewardEntries
:
    '1'
: # Usage: `/cmd reward cratekey <player>`
      name
: "cratekey"
      consoleCommands
:
       - "crates givekey Crate <player>"
      invCheck
: true
    '2'
: # Usage: `/cmd reward money <player>`
      name
: "money"
      consoleCommands
:
       - "eco give <player> 100"
      invCheck
: false
    # Add more entries as needed
----------, Nov 7, 2024

- Replaced <sender> with <player> everywhere in config
- Replaced checkPlayer with checkOnPlayer everywhere in config
----------, Nov 5, 2024

Resource Information
Author:
----------
Total Downloads: 117
First Release: Nov 5, 2024
Last Update: Nov 21, 2024
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings