Add check in GamePlayerManager so /spec can't be used on vanished staff
This commit is contained in:
parent
0ad46efe12
commit
8000c79f5d
@ -332,6 +332,10 @@ public class UtilPlayer
|
||||
UtilPlayerBase.message(client, message, wiki);
|
||||
}
|
||||
|
||||
public static void messageSearchOnlineResult(Player caller, String player, int matchCount) {
|
||||
UtilPlayerBase.messageSearchOnlineResult(caller, player, matchCount);
|
||||
}
|
||||
|
||||
public static Player searchExact(String name)
|
||||
{
|
||||
for (Player cur : UtilServer.getPlayers())
|
||||
|
@ -381,6 +381,11 @@ public class GamePlayerManager implements Listener
|
||||
Player target = UtilPlayer.searchOnline(player, tokens[1], true);
|
||||
if (target != null)
|
||||
{
|
||||
if (Manager.isVanished(player)) {
|
||||
UtilPlayer.messageSearchOnlineResult(player, tokens[1], 0);
|
||||
return;
|
||||
}
|
||||
|
||||
UtilPlayer.message(player, F.main("Game", "You teleported to " + F.name(target.getName()) + "."));
|
||||
player.teleport(target);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user