summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/nbproject/project.properties6
-rw-r--r--Essentials/src/com/earth2me/essentials/register/payment/Methods.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE6.java334
-rw-r--r--Essentials/src/com/earth2me/essentials/register/payment/methods/iCo4.java256
-rw-r--r--Essentials/src/net/ess3/api/events/UserToggleGodmodeEvent.java52
-rw-r--r--lib/Permissions.jarbin32227 -> 0 bytes
-rw-r--r--lib/Permissions3.jarbin78579 -> 0 bytes
-rw-r--r--lib/bPermissions.jarbin109921 -> 0 bytes
-rw-r--r--lib/iCo4.jarbin97249 -> 0 bytes
9 files changed, 52 insertions, 598 deletions
diff --git a/Essentials/nbproject/project.properties b/Essentials/nbproject/project.properties
index 409eb7956..7537d9812 100644
--- a/Essentials/nbproject/project.properties
+++ b/Essentials/nbproject/project.properties
@@ -65,15 +65,12 @@ dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
file.reference.BOSEconomy7.jar=../lib/BOSEconomy7.jar
-file.reference.bPermissions.jar=../lib/bPermissions.jar
file.reference.bpermissions2.jar=../lib/bpermissions2.jar
file.reference.bukkit.jar=../lib/bukkit.jar
-file.reference.iCo4.jar=../lib/iCo4.jar
file.reference.iCo5.jar=../lib/iCo5.jar
file.reference.iCo6.jar=../lib/iCo6.jar
file.reference.lombok.jar=../lib/lombok-0.10.8.jar
file.reference.MultiCurrency.jar=../lib/MultiCurrency.jar
-file.reference.Permissions3.jar=../lib/Permissions3.jar
file.reference.PermissionsBukkit-1.2.jar=../lib/PermissionsBukkit-1.2.jar
file.reference.PermissionsEx.jar=../lib/PermissionsEx.jar
file.reference.Privileges.jar=..\\lib\\Privileges.jar
@@ -85,14 +82,11 @@ jar.archive.disabled=${jnlp.enabled}
jar.compress=true
jar.index=${jnlp.enabled}
javac.classpath=\
- ${file.reference.Permissions3.jar}:\
- ${file.reference.iCo4.jar}:\
${file.reference.iCo5.jar}:\
${file.reference.iCo6.jar}:\
${file.reference.MultiCurrency.jar}:\
${file.reference.BOSEconomy7.jar}:\
${file.reference.PermissionsEx.jar}:\
- ${file.reference.bPermissions.jar}:\
${file.reference.PermissionsBukkit-1.2.jar}:\
${file.reference.lombok.jar}:\
${reference.EssentialsGroupManager.jar}:\
diff --git a/Essentials/src/com/earth2me/essentials/register/payment/Methods.java b/Essentials/src/com/earth2me/essentials/register/payment/Methods.java
index f8729923e..9eb5f0da3 100644
--- a/Essentials/src/com/earth2me/essentials/register/payment/Methods.java
+++ b/Essentials/src/com/earth2me/essentials/register/payment/Methods.java
@@ -47,8 +47,6 @@ public class Methods
{
addMethod("iConomy", new com.earth2me.essentials.register.payment.methods.iCo6());
addMethod("iConomy", new com.earth2me.essentials.register.payment.methods.iCo5());
- addMethod("iConomy", new com.earth2me.essentials.register.payment.methods.iCo4());
- addMethod("BOSEconomy", new com.earth2me.essentials.register.payment.methods.BOSE6());
addMethod("BOSEconomy", new com.earth2me.essentials.register.payment.methods.BOSE7());
addMethod("Currency", new com.earth2me.essentials.register.payment.methods.MCUR());
Dependencies.add("MultiCurrency");
diff --git a/Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE6.java b/Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE6.java
deleted file mode 100644
index a77a1d3b0..000000000
--- a/Essentials/src/com/earth2me/essentials/register/payment/methods/BOSE6.java
+++ /dev/null
@@ -1,334 +0,0 @@
-package com.earth2me.essentials.register.payment.methods;
-
-import com.earth2me.essentials.register.payment.Method;
-import cosine.boseconomy.BOSEconomy;
-import org.bukkit.plugin.Plugin;
-
-
-/**
- * BOSEconomy 6 Implementation of Method
- *
- * @author Nijikokun <nijikokun@shortmail.com> (@nijikokun) @copyright (c) 2011 @license AOL license
- * <http://aol.nexua.org>
- */
-@SuppressWarnings("deprecation")
-public class BOSE6 implements Method
-{
- private BOSEconomy BOSEconomy;
-
- @Override
- public BOSEconomy getPlugin()
- {
- return this.BOSEconomy;
- }
-
- @Override
- public String getName()
- {
- return "BOSEconomy";
- }
-
- @Override
- public String getLongName()
- {
- return getName();
- }
-
- @Override
- public String getVersion()
- {
- return "0.6.2";
- }
-
- @Override
- public int fractionalDigits()
- {
- return 0;
- }
-
- @Override
- public String format(double amount)
- {
- String currency = this.BOSEconomy.getMoneyNamePlural();
-
- if (amount == 1)
- {
- currency = this.BOSEconomy.getMoneyName();
- }
-
- return amount + " " + currency;
- }
-
- @Override
- public boolean hasBanks()
- {
- return true;
- }
-
- @Override
- public boolean hasBank(String bank)
- {
- return this.BOSEconomy.bankExists(bank);
- }
-
- @Override
- public boolean hasAccount(String name)
- {
- return this.BOSEconomy.playerRegistered(name, false);
- }
-
- @Override
- public boolean hasBankAccount(String bank, String name)
- {
- return this.BOSEconomy.isBankOwner(bank, name)
- || this.BOSEconomy.isBankMember(bank, name);
- }
-
- @Override
- public boolean createAccount(String name)
- {
- if (hasAccount(name))
- {
- return false;
- }
-
- this.BOSEconomy.registerPlayer(name);
- return true;
- }
-
- @Override
- public boolean createAccount(String name, Double balance)
- {
- if (hasAccount(name))
- {
- return false;
- }
-
- this.BOSEconomy.registerPlayer(name);
- this.BOSEconomy.setPlayerMoney(name, balance, false);
- return true;
- }
-
- @Override
- public MethodAccount getAccount(String name)
- {
- if (!hasAccount(name))
- {
- return null;
- }
-
- return new BOSEAccount(name, this.BOSEconomy);
- }
-
- @Override
- public MethodBankAccount getBankAccount(String bank, String name)
- {
- if (!hasBankAccount(bank, name))
- {
- return null;
- }
-
- return new BOSEBankAccount(bank, BOSEconomy);
- }
-
- @Override
- public boolean isCompatible(Plugin plugin)
- {
- return plugin.getDescription().getName().equalsIgnoreCase("boseconomy")
- && plugin instanceof BOSEconomy
- && plugin.getDescription().getVersion().equals("0.6.2");
- }
-
- @Override
- public void setPlugin(Plugin plugin)
- {
- BOSEconomy = (BOSEconomy)plugin;
- }
-
-
- public class BOSEAccount implements MethodAccount
- {
- private final String name;
- private final BOSEconomy BOSEconomy;
-
- public BOSEAccount(String name, BOSEconomy bOSEconomy)
- {
- this.name = name;
- this.BOSEconomy = bOSEconomy;
- }
-
- @Override
- public double balance()
- {
- return (double)this.BOSEconomy.getPlayerMoney(this.name);
- }
-
- @Override
- public boolean set(double amount)
- {
- int IntAmount = (int)Math.ceil(amount);
- return this.BOSEconomy.setPlayerMoney(this.name, IntAmount, false);
- }
-
- @Override
- public boolean add(double amount)
- {
- int IntAmount = (int)Math.ceil(amount);
- return this.BOSEconomy.addPlayerMoney(this.name, IntAmount, false);
- }
-
- @Override
- 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);
- }
-
- @Override
- 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);
- }
-
- @Override
- 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);
- }
-
- @Override
- public boolean hasEnough(double amount)
- {
- return (this.balance() >= amount);
- }
-
- @Override
- public boolean hasOver(double amount)
- {
- return (this.balance() > amount);
- }
-
- @Override
- public boolean hasUnder(double amount)
- {
- return (this.balance() < amount);
- }
-
- @Override
- public boolean isNegative()
- {
- return (this.balance() < 0);
- }
-
- @Override
- public boolean remove()
- {
- return false;
- }
- }
-
-
- public class BOSEBankAccount implements MethodBankAccount
- {
- private final String bank;
- private final BOSEconomy BOSEconomy;
-
- public BOSEBankAccount(String bank, BOSEconomy bOSEconomy)
- {
- this.bank = bank;
- this.BOSEconomy = bOSEconomy;
- }
-
- @Override
- public String getBankName()
- {
- return this.bank;
- }
-
- @Override
- public int getBankId()
- {
- return -1;
- }
-
- @Override
- public double balance()
- {
- return (double)this.BOSEconomy.getBankMoney(bank);
- }
-
- @Override
- public boolean set(double amount)
- {
- int IntAmount = (int)Math.ceil(amount);
- return this.BOSEconomy.setBankMoney(bank, IntAmount, true);
- }
-
- @Override
- public boolean add(double amount)
- {
- int IntAmount = (int)Math.ceil(amount);
- int balance = (int)this.balance();
- return this.BOSEconomy.setBankMoney(bank, (balance + IntAmount), false);
- }
-
- @Override
- public boolean subtract(double amount)
- {
- int IntAmount = (int)Math.ceil(amount);
- int balance = (int)this.balance();
- return this.BOSEconomy.setBankMoney(bank, (balance - IntAmount), false);
- }
-
- @Override
- public boolean multiply(double amount)
- {
- int IntAmount = (int)Math.ceil(amount);
- int balance = (int)this.balance();
- return this.BOSEconomy.setBankMoney(bank, (balance * IntAmount), false);
- }
-
- @Override
- public boolean divide(double amount)
- {
- int IntAmount = (int)Math.ceil(amount);
- int balance = (int)this.balance();
- return this.BOSEconomy.setBankMoney(bank, (balance / IntAmount), false);
- }
-
- @Override
- public boolean hasEnough(double amount)
- {
- return (this.balance() >= amount);
- }
-
- @Override
- public boolean hasOver(double amount)
- {
- return (this.balance() > amount);
- }
-
- @Override
- public boolean hasUnder(double amount)
- {
- return (this.balance() < amount);
- }
-
- @Override
- public boolean isNegative()
- {
- return (this.balance() < 0);
- }
-
- @Override
- public boolean remove()
- {
- return this.BOSEconomy.removeBank(bank);
- }
- }
-} \ No newline at end of file
diff --git a/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo4.java b/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo4.java
deleted file mode 100644
index 4542f6743..000000000
--- a/Essentials/src/com/earth2me/essentials/register/payment/methods/iCo4.java
+++ /dev/null
@@ -1,256 +0,0 @@
-package com.earth2me.essentials.register.payment.methods;
-
-import com.earth2me.essentials.register.payment.Method;
-import com.nijiko.coelho.iConomy.iConomy;
-import com.nijiko.coelho.iConomy.system.Account;
-import org.bukkit.plugin.Plugin;
-
-
-/**
- * iConomy 4 Implementation of Method
- *
- * @author Nijikokun <nijikokun@shortmail.com> (@nijikokun) @copyright (c) 2011 @license AOL license
- * <http://aol.nexua.org>
- */
-public class iCo4 implements Method
-{
- private iConomy iConomy;
-
- @Override
- public iConomy getPlugin()
- {
- return this.iConomy;
- }
-
- @Override
- public String getName()
- {
- return "iConomy";
- }
-
- @Override
- public String getLongName()
- {
- return getName();
- }
-
- @Override
- public String getVersion()
- {
- return "4";
- }
-
- @Override
- public int fractionalDigits()
- {
- return 2;
- }
-
- @Override
- public String format(double amount)
- {
- return com.nijiko.coelho.iConomy.iConomy.getBank().format(amount);
- }
-
- @Override
- public boolean hasBanks()
- {
- return false;
- }
-
- @Override
- public boolean hasBank(String bank)
- {
- return false;
- }
-
- @Override
- public boolean hasAccount(String name)
- {
- return com.nijiko.coelho.iConomy.iConomy.getBank().hasAccount(name);
- }
-
- @Override
- public boolean hasBankAccount(String bank, String name)
- {
- return false;
- }
-
- @Override
- public boolean createAccount(String name)
- {
- if (hasAccount(name))
- {
- return false;
- }
-
- try
- {
- com.nijiko.coelho.iConomy.iConomy.getBank().addAccount(name);
- }
- catch (Exception E)
- {
- return false;
- }
-
- return true;
- }
-
- @Override
- public boolean createAccount(String name, Double balance)
- {
- if (hasAccount(name))
- {
- return false;
- }
-
- try
- {
- com.nijiko.coelho.iConomy.iConomy.getBank().addAccount(name, balance);
- }
- catch (Exception E)
- {
- return false;
- }
-
- return true;
- }
-
- @Override
- public MethodAccount getAccount(String name)
- {
- return new iCoAccount(com.nijiko.coelho.iConomy.iConomy.getBank().getAccount(name));
- }
-
- @Override
- public MethodBankAccount getBankAccount(String bank, String name)
- {
- return null;
- }
-
- @Override
- public boolean isCompatible(Plugin plugin)
- {
- return plugin.getDescription().getName().equalsIgnoreCase("iconomy")
- && plugin.getClass().getName().equals("com.nijiko.coelho.iConomy.iConomy")
- && plugin instanceof iConomy;
- }
-
- @Override
- public void setPlugin(Plugin plugin)
- {
- iConomy = (iConomy)plugin;
- }
-
-
- public class iCoAccount implements MethodAccount
- {
- private Account account;
-
- public iCoAccount(Account account)
- {
- this.account = account;
- }
-
- public Account getiCoAccount()
- {
- return account;
- }
-
- @Override
- public double balance()
- {
- return this.account.getBalance();
- }
-
- @Override
- public boolean set(double amount)
- {
- if (this.account == null)
- {
- return false;
- }
- this.account.setBalance(amount);
- return true;
- }
-
- @Override
- public boolean add(double amount)
- {
- if (this.account == null)
- {
- return false;
- }
- this.account.add(amount);
- return true;
- }
-
- @Override
- public boolean subtract(double amount)
- {
- if (this.account == null)
- {
- return false;
- }
- this.account.subtract(amount);
- return true;
- }
-
- @Override
- public boolean multiply(double amount)
- {
- if (this.account == null)
- {
- return false;
- }
- this.account.multiply(amount);
- return true;
- }
-
- @Override
- public boolean divide(double amount)
- {
- if (this.account == null)
- {
- return false;
- }
- this.account.divide(amount);
- return true;
- }
-
- @Override
- public boolean hasEnough(double amount)
- {
- return this.account.hasEnough(amount);
- }
-
- @Override
- public boolean hasOver(double amount)
- {
- return this.account.hasOver(amount);
- }
-
- @Override
- public boolean hasUnder(double amount)
- {
- return (this.balance() < amount);
- }
-
- @Override
- public boolean isNegative()
- {
- return this.account.isNegative();
- }
-
- @Override
- public boolean remove()
- {
- if (this.account == null)
- {
- return false;
- }
- this.account.remove();
- return true;
- }
- }
-}
diff --git a/Essentials/src/net/ess3/api/events/UserToggleGodmodeEvent.java b/Essentials/src/net/ess3/api/events/UserToggleGodmodeEvent.java
new file mode 100644
index 000000000..0b50a92ae
--- /dev/null
+++ b/Essentials/src/net/ess3/api/events/UserToggleGodmodeEvent.java
@@ -0,0 +1,52 @@
+package net.ess3.api.events;
+
+import com.earth2me.essentials.User;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+
+
+public class UserToggleGodmodeEvent extends Event implements Cancellable
+{
+ private static final HandlerList handlers = new HandlerList();
+ private boolean cancelled;
+ private User user;
+ private boolean enabled;
+
+ /**
+ * Thrown when a user's god mode is toggled.
+ *
+ * @param user - the user whose god mode is toggled.
+ * @param enabled - true if god mode was enabled, false if disabled.
+ */
+ public UserToggleGodmodeEvent (User user, boolean enabled)
+ {
+ enabled = this.enabled;
+ user = this.user;
+ this.cancelled = false;
+ }
+
+ @Override
+ public HandlerList getHandlers()
+ {
+ return handlers;
+ }
+
+ public static HandlerList getHandlerList()
+ {
+ return handlers;
+ }
+
+ @Override
+ public boolean isCancelled()
+ {
+ return cancelled;
+ }
+
+ @Override
+ public void setCancelled(boolean cancelled)
+ {
+ this.cancelled = cancelled;
+ }
+
+}
diff --git a/lib/Permissions.jar b/lib/Permissions.jar
deleted file mode 100644
index e2aa6520b..000000000
--- a/lib/Permissions.jar
+++ /dev/null
Binary files differ
diff --git a/lib/Permissions3.jar b/lib/Permissions3.jar
deleted file mode 100644
index 31c3e5d99..000000000
--- a/lib/Permissions3.jar
+++ /dev/null
Binary files differ
diff --git a/lib/bPermissions.jar b/lib/bPermissions.jar
deleted file mode 100644
index 8fa949ce6..000000000
--- a/lib/bPermissions.jar
+++ /dev/null
Binary files differ
diff --git a/lib/iCo4.jar b/lib/iCo4.jar
deleted file mode 100644
index 6cb256b66..000000000
--- a/lib/iCo4.jar
+++ /dev/null
Binary files differ