Determine how many ores can be veinmined with permission
TetraTheta opened this issue · 4 comments
I think it would be awesome if server owner can determine how many ores can be veinmined with permission node, per group or user.
Like, if certain user have veinminer.limit.5
, he will be able to veinmine up to 5 ores at once. If other user have veinminer.limit.15
, he will be able to veinmine up to 15 ores at once. Same applies to groups.
Thank you for reading this and I hope you have a good day.
I'm always hesitant to add dynamic permission nodes but I know it's something that's been asked for for a long while. I need to figure out some proper way to implement this without it being too overly performance heavy. Iterating over all applicable permission nodes just to find one that has a number at the end of it and matches the veinminer.limit
pattern isn't ideal. Maybe user-defined permissions in the config.yml
is a better approach to this...
I'm not sure. We'll see!
For me, how it would be implemented (like 'Dynamic permission node') is not that important. All I wanted was 'Determine how many ores player(or group) can mine with permission'.
So, yes.
Maybe user-defined permissions in the config.yml is a better approach to this
I can agree with this.
# permission node: veinminer.limit.alpha, veinminer.limit.beta, veinminer.limit.gamma
veinminer:
limit:
alpha: 10
beta: 5
gamma: 30
It would be like this, but I hope there would be much more nice way to do it. Sorry for my bad imagination.
No that's about how I would do it as well I think. Probably even simpler than that.
LimitPermissions:
alpha: 10
beta: 5
gamma: 30
Then would just automatically determine veinminer.limit.alpha
, etc. It's certainly something worth investing in because I know that's pretty much the number one feature request at this point. Suppose I'd have to have the permission take priority over the MaxVeinSize
configuration as well. Maybe have it select between the two of them. I'm not sure.
I'll deliberate on this a little bit more. I don't have time at this very moment as I've returned to work, but I do intend on making some very large structural changes to VeinMiner in the near future so this will be on my list of things to add.