mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-01 23:23:31 +01:00
Null checks when searching for Vault
This commit is contained in:
parent
7eb1a9077f
commit
4ac86c4e30
@ -203,8 +203,10 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
|
|||||||
try {
|
try {
|
||||||
RegisteredServiceProvider<Economy> provider = Bukkit.getServicesManager().getRegistration(
|
RegisteredServiceProvider<Economy> provider = Bukkit.getServicesManager().getRegistration(
|
||||||
Economy.class);
|
Economy.class);
|
||||||
Economy economy = provider.getProvider();
|
if (provider != null && provider.getProvider() != null) {
|
||||||
Bukkit.getPluginManager().registerEvents(new NPCPayListener(economy), this);
|
Economy economy = provider.getProvider();
|
||||||
|
Bukkit.getPluginManager().registerEvents(new NPCPayListener(economy), this);
|
||||||
|
}
|
||||||
} catch (NoClassDefFoundError e) {
|
} catch (NoClassDefFoundError e) {
|
||||||
Messaging.log("Unable to use economy handling. Has Vault been enabled?");
|
Messaging.log("Unable to use economy handling. Has Vault been enabled?");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user