From e277acf80eab14b75c999881b009616a949f52a5 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 26 Feb 2012 04:27:13 +0000 Subject: Display users new balance on /eco give/take. --- Essentials/src/com/earth2me/essentials/User.java | 4 ++-- Essentials/src/com/earth2me/essentials/commands/Commandeco.java | 9 +++++++-- Essentials/src/messages.properties | 4 ++-- Essentials/src/messages_da.properties | 4 ++-- Essentials/src/messages_de.properties | 4 ++-- Essentials/src/messages_en.properties | 4 ++-- Essentials/src/messages_es.properties | 4 ++-- Essentials/src/messages_fr.properties | 4 ++-- Essentials/src/messages_nl.properties | 4 ++-- 9 files changed, 23 insertions(+), 18 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index a799653a8..501577878 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -109,7 +109,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser sendMessage(_("addedToAccount", Util.formatCurrency(value, ess))); if (initiator != null) { - initiator.sendMessage(_("addedToOthersAccount", Util.formatCurrency(value, ess), this.getDisplayName())); + initiator.sendMessage(_("addedToOthersAccount", Util.formatCurrency(value, ess), this.getDisplayName(), Util.formatCurrency(getMoney(), ess))); } } @@ -148,7 +148,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser sendMessage(_("takenFromAccount", Util.formatCurrency(value, ess))); if (initiator != null) { - initiator.sendMessage(_("takenFromOthersAccount", Util.formatCurrency(value, ess), this.getDisplayName())); + initiator.sendMessage(_("takenFromOthersAccount", Util.formatCurrency(value, ess), this.getDisplayName(), Util.formatCurrency(getMoney(), ess))); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java index d2efc1845..b9694ee49 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java @@ -46,8 +46,9 @@ public class Commandeco extends EssentialsCommand break; case TAKE: - if (!player.canAfford(amount, false)) { - throw new Exception(_("notEnoughMoney")); + if (!player.canAfford(amount, false)) + { + throw new Exception(_("notEnoughMoney")); } player.takeMoney(amount); break; @@ -68,6 +69,10 @@ public class Commandeco extends EssentialsCommand break; case TAKE: + if (!player.canAfford(amount, false)) + { + throw new Exception(_("notEnoughMoney")); + } player.takeMoney(amount, sender); break; diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index 8489b6262..118c61ca4 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -4,7 +4,7 @@ # by: action=* {0} {1} addedToAccount=\u00a7a{0} has been added to your account. -addedToOthersAccount=\u00a7a{0} has been added to {1} account. +addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} alertBroke=broke: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3} alertPlaced=placed: @@ -318,7 +318,7 @@ suicideMessage=\u00a77Goodbye Cruel World... suicideSuccess= \u00a77{0} took their own life survival=survival takenFromAccount=\u00a7c{0} has been taken from your account. -takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. +takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} teleportAAll=\u00a77Teleporting request sent to all players... teleportAll=\u00a77Teleporting all players... teleportationCommencing=\u00a77Teleportation commencing... diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index 82145afc1..a2719ddd1 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -4,7 +4,7 @@ # by: Dysp, dysperen@gmail.com action=* {0} {1} addedToAccount=\u00a7a{0} er blevet tilf\u00f8jet til din konto. -addedToOthersAccount=\u00a7a{0} er blevet tilf\u00f8jet til {1} konto. +addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} alertBroke=\u00f8delagde: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} ved: {3} alertPlaced=placerede: @@ -318,7 +318,7 @@ suicideMessage=\u00a77Farvel grusomme verden... suicideSuccess= \u00a77{0} tog sit eget liv survival=survival takenFromAccount=\u00a7c{0} er blevet taget fra din konto. -takenFromOthersAccount=\u00a7c{0} er blevet taget fra {1}''s konto. +takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} teleportAAll=\u00a77Anmodning om teleport er sendt til alle spillere. teleportAll=\u00a77Teleporterer alle spillere... teleportationCommencing=\u00a77Teleport begynder... diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index 2572f7cf2..b5ca8a800 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -4,7 +4,7 @@ # by: action=* {0} {1} addedToAccount=\u00a7a{0} wurden zu deiner Geldb\u00f6rse hinzugef\u00fcgt. -addedToOthersAccount=\u00a7a{0} wurden zu {1}s Konto hinzugef\u00fcgt. +addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} alertBroke=zerst\u00f6rt: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} bei: {3} alertPlaced=platziert: @@ -318,7 +318,7 @@ suicideMessage=\u00a77Lebewohl grausame Welt... suicideSuccess= \u00a77{0} hat sich das Leben genommen. survival=survival takenFromAccount=\u00a7c{0} wurden aus deiner Geldb\u00f6rse genommen. -takenFromOthersAccount=\u00a7c{0} wurde von {1} wurde Rechnung getragen. +takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} teleportAAll=\u00a77Teleportierungsanfrage zu allen Spielern gesendet... teleportAll=\u00a77Teleportiere alle Spieler... teleportAtoB=\u00a77{0}\u00a77 teleportiert dich zu {1}\u00a77. diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index a2acdf9a2..dac209927 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -4,7 +4,7 @@ # by: action=* {0} {1} addedToAccount=\u00a7a{0} has been added to your account. -addedToOthersAccount=\u00a7a{0} has been added to {1} account. +addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} alertBroke=broke: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} at: {3} alertPlaced=placed: @@ -318,7 +318,7 @@ suicideMessage=\u00a77Goodbye Cruel World... suicideSuccess= \u00a77{0} took their own life survival=survival takenFromAccount=\u00a7c{0} has been taken from your account. -takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. +takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} teleportAAll=\u00a77Teleporting request sent to all players... teleportAll=\u00a77Teleporting all players... teleportationCommencing=\u00a77Teleportation commencing... diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index 38d62f6c4..0c1ca7452 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -4,7 +4,7 @@ # by: action=* {0} {1} addedToAccount=\u00a7a{0} ha sido agregado a tu cuenta. -addedToOthersAccount=\u00a7a{0} ha sido agregado a la cuenta de {1}. +addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} alertBroke=roto: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} en: {3} alertPlaced=situado: @@ -318,7 +318,7 @@ suicideMessage=\u00a77Adios mundo cruel... suicideSuccess= \u00a77{0} se quito su propia vida survival=survival takenFromAccount=\u00a7c{0} ha sido sacado de tu cuenta. -takenFromOthersAccount=\u00a7c{0} ha sido sacado de la cuenta de {1}. +takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} teleportAAll=\u00a77Peticion de teletransporte enviada a todos los jugadores... teleportAll=\u00a77Teletransportando a todos los jugadores... teleportationCommencing=\u00a77Comenzando teletransporte... diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index 290c1b668..bd93cb8e8 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -4,7 +4,7 @@ # by: L\u00e9a Gris action=* {0} {1} addedToAccount=\u00a7a{0} a \u00e9t\u00e9 rajout\u00e9 \u00e0 votre compte. -addedToOthersAccount=\u00a7a{0} a \u00e9t\u00e9 ajout\u00e9 \u00e0 {1} compte. +addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} alertBroke=a cass\u00e9 : alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} \u00e0:{3} alertPlaced=a plac\u00e9 : @@ -318,7 +318,7 @@ suicideMessage=\u00a77Au revoir monde cruel... suicideSuccess=\u00a77{0} s''est suicid\u00e9. survival=survie takenFromAccount=\u00a7c{0} ont \u00e9t\u00e9 retir\u00e9 de votre compte. -takenFromOthersAccount=\u00a7c{0} a \u00e9t\u00e9 r\u00e9tir\u00e9 du compte de {1}. +takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} teleportAAll=\u00a77Demande de t\u00e9l\u00e9portation envoy\u00e9e \u00e0 tous les joueurs... teleportAll=\u00a77T\u00e9l\u00e9poration de tous les joueurs. teleportationCommencing=\u00a77D\u00e9but de la t\u00e9l\u00e9portation... diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index 8997bfec6..f2c9f9b2f 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -4,7 +4,7 @@ # by: Geertje123 action=* {0} {1} addedToAccount=\u00a7a{0} is gestort op je account. -addedToOthersAccount=\u00a7a{0} is overgemaakt naar {1}''s rekening +addedToOthersAccount=\u00a7a{0} has been added to {1} account. New balance: {2} alertBroke=gebroken: alertFormat=\u00a73[{0}] \u00a7f {1} \u00a76 {2} bij: {3} alertPlaced=geplaatst: @@ -318,7 +318,7 @@ suicideMessage=\u00a77Vaarwel vreedzame wereld... suicideSuccess= \u00a77{0} pleegde zelfmoord survival=survival takenFromAccount=\u00a7c{0} is van je bank rekening afgehaald. -takenFromOthersAccount=\u00a7c{0} is overgenomen uit {1} account. +takenFromOthersAccount=\u00a7c{0} has been taken from {1} account. New balance: {2} teleportAAll=\u00a77Teleporting request sent to all players... teleportAll=\u00a77Bezig met teleporteren van alle spelers... teleportationCommencing=\u00a77Aan het beginnen met teleporteren... -- cgit v1.2.3