mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-03 19:15:44 +00:00
Fix missing console notifications on /unban and /unbanip
This commit is contained in:
parent
895c14430a
commit
db86648b84
4 changed files with 11 additions and 4 deletions
|
@ -70,7 +70,8 @@ public class Commandban extends EssentialsCommand
|
||||||
|
|
||||||
server.getLogger().log(Level.INFO, _("playerBanned", senderName, user.getName(), banReason));
|
server.getLogger().log(Level.INFO, _("playerBanned", senderName, user.getName(), banReason));
|
||||||
|
|
||||||
if (nomatch) {
|
if (nomatch)
|
||||||
|
{
|
||||||
sender.sendMessage(_("userUnknown", user.getName()));
|
sender.sendMessage(_("userUnknown", user.getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class Commandbanip extends EssentialsCommand
|
||||||
throw new Exception(_("playerNotFound"));
|
throw new Exception(_("playerNotFound"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ess.getServer().banIP(ipAddress);
|
ess.getServer().banIP(ipAddress);
|
||||||
server.getLogger().log(Level.INFO, _("playerBanIpAddress", senderName, ipAddress));
|
server.getLogger().log(Level.INFO, _("playerBanIpAddress", senderName, ipAddress));
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.earth2me.essentials.commands;
|
||||||
import com.earth2me.essentials.Console;
|
import com.earth2me.essentials.Console;
|
||||||
import static com.earth2me.essentials.I18n._;
|
import static com.earth2me.essentials.I18n._;
|
||||||
import com.earth2me.essentials.User;
|
import com.earth2me.essentials.User;
|
||||||
|
import java.util.logging.Level;
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -41,8 +42,10 @@ public class Commandunban extends EssentialsCommand
|
||||||
}
|
}
|
||||||
player.setBanned(false);
|
player.setBanned(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
|
final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
|
||||||
|
server.getLogger().log(Level.INFO, _("playerUnBanned", senderName, name));
|
||||||
|
|
||||||
for (Player onlinePlayer : server.getOnlinePlayers())
|
for (Player onlinePlayer : server.getOnlinePlayers())
|
||||||
{
|
{
|
||||||
final User onlineUser = ess.getUser(onlinePlayer);
|
final User onlineUser = ess.getUser(onlinePlayer);
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.earth2me.essentials.Console;
|
||||||
import static com.earth2me.essentials.I18n._;
|
import static com.earth2me.essentials.I18n._;
|
||||||
import com.earth2me.essentials.User;
|
import com.earth2me.essentials.User;
|
||||||
import com.earth2me.essentials.Util;
|
import com.earth2me.essentials.Util;
|
||||||
|
import java.util.logging.Level;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -37,9 +38,11 @@ public class Commandunbanip extends EssentialsCommand
|
||||||
throw new PlayerNotFoundException();
|
throw new PlayerNotFoundException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ess.getServer().unbanIP(ipAddress);
|
ess.getServer().unbanIP(ipAddress);
|
||||||
final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
|
final String senderName = sender instanceof Player ? ((Player)sender).getDisplayName() : Console.NAME;
|
||||||
|
server.getLogger().log(Level.INFO, _("playerUnbanIpAddress", senderName, ipAddress));
|
||||||
|
|
||||||
for (Player onlinePlayer : server.getOnlinePlayers())
|
for (Player onlinePlayer : server.getOnlinePlayers())
|
||||||
{
|
{
|
||||||
final User onlineUser = ess.getUser(onlinePlayer);
|
final User onlineUser = ess.getUser(onlinePlayer);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue