mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-06 20:43:11 +00:00
Add afk-list-name config property for changing the player list name of AFK players.
This commit is contained in:
parent
c6d2746959
commit
bbf657e251
4 changed files with 36 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue