summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-10 21:30:31 +0000
committersnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-10 21:30:31 +0000
commit0db4afa5f1c6f215468bc8cd0be18a607439bde9 (patch)
tree803e98feff67e46ed67585e2307d29efd44989cc
parentbcd4ed0fdbbce60ff7575f4c266469c086c601a3 (diff)
downloadEssentials-0db4afa5f1c6f215468bc8cd0be18a607439bde9.tar
Essentials-0db4afa5f1c6f215468bc8cd0be18a607439bde9.tar.gz
Essentials-0db4afa5f1c6f215468bc8cd0be18a607439bde9.tar.lz
Essentials-0db4afa5f1c6f215468bc8cd0be18a607439bde9.tar.xz
Essentials-0db4afa5f1c6f215468bc8cd0be18a607439bde9.zip
Permission essentials.balance.other is now essentials.balance.others
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1413 e251c2fe-e539-e718-e476-b85c1f46cddb
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandbalance.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java b/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java
index 2d623d33e..86eb1f014 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java
@@ -3,13 +3,11 @@ package com.earth2me.essentials.commands;
import org.bukkit.Server;
import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
-import java.text.DecimalFormat;
import org.bukkit.command.CommandSender;
public class Commandbalance extends EssentialsCommand
{
- private static DecimalFormat df = new DecimalFormat("0.##");
public Commandbalance()
{
super("balance");
@@ -22,16 +20,18 @@ public class Commandbalance extends EssentialsCommand
{
throw new NotEnoughArgumentsException();
}
- sender.sendMessage(Util.format("balance",Util.formatCurrency(getPlayer(server, args, 0).getMoney())));
+ sender.sendMessage(Util.format("balance", Util.formatCurrency(getPlayer(server, args, 0).getMoney())));
}
@Override
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
{
charge(user);
- double bal = (args.length < 1 || !user.isAuthorized("essentials.balance.other")
- ? user
- : getPlayer(server, args, 0)).getMoney();
- user.sendMessage(Util.format("balance",Util.formatCurrency(bal)));
+ double bal = (args.length < 1
+ || !user.isAuthorized("essentials.balance.others")
+ || !user.isAuthorized("essentials.balance.other")
+ ? user
+ : getPlayer(server, args, 0)).getMoney();
+ user.sendMessage(Util.format("balance", Util.formatCurrency(bal)));
}
}