Fix missing console notifications on /unban and /unbanip

This commit is contained in:
KHobbits 2013-03-12 22:26:24 +00:00
parent 895c14430a
commit db86648b84
4 changed files with 11 additions and 4 deletions

View File

@ -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()));
}

View File

@ -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));

View File

@ -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);

View File

@ -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);