mirror of
https://github.com/shansen/EggCatcher.git
synced 2024-11-23 02:25:27 +01:00
Bugfix for Vault initialization.
This commit is contained in:
parent
242a279af2
commit
12033af8aa
6
pom.xml
6
pom.xml
@ -17,7 +17,7 @@
|
|||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>bukkit-repo</id>
|
<id>bukkit-repo</id>
|
||||||
<url>http://repo.bukkit.org/content/repositories/snapshots/</url>
|
<url>http://repo.bukkit.org/content/repositories/releases/</url>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
@ -25,12 +25,12 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>bukkit</artifactId>
|
<artifactId>bukkit</artifactId>
|
||||||
<version>1.2.2-R0.1-SNAPSHOT</version>
|
<version>1.2.4-R1.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.milkbowl.vault</groupId>
|
<groupId>net.milkbowl.vault</groupId>
|
||||||
<artifactId>Vault</artifactId>
|
<artifactId>Vault</artifactId>
|
||||||
<version>1.2.8</version>
|
<version>1.2.13</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -28,6 +28,7 @@ import net.milkbowl.vault.economy.Economy;
|
|||||||
|
|
||||||
import org.bukkit.entity.*;
|
import org.bukkit.entity.*;
|
||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
|
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
public class EggCatcher extends JavaPlugin {
|
public class EggCatcher extends JavaPlugin {
|
||||||
@ -55,17 +56,23 @@ public class EggCatcher extends JavaPlugin {
|
|||||||
pm.registerEvents(entityListener, this);
|
pm.registerEvents(entityListener, this);
|
||||||
|
|
||||||
if (getServer().getPluginManager().getPlugin("Vault") != null) {
|
if (getServer().getPluginManager().getPlugin("Vault") != null) {
|
||||||
economy = getServer().getServicesManager()
|
RegisteredServiceProvider<Economy> economyProvider = getServer().getServicesManager()
|
||||||
.getRegistration(Economy.class).getProvider();
|
.getRegistration(Economy.class);
|
||||||
|
if(economyProvider!=null){
|
||||||
|
economy = economyProvider.getProvider();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CheckConfigurationFile() {
|
public void CheckConfigurationFile() {
|
||||||
double configVersion = this.getConfig().getDouble("ConfigVersion", 0.0);
|
double configVersion = this.getConfig().getDouble("ConfigVersion", 0.0);
|
||||||
|
if (configVersion == 1.17) {
|
||||||
if (configVersion == 1.16) {
|
|
||||||
//
|
//
|
||||||
this.saveConfig();
|
this.saveConfig();
|
||||||
|
}
|
||||||
|
if (configVersion == 1.16) {
|
||||||
|
this.getConfig().set("ConfigVersion", 1.17);
|
||||||
|
this.saveConfig();
|
||||||
} else {
|
} else {
|
||||||
this.saveResource("config.yml", true);
|
this.saveResource("config.yml", true);
|
||||||
this.reloadConfig();
|
this.reloadConfig();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name: EggCatcher
|
name: EggCatcher
|
||||||
version: 1.16
|
version: 1.17
|
||||||
description: This plugin allows you to catch mobs in eggs.
|
description: This plugin allows you to catch mobs in eggs.
|
||||||
author: shansen
|
author: shansen
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user