diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbanip.java b/Essentials/src/com/earth2me/essentials/commands/Commandbanip.java index 5459bd8fc..6af0c4216 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbanip.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbanip.java @@ -1,9 +1,13 @@ package com.earth2me.essentials.commands; +import com.earth2me.essentials.Console; import static com.earth2me.essentials.I18n._; +import com.earth2me.essentials.OfflinePlayer; import com.earth2me.essentials.User; +import java.util.logging.Level; import org.bukkit.Server; import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; public class Commandbanip extends EssentialsCommand @@ -26,7 +30,7 @@ public class Commandbanip extends EssentialsCommand if (player == null) { ess.getServer().banIP(args[0]); - sender.sendMessage(_("banIpAddress")); + sender.sendMessage(_("banIpAddress"), senderName, args[0]); } else { @@ -35,8 +39,17 @@ public class Commandbanip extends EssentialsCommand { throw new Exception(_("playerNotFound")); } - ess.getServer().banIP(player.getLastLoginAddress()); - sender.sendMessage(_("banIpAddress")); + ess.getServer().banIP(ipAddress); + final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME; + server.getLogger().log(Level.INFO, _("banIpAddress", senderName, ipAddress)); + for (Player onlinePlayer : server.getOnlinePlayers()) + { + final User player = ess.getUser(onlinePlayer); + if (onlinePlayer == sender || player.isAuthorized("essentials.ban.notify")) + { + sender.sendMessage(_("banIpAddress", senderName, ipAddress)); + } + } } } } diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index d973c9c8a..2d23db402 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -24,7 +24,7 @@ balance=\u00a7aBalance:\u00a7c {0} balanceTop=\u00a76Top balances ({0}) banExempt=\u00a74You can not ban that player. banFormat=\u00a74Banned:\n\u00a7r{0} -banIpAddress=\u00a76Banned IP address +banIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1} \u00a76. bigTreeFailure=\u00a74Big tree generation failure. Try again on grass or dirt. bigTreeSuccess= \u00a76Big tree spawned. blockList=\u00a76Essentials relayed the following commands to another plugin: diff --git a/Essentials/src/messages_cs.properties b/Essentials/src/messages_cs.properties index 90a906ddc..ae03d3fc7 100644 --- a/Essentials/src/messages_cs.properties +++ b/Essentials/src/messages_cs.properties @@ -27,7 +27,7 @@ balance=\u00a77Ucet: {0} balanceTop=\u00a77Nejbohatsi hraci ({0}) banExempt=\u00a7cNemuzes zabanovat tohoto hrace. banFormat=Banned: {0} -banIpAddress=\u00a77IP Adresa byla zabanovana +banIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1} \u00a76. bigTreeFailure=\u00a7cProblem pri vytvareni velkeho stromu. Zkuste znovu na trave nebo hline. bigTreeSuccess= \u00a77Velky strom vytvoren. blockList=Essentials prenechal nasledujici prikazy jinemu pluginu: diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties index 97e3942e8..2c433c3f9 100644 --- a/Essentials/src/messages_da.properties +++ b/Essentials/src/messages_da.properties @@ -24,7 +24,7 @@ balance=\u00a77Saldo: {0} balanceTop=\u00a77Top saldoer ({0}) banExempt=\u00a7cDu kan ikke banne den p\u00e5g\u00e6ldende spiller. banFormat=Banned: {0} -banIpAddress=\u00a77Bannede IP addresse +banIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1} \u00a76. bigTreeFailure=\u00a7cFejl i generering af stort tr\u00e6. Pr\u00f8v igen p\u00e5 gr\u00e6s eller jord. bigTreeSuccess= \u00a77Stort tr\u00e6 bygget. blockList=Essentials relayed the following commands to another plugin: diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties index a7e515228..75f40ecd3 100644 --- a/Essentials/src/messages_de.properties +++ b/Essentials/src/messages_de.properties @@ -24,7 +24,7 @@ balance=\u00a77Geldb\u00f6rse: {0} balanceTop=\u00a77Top Guthaben ({0}) banExempt=\u00a7cDu kannst diesen Spieler nicht sperren. banFormat=Banned: {0} -banIpAddress=\u00a77IP-Adresse gesperrt. +banIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1} \u00a76. bigTreeFailure=\u00a7cFehler beim Pflanzen eines grossen Baums. Versuch es auf Gras oder Dreck. bigTreeSuccess= \u00a77Grosser Baum gepflanzt. blockList=Essentials relayed the following commands to another plugin: diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties index 766e4101e..0dc095fe9 100644 --- a/Essentials/src/messages_en.properties +++ b/Essentials/src/messages_en.properties @@ -24,7 +24,7 @@ balance=\u00a7aBalance:\u00a7c {0} balanceTop=\u00a76Top balances ({0}) banExempt=\u00a74You can not ban that player. banFormat=\u00a74Banned:\n\u00a7r{0} -banIpAddress=\u00a76Banned IP address +banIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1} \u00a76. bigTreeFailure=\u00a74Big tree generation failure. Try again on grass or dirt. bigTreeSuccess= \u00a76Big tree spawned. blockList=\u00a76Essentials relayed the following commands to another plugin: diff --git a/Essentials/src/messages_es.properties b/Essentials/src/messages_es.properties index 742ee9964..76a1046d8 100644 --- a/Essentials/src/messages_es.properties +++ b/Essentials/src/messages_es.properties @@ -24,7 +24,7 @@ balance=\u00a77Cantidad: {0} balanceTop=\u00a77Ranking de cantidades ({0}) banExempt=\u00a7cNo puedes bannear a ese jugador. banFormat=Banned: {0} -banIpAddress=\u00a77Direccion IP baneada. +banIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1} \u00a76. bigTreeFailure=\u00a7cBig Generacion de arbol fallida. Prueba de nuevo en hierba o arena. bigTreeSuccess= \u00a77Big Arbol generado. blockList=Essentials le ha cedido los siguientes comandos a otros plugins: diff --git a/Essentials/src/messages_fi.properties b/Essentials/src/messages_fi.properties index 62445b71b..00fad3081 100644 --- a/Essentials/src/messages_fi.properties +++ b/Essentials/src/messages_fi.properties @@ -24,7 +24,7 @@ balance=\u00a77Rahatilanne: {0} balanceTop=\u00a77Top rahatilanteet ({0}) banExempt=\u00a7cEt voi bannia pelaajaa. banFormat=Banned: {0} -banIpAddress=\u00a77Bannattu IP osoite +banIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1} \u00a76. bigTreeFailure=\u00a7cIson puun luominen ep\u00e4onnistui. Yrit\u00e4 uudelleen nurmikolla tai mullalla. bigTreeSuccess= \u00a77Iso puu luotu. blockList=Essentials siirsi seuraavat komennot muihin plugineihin: diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties index 01e1ec859..3e2088b84 100644 --- a/Essentials/src/messages_fr.properties +++ b/Essentials/src/messages_fr.properties @@ -24,7 +24,7 @@ balance=\u00a77Solde : {0} balanceTop=\u00a77Meilleurs soldes au ({0}) banExempt=\u00a77Vous ne pouvez pas bannir ce joueur. banFormat=Banni : {0} -banIpAddress=\u00a77Adresse IP bannie. +banIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1} \u00a76. bigTreeFailure=\u00a7c\u00c9chec de la g\u00e9n\u00e9ration du gros arbre. Essayez de nouveau sur de la terre ou de l'herbe. bigTreeSuccess=\u00a77Gros arbre cr\u00e9e. blockList=Essentials a relay\u00e9 les commandes suivantes \u00e0 un autre plugin : diff --git a/Essentials/src/messages_it.properties b/Essentials/src/messages_it.properties index fef00906c..076a90302 100644 --- a/Essentials/src/messages_it.properties +++ b/Essentials/src/messages_it.properties @@ -24,7 +24,7 @@ balance=\u00a77Bilancio: {0} balanceTop=\u00a77Top bilanci ({0}) banExempt=\u00a7cNon puoi bannare questo player. banFormat=Banned: {0} -banIpAddress=\u00a77IP address bannato +banIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1} \u00a76. bigTreeFailure=\u00a7cCreazione del grande albero fallita. Riprova sull''erba o sul terreno. bigTreeSuccess= \u00a77Grande albero creato. blockList=Essentials ha trasmesso i seguenti comandi ad un altro plugin: diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties index 879b03924..08b723180 100644 --- a/Essentials/src/messages_nl.properties +++ b/Essentials/src/messages_nl.properties @@ -24,7 +24,7 @@ balance=\u00a77Saldo: {0} balanceTop=\u00a77 Top saldo ({0}) banExempt=\u00a77Je kunt deze speler niet verbannen. banFormat=Banned: {0} -banIpAddress=\u00a77Verbannen IP-adres. +banIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1} \u00a76. bigTreeFailure=\u00a7cMaken van een grote boom is mislukt. Probeer het opnieuw op gras of dirt. bigTreeSuccess= \u00a77Grote boom gemaakt. blockList=Essentials heeft de volgende commandos doorgegeven naar een andere plugin: diff --git a/Essentials/src/messages_pl.properties b/Essentials/src/messages_pl.properties index a6d71755e..cb448b9bc 100644 --- a/Essentials/src/messages_pl.properties +++ b/Essentials/src/messages_pl.properties @@ -24,7 +24,7 @@ balance=\u00a7aStan konta:\u00a7c {0} balanceTop=\u00a77Najbogatsi gracze ({0}) banExempt=\u00a74Nie mozesz zbanowac tego gracza. banFormat=\u00a74Zbanowany: {0} -banIpAddress=\u00a77Zbanowano adres IP +banIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1} \u00a76. bigTreeFailure=\u00a74Nie mozna tutaj postawic duzego drzewa. Sprobuj ponownie na ziemi lub trawie. bigTreeSuccess= \u00a77Stworzono duze drzewo. blockList=\u00a77Essentials przekazuje nastepujace polecenie do innej wtyczki: diff --git a/Essentials/src/messages_pt.properties b/Essentials/src/messages_pt.properties index 8573567df..d709ec82e 100644 --- a/Essentials/src/messages_pt.properties +++ b/Essentials/src/messages_pt.properties @@ -24,7 +24,7 @@ balance=\u00a77Saldo: {0} balanceTop=\u00a77 Saldos superiores ({0}) banExempt=\u00a7cVoc\u00ea nao pode banir este jogador. banFormat=Banned: {0} -banIpAddress=\u00a77Endere\u00e7o de IP banido +banIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1} \u00a76. bigTreeFailure=\u00a7cFalha na gera\u00e7ao da \u00e1rvore grande. Tente de novo na terra ou grama. bigTreeSuccess= \u00a77\u00c1rvore grande gerada. blockList=Essentials passou o seguinte comando a outro plugin: diff --git a/Essentials/src/messages_se.properties b/Essentials/src/messages_se.properties index 7c79cbfe8..2eaf36258 100644 --- a/Essentials/src/messages_se.properties +++ b/Essentials/src/messages_se.properties @@ -24,7 +24,7 @@ balance=\u00a77Balans: {0} balanceTop=\u00a77Topp balans ({0}) banExempt=\u00a7cDu kan inte banna den spelaren. banFormat=Banned: {0} -banIpAddress=\u00a77Bannade IP-adress +banIpAddress=\u00a76Player\u00a7c {0} \u00a76banned IP address {1} \u00a76. bigTreeFailure=\u00a7cEtt stort tr\u00e4d kunde inte genereras misslyckades. F\u00f6s\u00f6k igen p\u00e5 gr\u00e4s eller jord. bigTreeSuccess= \u00a77Stort tr\u00e4d genererat. blockList=Essentials vidarebefordrade f\u00f6ljande kommandon till ett annat insticksprogram: