haveric/StackableItems — pull request #50 by RegalOwl (2012-12-21 04:12:45+00:00)
Title: Set all listeners to EventPriority.HIGHEST

The way your plugin works is a bit counter-intuitive. Currently, if I set my listeners to HIGHEST priority in HyperConomy, your plugin will still break mine due to the way you handle events in a custom manner. Since events with HIGHEST priority are called after events with normal priority, (Which I assume yours defaults to.), many plugins with a priority set higher than yours will be broken due to the fact that their events will be cancelled after your plugin handles them. When your plugin handles an event, it makes it irrelevant whether an event is cancelled or not in the future. Essentially, you don't currently give other plugins a chance to cancel an event, unless they set their priority to LOW or LOWEST, which allows the event to be canceled before it reaches your plugin. (And then the if clauses in many of your events return your functions.)

Setting your priority to HIGHEST will prevent most issues, as most other plugins will have a chance to cancel the events before they reach yours.