Changes
This commit is contained in:
@@ -1,15 +1,22 @@
|
||||
package com.garbagemule.register.payment.methods;
|
||||
|
||||
import com.garbagemule.register.payment.Method;
|
||||
import com.iConomy.iConomy;
|
||||
import com.iConomy.system.Account;
|
||||
import com.iConomy.system.BankAccount;
|
||||
import com.iConomy.system.Holdings;
|
||||
import com.iConomy.util.Constants;
|
||||
|
||||
import com.garbagemule.register.payment.Method;
|
||||
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
/**
|
||||
* iConomy 5 Implementation of Method
|
||||
*
|
||||
* @author Nijikokun <[email protected]> (@nijikokun)
|
||||
* @copyright (c) 2011
|
||||
* @license AOL license <http://aol.nexua.org>
|
||||
*/
|
||||
public class iCo5 implements Method {
|
||||
private iConomy iConomy;
|
||||
|
||||
@@ -34,7 +41,7 @@ public class iCo5 implements Method {
|
||||
}
|
||||
|
||||
public boolean hasBank(String bank) {
|
||||
return (!hasBanks()) ? false : this.iConomy.Banks.exists(bank);
|
||||
return (hasBanks()) && this.iConomy.Banks.exists(bank);
|
||||
}
|
||||
|
||||
public boolean hasAccount(String name) {
|
||||
@@ -42,7 +49,7 @@ public class iCo5 implements Method {
|
||||
}
|
||||
|
||||
public boolean hasBankAccount(String bank, String name) {
|
||||
return (!hasBank(bank)) ? false : this.iConomy.getBank(bank).hasAccount(name);
|
||||
return (hasBank(bank)) && this.iConomy.getBank(bank).hasAccount(name);
|
||||
}
|
||||
|
||||
public MethodAccount getAccount(String name) {
|
||||
@@ -52,7 +59,7 @@ public class iCo5 implements Method {
|
||||
public MethodBankAccount getBankAccount(String bank, String name) {
|
||||
return new iCoBankAccount(this.iConomy.getBank(bank).getAccount(name));
|
||||
}
|
||||
|
||||
|
||||
public boolean isCompatible(Plugin plugin) {
|
||||
return plugin.getDescription().getName().equalsIgnoreCase("iconomy") && plugin.getClass().getName().equals("com.iConomy.iConomy") && plugin instanceof iConomy;
|
||||
}
|
||||
@@ -208,4 +215,4 @@ public class iCo5 implements Method {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user