Skip to content

Commit

Permalink
Reduce the rate at which dunga-dunga is notified of online players to…
Browse files Browse the repository at this point in the history
… once every 15 seconds
  • Loading branch information
4Ply committed May 8, 2024
1 parent 412ce24 commit 6e2b8c8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class PlayedJoinedListener(

@EventHandler(ignoreCancelled = true)
fun onPlayerSeen(event: ServerTickStartEvent) {
if (event.tickNumber % 20 == 0) { // Every second
if (event.tickNumber % 300 == 0) { // Every 15 seconds
plugin.server.onlinePlayers.forEach { player ->
plugin.async(player) {
eventsApi.eventsPost(
Expand Down

0 comments on commit 6e2b8c8

Please sign in to comment.