milkywayz/AntiSpawnEgg — pull request #1 by Mitsugaru (2012-03-28 20:19:20+00:00)
Title: Restructure of listener and fix for null check on Economy object

Restructured to not have the large amount of nested if statements.
Made durability checks else if statements to skip others once it gets the one it wants.

Also, I think I figured out why someone reported a NPE in the listener. Basically, you were checking if the server had vault, and then attempting to use the Economy object from Vault. Just because a server has Vault doesn't guarantee that they have an economy plugin, thus in this case you were trying to use a method on an null object. I've replaced the instances to check that your Economy object isn't null instead of the Vault plugin.

My edits appear to work. Didn't check/test/edit any other code outside of that one class. The other edits apparently just happened for whatever reason. Looks like Eclipse added missing @Override annotations.