Fix an NPE when Vault was not found

This commit is contained in:
Acrobot 2013-07-22 21:37:59 +02:00
parent 968296f1bb
commit 438e3a6ed0

View File

@ -35,6 +35,10 @@ public class VaultListener implements Listener {
* @return VaultListener
*/
public static @Nullable VaultListener initializeVault() {
if (Bukkit.getPluginManager().getPlugin("Vault") == null) {
return null;
}
RegisteredServiceProvider<Economy> rsp = Bukkit.getServer().getServicesManager().getRegistration(net.milkbowl.vault.economy.Economy.class);
if (rsp == null) {