Posted April 16, 20178 yr Hello, is there a way to check a player's position every X seconds? Like a class that would be called every few seconds or ticks.
April 16, 20178 yr Subscribe to TickEvent.PlayerTickEvent, it will be fired twice per tick per player per side: once at the start of the tick with TickEvent.Phase.START and once at the end of the tick with TickEvent.Phase.END. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
April 16, 20178 yr What you can do inside the tick handler is do something like "if(worldTicks % 20 == 0) { do something }" if you want to do something every second. Change "20" to some other value to have it execute more/less frequently.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.