v0.94.3.9 - Deprecated support for Heroes pre-b400!

This commit is contained in:
Garbage Mule 2011-10-02 18:13:57 +02:00
parent 515d29a714
commit 34d2af6c14
5 changed files with 3 additions and 199 deletions

Binary file not shown.

View File

@ -1,6 +1,6 @@
name: MobArena name: MobArena
main: com.garbagemule.MobArena.MobArena main: com.garbagemule.MobArena.MobArena
version: 0.94.3.8 version: 0.94.3.9
softdepend: [Spout,Permissions,MultiVerse,XcraftGate,Towny,Heroes,MagicSpells] softdepend: [Spout,Permissions,MultiVerse,XcraftGate,Towny,Heroes,MagicSpells]
commands: commands:
ma: ma:

View File

@ -58,7 +58,7 @@ import com.garbagemule.MobArena.waves.BossWave;
import com.garbagemule.MobArena.waves.Wave; import com.garbagemule.MobArena.waves.Wave;
import com.garbagemule.MobArena.waves.Wave.WaveBranch; import com.garbagemule.MobArena.waves.Wave.WaveBranch;
import com.herocraftonline.dev.heroes.persistence.Hero; import com.herocraftonline.dev.heroes.hero.Hero;
public class Arena public class Arena
{ {

View File

@ -23,7 +23,7 @@ import com.garbagemule.register.payment.Method;
import com.garbagemule.register.payment.Methods; import com.garbagemule.register.payment.Methods;
import com.herocraftonline.dev.heroes.Heroes; import com.herocraftonline.dev.heroes.Heroes;
import com.herocraftonline.dev.heroes.persistence.HeroManager; import com.herocraftonline.dev.heroes.hero.HeroManager;
/** /**
* MobArena * MobArena

View File

@ -1,196 +0,0 @@
package com.garbagemule.register.payment.methods;
import com.garbagemule.register.payment.Method;
import cosine.boseconomy.BOSEconomy;
import org.bukkit.plugin.Plugin;
public class BOSE implements Method {
private BOSEconomy BOSEconomy;
public BOSEconomy getPlugin() {
return this.BOSEconomy;
}
public String getName() {
return "BOSEconomy";
}
public String getVersion() {
return "0.6.2";
}
public String format(double amount) {
String currency = this.BOSEconomy.getMoneyNamePlural();
if(amount == 1) currency = this.BOSEconomy.getMoneyName();
return amount + " " + currency;
}
public boolean hasBanks() {
return true;
}
public boolean hasBank(String bank) {
return this.BOSEconomy.bankExists(bank);
}
public boolean hasAccount(String name) {
return this.BOSEconomy.playerRegistered(name, false);
}
public boolean hasBankAccount(String bank, String name) {
return this.BOSEconomy.isBankOwner(bank, name);
}
public MethodAccount getAccount(String name) {
if(!hasAccount(name)) return null;
return new BOSEAccount(name, this.BOSEconomy);
}
public MethodBankAccount getBankAccount(String bank, String name) {
return new BOSEBankAccount(bank, name, BOSEconomy);
}
public boolean isCompatible(Plugin plugin) {
return plugin.getDescription().getName().equalsIgnoreCase("boseconomy") && plugin instanceof BOSEconomy;
}
public void setPlugin(Plugin plugin) {
BOSEconomy = (BOSEconomy)plugin;
}
public class BOSEAccount implements MethodAccount {
private String name;
private BOSEconomy BOSEconomy;
public BOSEAccount(String name, BOSEconomy bOSEconomy) {
this.name = name;
this.BOSEconomy = bOSEconomy;
}
public double balance() {
return Double.valueOf(this.BOSEconomy.getPlayerMoney(this.name));
}
public boolean set(double amount) {
int IntAmount = (int)Math.ceil(amount);
return this.BOSEconomy.setPlayerMoney(this.name, IntAmount, false);
}
public boolean add(double amount) {
int IntAmount = (int)Math.ceil(amount);
return this.BOSEconomy.addPlayerMoney(this.name, IntAmount, false);
}
public boolean subtract(double amount) {
int IntAmount = (int)Math.ceil(amount);
int balance = (int)this.balance();
return this.BOSEconomy.setPlayerMoney(this.name, (balance - IntAmount), false);
}
public boolean multiply(double amount) {
int IntAmount = (int)Math.ceil(amount);
int balance = (int)this.balance();
return this.BOSEconomy.setPlayerMoney(this.name, (balance * IntAmount), false);
}
public boolean divide(double amount) {
int IntAmount = (int)Math.ceil(amount);
int balance = (int)this.balance();
return this.BOSEconomy.setPlayerMoney(this.name, (balance / IntAmount), false);
}
public boolean hasEnough(double amount) {
return (this.balance() >= amount);
}
public boolean hasOver(double amount) {
return (this.balance() > amount);
}
public boolean hasUnder(double amount) {
return (this.balance() < amount);
}
public boolean isNegative() {
return (this.balance() < 0);
}
public boolean remove() {
return false;
}
}
public class BOSEBankAccount implements MethodBankAccount {
private String bank;
private String name;
private BOSEconomy BOSEconomy;
public BOSEBankAccount(String bank, String name, BOSEconomy bOSEconomy) {
this.name = name;
this.bank = bank;
this.BOSEconomy = bOSEconomy;
}
public String getBankName() {
return this.bank;
}
public int getBankId() {
return -1;
}
public double balance() {
return Double.valueOf(this.BOSEconomy.getBankMoney(name));
}
public boolean set(double amount) {
int IntAmount = (int)Math.ceil(amount);
return this.BOSEconomy.setBankMoney(name, IntAmount, true);
}
public boolean add(double amount) {
int IntAmount = (int)Math.ceil(amount);
int balance = (int)this.balance();
return this.BOSEconomy.setBankMoney(this.name, (balance + IntAmount), false);
}
public boolean subtract(double amount) {
int IntAmount = (int)Math.ceil(amount);
int balance = (int)this.balance();
return this.BOSEconomy.setBankMoney(this.name, (balance - IntAmount), false);
}
public boolean multiply(double amount) {
int IntAmount = (int)Math.ceil(amount);
int balance = (int)this.balance();
return this.BOSEconomy.setBankMoney(this.name, (balance * IntAmount), false);
}
public boolean divide(double amount) {
int IntAmount = (int)Math.ceil(amount);
int balance = (int)this.balance();
return this.BOSEconomy.setBankMoney(this.name, (balance / IntAmount), false);
}
public boolean hasEnough(double amount) {
return (this.balance() >= amount);
}
public boolean hasOver(double amount) {
return (this.balance() > amount);
}
public boolean hasUnder(double amount) {
return (this.balance() < amount);
}
public boolean isNegative() {
return (this.balance() < 0);
}
public boolean remove() {
return this.BOSEconomy.removeBank(bank);
}
}
}