mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-12-25 17:37:34 +01:00
Fix an NPE when Vault was not found
This commit is contained in:
parent
968296f1bb
commit
438e3a6ed0
@ -35,6 +35,10 @@ public class VaultListener implements Listener {
|
|||||||
* @return VaultListener
|
* @return VaultListener
|
||||||
*/
|
*/
|
||||||
public static @Nullable VaultListener initializeVault() {
|
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);
|
RegisteredServiceProvider<Economy> rsp = Bukkit.getServer().getServicesManager().getRegistration(net.milkbowl.vault.economy.Economy.class);
|
||||||
|
|
||||||
if (rsp == null) {
|
if (rsp == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user