diff options
author | KHobbits <rob@khobbits.co.uk> | 2013-03-12 22:26:24 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-03-12 22:26:24 +0000 |
commit | e1e487da4da809dd8b05de2b61d4309fdf9d76ef (patch) | |
tree | 139d887bb45d12a5d6a4d588f355c555b66f64fb | |
parent | 8bc01910fccf131aa00aee7344f7fa15c1bbb21b (diff) | |
download | Essentials-e1e487da4da809dd8b05de2b61d4309fdf9d76ef.tar Essentials-e1e487da4da809dd8b05de2b61d4309fdf9d76ef.tar.gz Essentials-e1e487da4da809dd8b05de2b61d4309fdf9d76ef.tar.lz Essentials-e1e487da4da809dd8b05de2b61d4309fdf9d76ef.tar.xz Essentials-e1e487da4da809dd8b05de2b61d4309fdf9d76ef.zip |
Fix missing console notifications on /unban and /unbanip
4 files changed, 11 insertions, 4 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandban.java b/Essentials/src/com/earth2me/essentials/commands/Commandban.java index 62a7bf104..5c223a3d5 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandban.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandban.java @@ -70,7 +70,8 @@ public class Commandban extends EssentialsCommand server.getLogger().log(Level.INFO, _("playerBanned", senderName, user.getName(), banReason)); - if (nomatch) { + if (nomatch) + { sender.sendMessage(_("userUnknown", user.getName())); } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbanip.java b/Essentials/src/com/earth2me/essentials/commands/Commandbanip.java index 757f9cf8b..ca0751a51 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbanip.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbanip.java @@ -40,7 +40,7 @@ public class Commandbanip extends EssentialsCommand throw new Exception(_("playerNotFound")); } } - + ess.getServer().banIP(ipAddress); server.getLogger().log(Level.INFO, _("playerBanIpAddress", senderName, ipAddress)); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandunban.java b/Essentials/src/com/earth2me/essentials/commands/Commandunban.java index 67edb92e7..e466ae96c 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandunban.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandunban.java @@ -3,6 +3,7 @@ package com.earth2me.essentials.commands; import com.earth2me.essentials.Console; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; +import java.util.logging.Level; import org.bukkit.OfflinePlayer; import org.bukkit.Server; import org.bukkit.command.CommandSender; @@ -41,8 +42,10 @@ public class Commandunban extends EssentialsCommand } player.setBanned(false); } - + final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME; + server.getLogger().log(Level.INFO, _("playerUnBanned", senderName, name)); + for (Player onlinePlayer : server.getOnlinePlayers()) { final User onlineUser = ess.getUser(onlinePlayer); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandunbanip.java b/Essentials/src/com/earth2me/essentials/commands/Commandunbanip.java index 6e0526095..4a980e291 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandunbanip.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandunbanip.java @@ -4,6 +4,7 @@ import com.earth2me.essentials.Console; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; import com.earth2me.essentials.Util; +import java.util.logging.Level; import org.bukkit.Server; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -37,9 +38,11 @@ public class Commandunbanip extends EssentialsCommand throw new PlayerNotFoundException(); } } - + ess.getServer().unbanIP(ipAddress); final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME; + server.getLogger().log(Level.INFO, _("playerUnbanIpAddress", senderName, ipAddress)); + for (Player onlinePlayer : server.getOnlinePlayers()) { final User onlineUser = ess.getUser(onlinePlayer); |