Add afk-list-name config property for changing the player list name of AFK players.

This commit is contained in:
Ali Moghnieh 2016-01-20 14:15:53 +00:00
parent c6d2746959
commit bbf657e251
4 changed files with 36 additions and 0 deletions

View file

@ -418,6 +418,14 @@ public class User extends UserData implements Comparable<User>, IMessageRecipien
} else if (!set && isAfk()) {
afkPosition = null;
}
if (ess.getSettings().isAfkListName()) {
if(set) {
String afkName = ess.getSettings().getAfkListName().replace("{PLAYER}", getDisplayName()).replace("{USERNAME}", getName());
getBase().setPlayerListName(afkName);
} else {
getBase().setPlayerListName(null);
}
}
_setAfk(set);
}