Merge remote-tracking branch 'origin/master' into whs/notes

This commit is contained in:
Manatsawin Hanmongkolchai
2019-10-03 21:30:19 +07:00
3 changed files with 43 additions and 18 deletions

View File

@@ -217,9 +217,16 @@ public class CoxPlugin extends Plugin
{
for (Player player : client.getPlayers())
{
if (player.getName().equals(tpMatcher.group(1)))
final String rawPlayerName = player.getName();
if (rawPlayerName != null)
{
victims.add(new Victim(player, Victim.Type.TELEPORT));
final String fixedPlayerName = Text.sanitize(rawPlayerName);
if (fixedPlayerName.equals(tpMatcher.group(1)))
{
victims.add(new Victim(player, Victim.Type.TELEPORT));
}
}
}
}