summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandeco.java26
1 files changed, 25 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java
index b9694ee49..dd6d6ad0d 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java
@@ -34,7 +34,31 @@ public class Commandeco extends EssentialsCommand
throw new NotEnoughArgumentsException(ex);
}
- if (args[1].contentEquals("*"))
+ if (args[1].contentEquals("**"))
+ {
+ for (String sUser : ess.getUserMap().getAllUniqueUsers())
+ {
+ final User player = ess.getUser(sUser);
+ switch (cmd)
+ {
+ case GIVE:
+ player.giveMoney(amount);
+ break;
+
+ case TAKE:
+ if (player.canAfford(amount, false))
+ {
+ player.takeMoney(amount);
+ }
+ break;
+
+ case RESET:
+ player.setMoney(amount == 0 ? ess.getSettings().getStartingBalance() : amount);
+ break;
+ }
+ }
+ }
+ else if (args[1].contentEquals("*"))
{
for (Player onlinePlayer : server.getOnlinePlayers())
{