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; }
|
||||
|
||||
Reference in New Issue
Block a user