Optimized imports. Changed ServerTickEventHandler to PlayerTickEventHandler and made grace periods are now updated per player.
This commit is contained in:
@ -0,0 +1,14 @@
|
||||
package com.micle.loginprotection.events;
|
||||
|
||||
import com.micle.loginprotection.LoginProtection;
|
||||
import net.minecraftforge.event.TickEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
|
||||
public class OnPlayerTickEventHandler {
|
||||
@SubscribeEvent
|
||||
public void PlayerTickEvent(TickEvent.PlayerTickEvent event) {
|
||||
if (LoginProtection.protected_players.getPlayer(event.player.getUUID()) == null) { return; }
|
||||
|
||||
LoginProtection.protected_players.updateGracePeriod(event.player.getUUID());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user