Optimized imports. Fixed pattern variable that didn't want to work in OnLivingSetAttackTargetEventHandler.
This commit is contained in:
@ -11,7 +11,8 @@ import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
public class OnLivingSetAttackTargetEventHandler {
|
||||
@SubscribeEvent
|
||||
public void LivingSetAttackTargetEvent(LivingSetAttackTargetEvent event) {
|
||||
if (!(event.getTarget() instanceof PlayerEntity target)) { return; }
|
||||
if (!(event.getTarget() instanceof PlayerEntity)) { return; }
|
||||
PlayerEntity target = (PlayerEntity) event.getTarget();
|
||||
|
||||
ProtectedPlayer player = LoginProtection.protected_players.getPlayer(target.getUUID());
|
||||
if (player == null) { return; }
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package com.micle.loginprotection.events;
|
||||
|
||||
import com.micle.loginprotection.LoginProtection;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
Reference in New Issue
Block a user