Open Phoenix616 opened 3 years ago
The reason this isn't done is that it was causing server deadlocks in some cases.
Generally the SUPERUSER commanditem run as type is no longer supported, and will be fully removed in CB5.
It may be replaced with a permission attachment system, but generally that doesn't work too well with how perm plugins do caching now. Console is the recommended way
Tbh. I feel like a deadlock would still be a lot better than a player walking around with op and * permission.
The deadlock was much more likely than the case you described. Really I'd prefer to keep it in the "not recommended" state as is with it /mostly/ working, then remove it in CB5 where people won't send me death threats for months for removing a feature in a non-major release
To clarify - changing it to this makes the feature detrimental enough that it's /likely/ to cause problems, which massively increases the current risk factor. I'd rather entirely remove it than introduce the deadlock issue
Do you have any further information on the deadlock? Because I have been running a similar code for years without any issues...
Not really - it was just something that got reported a lot without reproducibility on my end
This change makes sure that the wildcard permission and op status are properly removed from the player after the command in the command items or custom crafting configs are executed even if any kind of exception occurred while executing it.
Also adjusted the CustomCrafting op setters to work the same way as the CommandItems ones (checking the
wasOp
) and explicitly setting the op tofalse
after execution to improve code readability.