mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-25 12:15:12 +01:00
Removed Vault dependency
This commit is contained in:
parent
8c7bfe29bf
commit
4fcd6174ad
@ -4,7 +4,6 @@ version: ${version}
|
|||||||
|
|
||||||
authors: [tastybento, Poslovitch]
|
authors: [tastybento, Poslovitch]
|
||||||
|
|
||||||
depend: [Vault]
|
|
||||||
softdepend: [Herochat, DeluxeChat, PlaceholderAPI, MVdWPlaceholderAPI]
|
softdepend: [Herochat, DeluxeChat, PlaceholderAPI, MVdWPlaceholderAPI]
|
||||||
|
|
||||||
load: startup
|
load: startup
|
||||||
|
9
pom.xml
9
pom.xml
@ -83,20 +83,11 @@
|
|||||||
<systemPath>${server.jars}/library-1.12.jar</systemPath>
|
<systemPath>${server.jars}/library-1.12.jar</systemPath>
|
||||||
<version>1.12</version>
|
<version>1.12</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>net.milkbowl.vault</groupId>
|
|
||||||
<artifactId>VaultAPI</artifactId>
|
|
||||||
<version>LATEST</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>spigot-repo</id>
|
<id>spigot-repo</id>
|
||||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
|
||||||
<id>vault-repo</id>
|
|
||||||
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
</repositories>
|
||||||
</project>
|
</project>
|
||||||
|
@ -27,7 +27,6 @@ import us.tastybento.bskyblock.listeners.protection.IslandGuard1_9;
|
|||||||
import us.tastybento.bskyblock.listeners.protection.NetherEvents;
|
import us.tastybento.bskyblock.listeners.protection.NetherEvents;
|
||||||
import us.tastybento.bskyblock.managers.CommandsManager;
|
import us.tastybento.bskyblock.managers.CommandsManager;
|
||||||
import us.tastybento.bskyblock.util.Util;
|
import us.tastybento.bskyblock.util.Util;
|
||||||
import us.tastybento.bskyblock.util.VaultHelper;
|
|
||||||
import us.tastybento.bskyblock.util.nms.NMSAbstraction;
|
import us.tastybento.bskyblock.util.nms.NMSAbstraction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -60,15 +59,14 @@ public class BSkyBlock extends JavaPlugin implements BSModule {
|
|||||||
|
|
||||||
playersManager = new PlayersManager(this);
|
playersManager = new PlayersManager(this);
|
||||||
islandsManager = new IslandsManager(this);
|
islandsManager = new IslandsManager(this);
|
||||||
|
|
||||||
// Only load metrics if set to true in config
|
// Only load metrics if set to true in config
|
||||||
|
|
||||||
if(Settings.metrics) {
|
if(Settings.metrics) {
|
||||||
metrics = new Metrics(plugin);
|
metrics = new Metrics(plugin);
|
||||||
registerCustomCharts();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Settings.useEconomy && !VaultHelper.setupEconomy()) {
|
registerCustomCharts();
|
||||||
getLogger().warning("Could not set up economy! - Running without an economy.");
|
|
||||||
Settings.useEconomy = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set up commands
|
// 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