Updated to version 2.1.1. Fixed issue where the mod didn't work in single-player and LAN.
This commit is contained in:
@ -2,14 +2,11 @@ package com.micle.loginprotection.events;
|
||||
|
||||
import com.micle.loginprotection.LoginProtection;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.event.entity.player.PlayerEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
|
||||
public class OnPlayerJoinEventHandler {
|
||||
@SubscribeEvent
|
||||
@OnlyIn(Dist.DEDICATED_SERVER)
|
||||
public void EntityJoinWorldEvent(PlayerEvent.PlayerLoggedInEvent event) {
|
||||
if (!(event.getEntity() instanceof Player)) { return; }
|
||||
Player player = (Player) event.getEntity();
|
||||
|
||||
Reference in New Issue
Block a user