mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-22 09:08:03 +01:00
Removed Vault dependency
This commit is contained in:
parent
8c7bfe29bf
commit
4fcd6174ad
@ -4,7 +4,6 @@ version: ${version}
|
||||
|
||||
authors: [tastybento, Poslovitch]
|
||||
|
||||
depend: [Vault]
|
||||
softdepend: [Herochat, DeluxeChat, PlaceholderAPI, MVdWPlaceholderAPI]
|
||||
|
||||
load: startup
|
||||
|
9
pom.xml
9
pom.xml
@ -83,20 +83,11 @@
|
||||
<systemPath>${server.jars}/library-1.12.jar</systemPath>
|
||||
<version>1.12</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.milkbowl.vault</groupId>
|
||||
<artifactId>VaultAPI</artifactId>
|
||||
<version>LATEST</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spigot-repo</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>vault-repo</id>
|
||||
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</project>
|
||||
|
@ -27,7 +27,6 @@ import us.tastybento.bskyblock.listeners.protection.IslandGuard1_9;
|
||||
import us.tastybento.bskyblock.listeners.protection.NetherEvents;
|
||||
import us.tastybento.bskyblock.managers.CommandsManager;
|
||||
import us.tastybento.bskyblock.util.Util;
|
||||
import us.tastybento.bskyblock.util.VaultHelper;
|
||||
import us.tastybento.bskyblock.util.nms.NMSAbstraction;
|
||||
|
||||
/**
|
||||
@ -60,15 +59,14 @@ public class BSkyBlock extends JavaPlugin implements BSModule {
|
||||
|
||||
playersManager = new PlayersManager(this);
|
||||
islandsManager = new IslandsManager(this);
|
||||
|
||||
// Only load metrics if set to true in config
|
||||
|
||||
if(Settings.metrics) {
|
||||
metrics = new Metrics(plugin);
|
||||
registerCustomCharts();
|
||||
}
|
||||
|
||||
if (Settings.useEconomy && !VaultHelper.setupEconomy()) {
|
||||
getLogger().warning("Could not set up economy! - Running without an economy.");
|
||||
Settings.useEconomy = false;
|
||||
registerCustomCharts();
|
||||
|
||||
}
|
||||
|
||||
// Set up commands
|
||||
|
@ -1,30 +0,0 @@
|
||||
package us.tastybento.bskyblock.util;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||
|
||||
import net.milkbowl.vault.economy.Economy;
|
||||
import net.milkbowl.vault.permission.Permission;
|
||||
|
||||
/**
|
||||
* Helper class for Vault Economy and Permissions
|
||||
*/
|
||||
public class VaultHelper {
|
||||
public static Economy econ = null;
|
||||
|
||||
/**
|
||||
* Sets up the economy instance
|
||||
*
|
||||
* @return true if successful
|
||||
*/
|
||||
public static boolean setupEconomy() {
|
||||
RegisteredServiceProvider<Economy> economyProvider = Bukkit.getServer().getServicesManager()
|
||||
.getRegistration(net.milkbowl.vault.economy.Economy.class);
|
||||
if (economyProvider != null) {
|
||||
econ = economyProvider.getProvider();
|
||||
}
|
||||
return econ != null;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user