Mines: Reset system expansion
Perksey opened this issue ยท 1 comments
- Prerequisite: finish and merge #47
Triggers
The reset triggers in mines need expanding. At the moment, there is only one trigger: the global reset timer. Since the release of Prison 3, we have got multiple requests for different triggers, and the ones we will be implementing in 3.1 are as follows:
-
Per-mine reset timer
This will allow users to bypass the default global reset timer and set the frequency in which a single mine resets. This can improve server performance, and prevent players going "all the mines are empty, now I have to wait X minutes". -
Percentage trigger
This trigger will listen forBlockBreakEvent
s and keep an eye on how much of the mine is not air. If this trigger is set to 30%, for example, the mine will reset when 30% of the blocks in the mine have been broken. This must be implemented carefully; because if the mine has 30% of its block list set as air and it's trigger set as 30%, the mine will undergo a reset loop, increasing the server load significantly.
If you would like us to add another reset trigger, please let us know in our official Discord server.
Methods
Currently, there is only 2 reset methods: Complete and Fill Mode. So far we only have one proposal for a new reset method, and it is:
- Gradual Regeneration
This method will replenish the mine over time, rather than reset the whole mine at one time. Not only will this improve server load, it will create less inconvenience for players as they won't get teleported out of the mine every X amount of minutes.
Commands
The root command to override the reset default trigger and method will be mines set
and will use the mines.set
permission.
- Command to override trigger
/mines set trigger {mine name} {default | time | percentage} [seconds or percentage of mine to be air]
The default
trigger will just use the reset time defined in the mines config.json.
- Command to override method
/mines set method {mine name} {default | complete | fill | regen}
The default
method will be complete
if fillMode
is false
in the config, or fill
otherwise.