Changelog:
- Added reward limiting.
- Reward limiting can be enabled to prevent players from getting too many rewards.
- The limit can be changed to adjust how many rewards the player can receive before they have to wait.
- The cooldown can be adjusted depending on whether you wish players to wait longer or shorter for their limit to reset. The cooldown starts counting after the player receives their first reward. As such, it is possible for the limit to reset before it is reached (due to either a huge limit, player going AFK, or some other factors and the cooldown ending in the meantime).
- Hitting a limit will cause a configurable message to be sent to the player with appropriate information.
- To retain plugin's old behavior, reward limiting is disabled by default.
- Updated configuration to reflect the addition of reward limiting. Due to no internal update mechanism for the configuration file, it has to be regenerated or the new section has to be pasted into the already generated configuration.
Configuration adjustments:
Code (YAML):
# General settings.
general
:
# Reward limiter settings.
reward-limiter
:
# Enabling the reward limiter makes it so that the player can only receive a set amount of rewards within a set time frame.
enabled
: false
# The player will be allowed to receive only this amount of rewards within the set time frame.
limit
: 10
# The message the player will receive when they reach the reward limit.
limit-reached-message
:
"&cYou have reached the reward limit. You have to wait for a while before you can receive more rewards."
# The time after which the player will be able to receive rewards again, counting upon the first reward received. The cooldown is expressed in the format ‘10d’, ‘5h’, ‘30m’, ‘20s’, ‘10m30s’, etc.
cooldown
: 10m