summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2013-04-06 05:54:44 +0100
committerKHobbits <rob@khobbits.co.uk>2013-04-06 05:54:44 +0100
commit8777410d3078042fd320c06622a491c90993ab9b (patch)
tree2347dffc24ddae841695c64f76f3b52d1d35fd7a
parent3356db080aff2df29aa612a2aee0fdf3599d775d (diff)
downloadEssentials-8777410d3078042fd320c06622a491c90993ab9b.tar
Essentials-8777410d3078042fd320c06622a491c90993ab9b.tar.gz
Essentials-8777410d3078042fd320c06622a491c90993ab9b.tar.lz
Essentials-8777410d3078042fd320c06622a491c90993ab9b.tar.xz
Essentials-8777410d3078042fd320c06622a491c90993ab9b.zip
Balance others message.
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandbalance.java23
-rw-r--r--Essentials/src/messages.properties1
-rw-r--r--Essentials/src/messages_cs.properties1
-rw-r--r--Essentials/src/messages_da.properties1
-rw-r--r--Essentials/src/messages_de.properties1
-rw-r--r--Essentials/src/messages_en.properties1
-rw-r--r--Essentials/src/messages_es.properties1
-rw-r--r--Essentials/src/messages_fi.properties1
-rw-r--r--Essentials/src/messages_fr.properties1
-rw-r--r--Essentials/src/messages_it.properties1
-rw-r--r--Essentials/src/messages_nl.properties1
-rw-r--r--Essentials/src/messages_pl.properties1
-rw-r--r--Essentials/src/messages_pt.properties1
-rw-r--r--Essentials/src/messages_se.properties1
14 files changed, 28 insertions, 8 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java b/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java
index fde83a561..062709bd4 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java
@@ -21,18 +21,25 @@ public class Commandbalance extends EssentialsCommand
{
throw new NotEnoughArgumentsException();
}
- sender.sendMessage(_("balance", Util.displayCurrency(getPlayer(server, args, 0, true, true).getMoney(), ess)));
+
+ User target = getPlayer(server, args, 0, true, true);
+ sender.sendMessage(_("balanceOther", target.getDisplayName(), Util.displayCurrency(target.getMoney(), ess)));
}
@Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
- //TODO: Remove 'other' perm
- final double bal = (args.length < 1
- || !(user.isAuthorized("essentials.balance.others")
- || user.isAuthorized("essentials.balance.other"))
- ? user
- : getPlayer(server, args, 0, true, true)).getMoney();
- user.sendMessage(_("balance", Util.displayCurrency(bal, ess)));
+
+ if (args.length < 1 || !user.isAuthorized("essentials.balance.others"))
+ {
+ final double bal = user.getMoney();
+ user.sendMessage(_("balance", Util.displayCurrency(bal, ess)));
+ }
+ else
+ {
+ final User target = getPlayer(server, args, 0, true, true);
+ final double bal = target.getMoney();
+ user.sendMessage(_("balanceOther", target.getDisplayName(), Util.displayCurrency(bal, ess)));
+ }
}
}
diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties
index b16549480..9350a4896 100644
--- a/Essentials/src/messages.properties
+++ b/Essentials/src/messages.properties
@@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
+balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
diff --git a/Essentials/src/messages_cs.properties b/Essentials/src/messages_cs.properties
index 64e24ef7c..4ff0431aa 100644
--- a/Essentials/src/messages_cs.properties
+++ b/Essentials/src/messages_cs.properties
@@ -526,3 +526,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
+balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties
index 96a4bacd7..89ac878fd 100644
--- a/Essentials/src/messages_da.properties
+++ b/Essentials/src/messages_da.properties
@@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
+balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties
index 51e0ed7d2..8a1f3b2f9 100644
--- a/Essentials/src/messages_de.properties
+++ b/Essentials/src/messages_de.properties
@@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
+balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties
index b16549480..9350a4896 100644
--- a/Essentials/src/messages_en.properties
+++ b/Essentials/src/messages_en.properties
@@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
+balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties
index 31bb0393a..afd04979b 100644
--- a/Essentials/src/messages_es.properties
+++ b/Essentials/src/messages_es.properties
@@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
+balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
diff --git a/Essentials/src/messages_fi.properties b/Essentials/src/messages_fi.properties
index 46a5b74f9..02c0fa436 100644
--- a/Essentials/src/messages_fi.properties
+++ b/Essentials/src/messages_fi.properties
@@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
+balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties
index 437486f72..f49121394 100644
--- a/Essentials/src/messages_fr.properties
+++ b/Essentials/src/messages_fr.properties
@@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
+balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
diff --git a/Essentials/src/messages_it.properties b/Essentials/src/messages_it.properties
index 5994a4ee1..420441229 100644
--- a/Essentials/src/messages_it.properties
+++ b/Essentials/src/messages_it.properties
@@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
+balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties
index 3177ed485..02bd1c6fa 100644
--- a/Essentials/src/messages_nl.properties
+++ b/Essentials/src/messages_nl.properties
@@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
+balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
diff --git a/Essentials/src/messages_pl.properties b/Essentials/src/messages_pl.properties
index c0cac55a3..68a093cd4 100644
--- a/Essentials/src/messages_pl.properties
+++ b/Essentials/src/messages_pl.properties
@@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a77Graczowi\u00a7c {0} \u00a77 odbanowano IP: {1}.
playerBanIpAddress=\u00a77Gracz\u00a7c {0} \u00a77zostal zbanowany na adres IP {1}\u00a77.
noPotionEffectPerm=\u00a74Nie masz praw by dodac efekt \u00a7c{0} \u00a74tej miksturze.
invalidPotionMeta=\u00a74Niepoprawna wartosc mikstury: \u00a7c{0}\u00a74.
+balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
diff --git a/Essentials/src/messages_pt.properties b/Essentials/src/messages_pt.properties
index 015d10d60..2d2cf3d1c 100644
--- a/Essentials/src/messages_pt.properties
+++ b/Essentials/src/messages_pt.properties
@@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
+balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}
diff --git a/Essentials/src/messages_se.properties b/Essentials/src/messages_se.properties
index 14a1cf677..879c8664c 100644
--- a/Essentials/src/messages_se.properties
+++ b/Essentials/src/messages_se.properties
@@ -523,3 +523,4 @@ playerUnbanIpAddress=\u00a76Player\u00a7c {0} \u00a76unbanned IP: {1}.
playerBanIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1}\u00a76.
noPotionEffectPerm=\u00a74You do not have permission to apply potion effect \u00a7c{0} \u00a74to this potion.
invalidPotionMeta=\u00a74Invalid potion meta: \u00a7c{0}\u00a74.
+balanceOther=\u00a7aBalance of {0}\u00a7a:\u00a7c {1}