BentoBoxWorld/Upgrades

Conflict with Limits permission settings

tastybento opened this issue · 8 comments

Description

Describe the bug

It seems that Upgrades cancels the permissions-based limit settings set when a player logs in.

Steps to reproduce the behavior

Please see BentoBoxWorld/Limits#117

Expected behavior

The admins think that Limits should be able to set the limits via permissions and Upgrades be able to upgrade them. I don't understand how Upgrades work so I don't know if this is possible or not.

I looked at the Upgrade's join listener and it seems that the LimitsPermCheckEvent is canceled if any blocks, entities or entity groups are handled by Upgrades. That means that Limits sets nothing if any one of these is handled. I think it finer grain control is required. I can enhance the event so that you can selectively cancel Blocks/Entities/EntityGroups instead of all three. Would that help?

BONNe commented

I think the issue is that people want something different, than Upgrades offers.

They want them to work together... for the same items.

Basically, they want that Upgrades increases the value for/after permission.

F.E.
A has permission for 20 blocks.
B has permission for 1 block.

Upgrades allow buying extra 10 blocks.
A ends up with 30 blocks.
B ends up with 11 blocks.

Yep, that's a known issue #29.

I need to block limits permission as each time a player log in, it resets his island's limits.

I thought about making them stackeable with the help of BentoBoxWorld/Limits#113 however, I need to make something to simulate the result.
And with the current settings that use a config file, it's a huge hassle, prone to creating new bugs.
So I choose to end my setting's rework before doing it.

BONNe commented

Well, if you remove the permission check, then you need to process it yourself.
The premise of the permission is that it is stronger than anything else.

A fast fix would be that you disable permission check but process it in your code, and add a limit according to the maximal value between permission value and purchased limit.

The thing is, in this addon, I had the beautiful idea of not saving what was changed so without making a simulation I don't know how much I changed the value.
So when the time comes to remove the permission I have no idea at which value I need to put it.

Hi :d i have the same bug, it will be fixed in next updates?

It will take a while. First I need to do #37

Okey please tag me when it's fixed!

What is the latest status? @tastybento @Guillaume-Lebegue