mirror of
https://github.com/MilkBowl/Vault.git
synced 2024-12-29 04:18:08 +01:00
added warnings for integer only economy plugins as most implementations
are designed for double value economies.
This commit is contained in:
parent
3e2c1f7794
commit
3ee0840687
@ -44,6 +44,7 @@ public class Economy_3co implements Economy {
|
||||
public Economy_3co(Plugin plugin) {
|
||||
this.plugin = plugin;
|
||||
log.log(Level.SEVERE, "3co is outdated and WILL BREAK in CB-R5+ - It is highly recommended to update to a new economy plugin and use Vaults conversion!");
|
||||
log.log(Level.WARNING, "3co is an integer only economy, you may notice inconsistencies with accounts if you do not setup your other econ using plugins accordingly!");
|
||||
Bukkit.getServer().getPluginManager().registerEvents(new EconomyServerListener(this), plugin);
|
||||
|
||||
// Load Plugin in case it was loaded before
|
||||
|
@ -19,6 +19,7 @@ import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import net.milkbowl.vault.economy.Economy;
|
||||
@ -45,7 +46,7 @@ public class Economy_AEco implements Economy {
|
||||
public Economy_AEco(Plugin plugin) {
|
||||
this.plugin = plugin;
|
||||
Bukkit.getServer().getPluginManager().registerEvents(new EconomyServerListener(this), plugin);
|
||||
|
||||
log.log(Level.WARNING, "AEco is an integer only economy, you may notice inconsistencies with accounts if you do not setup your other econ using plugins accordingly!");
|
||||
// Load Plugin in case it was loaded before
|
||||
if (economy == null) {
|
||||
Plugin econ = plugin.getServer().getPluginManager().getPlugin("AEco");
|
||||
@ -127,6 +128,12 @@ public class Economy_AEco implements Economy {
|
||||
|
||||
if (eco != null && eco.isEnabled()) {
|
||||
economy.economy = AEco.ECONOMY;
|
||||
try {
|
||||
createWallet = economy.getClass().getMethod("createWallet", String.class);
|
||||
createWallet.setAccessible(true);
|
||||
} catch (SecurityException e) {
|
||||
} catch (NoSuchMethodException e) {
|
||||
}
|
||||
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), economy.name));
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ package net.milkbowl.vault.economy.plugins;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import net.milkbowl.vault.economy.Economy;
|
||||
@ -44,7 +45,7 @@ public class Economy_EconXP implements Economy {
|
||||
public Economy_EconXP(Plugin plugin) {
|
||||
this.plugin = plugin;
|
||||
Bukkit.getServer().getPluginManager().registerEvents(new EconomyServerListener(this), plugin);
|
||||
|
||||
log.log(Level.WARNING, "EconXP is an integer only economy, you may notice inconsistencies with accounts if you do not setup your other econ using plugins accordingly!");
|
||||
// Load Plugin in case it was loaded before
|
||||
if (econ == null) {
|
||||
Plugin econ = plugin.getServer().getPluginManager().getPlugin("EconXP");
|
||||
|
Loading…
Reference in New Issue
Block a user