Skip to content

Commit

Permalink
cache notification timer
Browse files Browse the repository at this point in the history
  • Loading branch information
Cleptomania committed Dec 18, 2024
1 parent 21e6ff1 commit 6d1c740
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,12 @@ public void broadcast(CallbackInfo ctx, Iterator iterator, EntityPlayer player)
}

public List<EntityPlayer> getListWithoutAFK(List<EntityPlayer> list) {
long notificationTimer = ServerUtilitiesConfig.afk.getNotificationTimer();
return list.stream()
.filter(
(EntityPlayer entity) -> ServerUtilitiesPlayerData
.get(Universe.get().getPlayer((EntityPlayerMP) entity)).afkTime
>= ServerUtilitiesConfig.afk.getNotificationTimer())
>= notificationTimer)
.collect(Collectors.toList());
}
}

0 comments on commit 6d1c740

Please sign in to comment.