AppleDash / SaneEconomy

Finally, a sane economy plugin for Bukkit.
https://www.spigotmc.org/resources/saneeconomy-simple-but-featureful-economy.26223/
GNU General Public License v3.0
19 stars 24 forks source link

BUG - Priority For Economy Hook? #15

Closed Inysal closed 8 years ago

Inysal commented 8 years ago

Apple Dash,

I had an issue with one of my plugins not working with your great Economy plugin, and when I contacted them, this is what they said:

Devinish - (Signshop Plugin)

"Yep, looks like the economy isn't hooking into Vault until after SignShop is. So when SignShop goes looking for the economy plugin, it Vault doesn't know it exists yet. As a quick fix to this, you can manually edit the SignShop plugin.yml and add the economy plugin's name to the soft dependencies. But that's not a fix we would implement, because SignShop shouldn't really care about the economy plugin. I'm guessing they need to change their priority or something on the Vault hook."

Here is my startup log, and it shows that SaneEconomy doesn't get loaded up before SignShop does, causing an error.

http://pastebin.com/RrKGGnYW

Let me know, what I can do to help!

Thanks, Inysal

AppleDash commented 8 years ago

This should be fixed in the latest version, when I release it. Look out for a new release in the next week or so. Meanwhile, you can do the following, if you do not know how to do it already:

That should fix it temporarily.

Inysal commented 8 years ago

AppleDash,

I don't know why it didn't matter, but I got it working by:

Adding the line at the top under softdepend: loadbefore: [SignShop]

When I tried it at the bottom on a new line, and using [Vault] it didn't work. As it couldn't load before Vault, because it needs Vault running to hook into. Though it needed to load after Vault so it could allow SignShop to pass events to it when it tried to load.

So it would have to load like this to prevent any other plugins from loading incorrectly again.

Vault SaneEconomy Plugins

Just letting you know, Inysal.

AppleDash commented 8 years ago

This isn't actually the case, because of the way the Vault hook works. I don't hook directly into Vault, I use something called a "service provider" that tells Bukkit "Hey, I'm an economy plugin!". Then, when Vault comes onto the scene later, it asks Bukkit "Do you know of any economy plugins?" and it's like "Yeah, of course, SaneEconomy is an economy plugin!" and it all works out.

AppleDash commented 8 years ago

Fixed in 0.8.0.