Rosewood-Development / RoseStacker

A next-generation stacker plugin for Spigot and Paper servers
Other
139 stars 36 forks source link

Event for opening a StackedBlock GUI #29

Closed BONNe closed 3 years ago

BONNe commented 3 years ago

RoseStacker has a GUI for stacked blocks and spawners, but there is no option to block GUI opening in certain situations from other plugins. The only option is to block shift + right-click entirely.

If I want to allow GUI opening only in certain areas/worlds, or people with certain permissions, I cannot do that in the current API, without blocking PlayerInteractionEvent, or doing the same checks for GUI oping using RoseStackerAPI.

It would simplify everything a lot, and allow much better configuration if RoseStacker had an event f.e. StackedBlockOpeningEvent which could be cancelled, to prevent GUI from opening.

This would simplify usage of API and would not require to guess if in the server RoseStacker BlockStacking GUI is enabled or not, as well as checking if given block is stacked or not.

Esophose commented 3 years ago

Added in 793c6012f58c2e8a3e92dce19380e3ada7842103