GTNewHorizons / ServerUtilities

GNU Lesser General Public License v3.0
29 stars 13 forks source link

Add claims/chunkload decay #81

Closed Lyfts closed 3 months ago

Lyfts commented 4 months ago

Based on https://github.com/GTNewHorizons/ServerUtilities/pull/78 and will thus sit drafted for now.

Chunkload decay will automatically remove chunkloads from a team after a period of inactivity which are defined with permissions. It will use the timer from the team member with the "best" one, which is either 0 (decay disabled) or whichever one is highest. This decay is fully reversible and chunk loads will be restored once a team member joins the server again which will also reset the timer. The default for normal players has been set to 2 weeks.

Since it is a timer permissions it uses this fun format: serverutilities.chunkloader.decay: 30m - Decay after 30 min serverutilities.chunkloader.decay: 1d - Decay after 1 day serverutilities.chunkloader.decay: 4w Decay after 4 weeks You can also get fancy with it and do something like serverutilities.chunkloader.decay: 4w 3d 2h 10m Note that the space between the time units are required atm and as always the format + a description can be acquired through /dump_permissions (or through the new rank gui)

Claim decay uses the same format and is defined with the permission node serverutilities.claims.decay. This is the more nuclear option since it will irreversibly remove all claims and leaves the area free to be griefed or claimed by other teams. This is turned off by default for all players.

Closes https://github.com/GTNewHorizons/ServerUtilities/issues/76