/**
* Clear any nickname that collides with the real name of a player logging in.
* This ensures that usernames + nicknames together contain no duplicates.
* The user who's nickname was cleared is not notified of this, but this
* should be an extremely rare situation, so it's not a big problem.
*/
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = false)
public void clearConflictingNicks(AsyncPlayerPreLoginEvent event) {
final String name = event.getName();
syncExecutor.execute(() -> {
final Player player = nicknames.get(name);
if(player != null) {
changeIdentity(player, null);
}
});
}
IdentityProviderImpl.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:ProjectAres
作者:
评论列表
文章目录