From 0db4afa5f1c6f215468bc8cd0be18a607439bde9 Mon Sep 17 00:00:00 2001 From: snowleo Date: Tue, 10 May 2011 21:30:31 +0000 Subject: [PATCH] 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 --- .../essentials/commands/Commandbalance.java | 14 +++++++------- 1 file 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))); } }