ServerTools
ServerTools
Search
K

Reclaim

How to configure the Commands.Reclaim section of the config.yml
Many servers wish to offer a /reclaim option for ranked players to gain back previously bought keys and in gam items from the past purchase. You can do this with the reclaim section of the plugin
reclaim:
Enabled: true
BeginAtIndex: 6 # Display Output
permissions:
'group_dragon':
- 'bundle give %player% DragonReclaim 1'
'group_king':
- 'bundle give %player% KingReclaim 1'
'group_wizard':
- 'bundle give %player% WizardReclaim 1'
'group_goblin':
- 'bundle give %player% GoblinReclaim 1'
Permissions
BeginAtIndex
Given YAML files use the "." key as permissions, it is not possible to use this within the configuration.
To combat this, change the period character to an underscore when placing your variables as the keys. This allows you to use default permissions which groups already have.
In the example above, all Dragon rank members would have the group.dragon permission. To use this with our reclaim, it becomes "group_dragon". ServerTools will correctly swap the underscore back to a period as needed.
This is the index at which the command will print the values of the Reclaim prize based on the permission.
As seen above, "group_dragon" - we do not want to show this to the user upon claiming. By beinging the index at 6 we skip the "group_" value and only show DRAGON to them.
It is advised to leave this at 6 if you are using Luckperms group permissions. If not, change to 0 and increase as needed
Reclaim Bundle