diff options
author | ementalo <suror@gmx.co.uk> | 2011-07-15 16:15:29 +0100 |
---|---|---|
committer | ementalo <suror@gmx.co.uk> | 2011-07-15 16:15:29 +0100 |
commit | 3898970bba8fff38235fa173680827fda4a051de (patch) | |
tree | 5923be57bf05afd34dc0771dee6941c0c26f0b6b | |
parent | fb8f89e6dc677e340954805a0efe7392c622cafa (diff) | |
download | Essentials-3898970bba8fff38235fa173680827fda4a051de.tar Essentials-3898970bba8fff38235fa173680827fda4a051de.tar.gz Essentials-3898970bba8fff38235fa173680827fda4a051de.tar.lz Essentials-3898970bba8fff38235fa173680827fda4a051de.tar.xz Essentials-3898970bba8fff38235fa173680827fda4a051de.zip |
balance top output to chat
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java | 7 | ||||
-rw-r--r-- | Essentials/src/messages.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_da.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_de.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_en.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_fr.properties | 1 | ||||
-rw-r--r-- | Essentials/src/messages_nl.properties | 1 |
7 files changed, 13 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java b/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java index 99e91ddca..f811f1d53 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java @@ -7,6 +7,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; public class Commandbalancetop extends EssentialsCommand @@ -40,6 +41,7 @@ public class Commandbalancetop extends EssentialsCommand balances.put(u.getValue(), u.getValue().getMoney()); } int count = 0; + server.broadcastMessage(Util.format("balanceTop", max)); for (Iterator i = Util.sortMapByValueDesc(balances).iterator(); i.hasNext();) { if (count == max) @@ -47,7 +49,12 @@ public class Commandbalancetop extends EssentialsCommand break; } User key = (User)i.next(); + + server.broadcastMessage(key.getDisplayName() + ", " + Util.formatCurrency(balances.get(key))); + if(!(sender instanceof Player)) + { sender.sendMessage(key.getDisplayName() + ", " + Util.formatCurrency(balances.get(key))); + } count++; } } diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index a6c7363a6..0ce89de6c 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -12,6 +12,7 @@ backUsageMsg = \u00a77Returning to previous location. backupFinished = Backup finished backupStarted = Backup started balance = \u00a77Balance: {0} +balanceTop = $7 Top {0} balances banIpAddress = \u00a77Banned IP address bannedIpsFileError = Error reading banned-ips.txt bannedIpsFileNotFound = banned-ips.txt not found diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index c7a69c9c6..c133eaac4 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -14,6 +14,7 @@ backUsageMsg = \u00a77Returnere til tidligere placering. backupFinished = Backup sluttede backupStarted = Backup startede balance = \u00a77Balance: {0} +balanceTop = $7 Top {0} saldi banIpAddress = \u00a77Bannede IP addresse bannedIpsFileError = Fejl i l\u00e6sning af banned-ips.txt bannedIpsFileNotFound = banned-ips.txt ikke fundet diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index f409cda60..3121f3b11 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -12,6 +12,7 @@ backUsageMsg = \u00a77Kehre zur letzten Position zur\u00fcck. backupFinished = Backup beendet backupStarted = Backup gestartet balance = \u00a77Geldb\u00f6rse: {0} +balanceTop = $7 Top {0} Guthaben banIpAddress = \u00a77IP-Adresse gesperrt. bannedIpsFileError = Fehler beim Lesen von banned-ips.txt bannedIpsFileNotFound = banned-ips.txt nicht gefunden diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index a6c7363a6..0ce89de6c 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -12,6 +12,7 @@ backUsageMsg = \u00a77Returning to previous location. backupFinished = Backup finished backupStarted = Backup started balance = \u00a77Balance: {0} +balanceTop = $7 Top {0} balances banIpAddress = \u00a77Banned IP address bannedIpsFileError = Error reading banned-ips.txt bannedIpsFileNotFound = banned-ips.txt not found diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index 174fc528a..753324e55 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -12,6 +12,7 @@ backUsageMsg = \u00a77Retour a votre emplacement pr\u00e9c\u00e8dent. backupFinished = Backup termin\u00e9 backupStarted = D\u00e9but du backup balance = \u00a77Solde: {0} +balanceTop = $7 Top {0} soldes banIpAddress = \u00a77Adresse IP banni bannedIpsFileError = Erreur de lecture de banned-ips.txt bannedIpsFileNotFound = Fichier banned-ips.txt introuvable diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index 6dab37806..de4c309de 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -13,6 +13,7 @@ backUsageMsg = \u00a77Bezig met terugkeren naar vorige locatie. backupFinished = Backup voltooid backupStarted = Backup wordt nu gemaakt balance = \u00a77Saldo: {0} +balanceTop = $7 Top {0} saldi banIpAddress = \u00a77Verboden IP-adres bannedIpsFileError = Fout bij het lezen van banned-ips.txt bannedIpsFileNotFound = banned-ips.txt werd niet gevonden |