mirror of
https://github.com/MilkBowl/Vault.git
synced 2025-01-15 20:51:30 +01:00
fixed iCo version thing.
This commit is contained in:
parent
be482c64f1
commit
c351f78f62
@ -38,7 +38,7 @@ import com.iCo6.system.Holdings;
|
|||||||
public class Economy_iConomy6 implements Economy {
|
public class Economy_iConomy6 implements Economy {
|
||||||
private static final Logger log = Logger.getLogger("Minecraft");
|
private static final Logger log = Logger.getLogger("Minecraft");
|
||||||
|
|
||||||
private final String name = "iConomy 6";
|
private String name = "iConomy ";
|
||||||
private Plugin plugin = null;
|
private Plugin plugin = null;
|
||||||
protected iConomy economy = null;
|
protected iConomy economy = null;
|
||||||
private Accounts accounts;
|
private Accounts accounts;
|
||||||
@ -53,6 +53,8 @@ public class Economy_iConomy6 implements Economy {
|
|||||||
if (economy == null) {
|
if (economy == null) {
|
||||||
Plugin ec = plugin.getServer().getPluginManager().getPlugin("iConomy");
|
Plugin ec = plugin.getServer().getPluginManager().getPlugin("iConomy");
|
||||||
if (ec != null && ec.isEnabled() && ec.getClass().getName().equals("com.iCo6.iConomy")) {
|
if (ec != null && ec.isEnabled() && ec.getClass().getName().equals("com.iCo6.iConomy")) {
|
||||||
|
String version = ec.getDescription().getVersion().split("\\.")[0];
|
||||||
|
name += version;
|
||||||
economy = (iConomy) ec;
|
economy = (iConomy) ec;
|
||||||
accounts = new Accounts();
|
accounts = new Accounts();
|
||||||
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), name));
|
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), name));
|
||||||
@ -71,8 +73,9 @@ public class Economy_iConomy6 implements Economy {
|
|||||||
public void onPluginEnable(PluginEnableEvent event) {
|
public void onPluginEnable(PluginEnableEvent event) {
|
||||||
if (economy.economy == null) {
|
if (economy.economy == null) {
|
||||||
Plugin ec = plugin.getServer().getPluginManager().getPlugin("iConomy");
|
Plugin ec = plugin.getServer().getPluginManager().getPlugin("iConomy");
|
||||||
|
|
||||||
if (ec != null && ec.isEnabled() && ec.getClass().getName().equals("com.iCo6.iConomy")) {
|
if (ec != null && ec.isEnabled() && ec.getClass().getName().equals("com.iCo6.iConomy")) {
|
||||||
|
String version = ec.getDescription().getVersion().split("\\.")[0];
|
||||||
|
name += version;
|
||||||
economy.economy = (iConomy) ec;
|
economy.economy = (iConomy) ec;
|
||||||
accounts = new Accounts();
|
accounts = new Accounts();
|
||||||
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), economy.name));
|
log.info(String.format("[%s][Economy] %s hooked.", plugin.getDescription().getName(), economy.name));
|
||||||
|
Loading…
Reference in New Issue
Block a user