OpenInv

4M Downloads

Random Bad Interaction with Brewery

GeneralSarcasam opened this issue ยท 4 comments

commented

I've had Brewery (https://github.com/DieReicheErethons/Brewery) and OpenInv on my server together for the better part of 3 years now, and always had a bug where Admins couldn't open Brewery barrels. It was never a significant enough issue for us that I bothered to figure out what was going on with it, but I sat down today to figure it out.

Turns out, my Admin group had the permissions 'openinv.anychest' and 'openinv.silent.default', both of which prevent you from opening a Brewery barrel for some reason.

I don't really expect this to be something you prioritize, but I made this discovery and figured even if you decide it's not worth fixing, you could get a good laugh out of it.

Thanks!

commented

Best guess is that the brewery plugin listens for interactions at the same priority as OI. OI is relying on the fact that plugins are not supposed to modify the event in that priority, so any plugin changing the outcome should already have done its thing. Brewery prevents OI from opening the actual inventory of the barrel, but does not open its own barrel interface because the interaction was cancelled late by OI to prevent the container actually opening and making noise.

Honestly, imo the solution you have found where silentcontainer is not on by default is the best easy solution here - leaving admin powers on when you don't need them is generally not a great way to go.

Do brewery barrels make a sound when opened like normal barrels do, or are they entirely separate?

commented

They make the regular Barrel noise when opened, despite being a multiblock structure

commented

Doesn't look like OI can address this. Brewery plays those sounds itself. https://github.com/DieReicheErethons/Brewery/blob/ba75403f3b3fae391adfd7fcccd360365cae4757/src/com/dre/brewery/listeners/PlayerListener.java#L149
There doesn't appear to be any way to skip this while letting Brewery do its own barrel opening.

commented

For clarity, reason this is won'tfix is because to fix it one would have to unregister Brewery's interaction listener and enable a modified copy. The alternative is multiple barrel multiblock lookups, and depending on how they handle multiblock detection that may be very inefficient.