Jsinco / BreweryX

An actively maintained, support given, and addon supported fork of Brewery with tons of extra features.
https://discord.gg/3FkNaNDnta
GNU General Public License v3.0
49 stars 13 forks source link

Support CommandHelper Scripts as well as Depenizen #22

Open TomLewis opened 4 weeks ago

TomLewis commented 4 weeks ago

I saw this; https://github.com/DenizenScript/Depenizen/pull/430

Ive been using custom scripts for a very long time with brews, but ive been limited to running a command when brews drunk. If you can make a commandHelper addon then you can hook directly into commandhelper/commadhelper directly into brewing which would be brilliant.

The feature I want, is to prevent drinking the brew if the script returns false.

For exmaple, I have a "Super chorus" brew that I make run a random teleport plugins commands, BUT i needed to make it check if the player was PvP tagged first, I got it all working, but it still consumes the brew, the only idea ive had to resolve this is in the script give them another brew, but then it wont be able to know how strong etc.

Additonally we could just add conditions and contexts to brewing for checking if a brew can be drunk first, this may be good anyway.

Checknig for if in PvP with PVPmanager or in a worldguard claim, to prevent use in an event or spawn etc.

Jsinco commented 3 weeks ago

This would be possible with depenizen if/when that ever gets merged by those guys. If you know a bit of java you can also just use brewery's api too. Adding a feature that allows you to cancel drinking based on returned outputs would be pretty messy to add into brewery atm and might just be something to save for those who know how to write denizen scripts, etc. If you want depenizen support to come around faster, you could probably also just ask one of the maintainers over at denizen. McMonkey accepted the pull a LONG time ago but the other maintainer has yet to review it so letting them know might remind them to check it out.

TomLewis commented 2 weeks ago

I don't use depenizen, my scripts are all in CommandHelper. Hence the request! Might be better as an "addon"