use of cn.nukkit.event.player.PlayerChatEvent in project Plan by plan-player-analytics.
the class ChatListener method actOnChatEvent.
private void actOnChatEvent(PlayerChatEvent event) {
long time = System.currentTimeMillis();
Player player = event.getPlayer();
UUID uuid = player.getUniqueId();
String displayName = player.getDisplayName();
dbSystem.getDatabase().executeTransaction(new NicknameStoreTransaction(uuid, new Nickname(displayName, time, serverInfo.getServerUUID()), (playerUUID, name) -> nicknameCache.getDisplayName(playerUUID).map(name::equals).orElse(false)));
}
Aggregations