-
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