mirror of
https://github.com/YouHaveTrouble/PreventStabby.git
synced 2026-05-12 13:26:56 +00:00
fix npe when new pet target is null
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ public class PetTargettingPlayerListener implements Listener {
|
||||
if (!(event.getEntity() instanceof Tameable)) return;
|
||||
Tameable entity = (Tameable) event.getEntity();
|
||||
if (!(entity.getOwner() instanceof Player)) return;
|
||||
if (!(entity.getTarget() instanceof Player)) return;
|
||||
if (!(event.getTarget() instanceof Player)) return;
|
||||
|
||||
UUID damager = entity.getOwner().getUniqueId();
|
||||
UUID victim = event.getTarget().getUniqueId();
|
||||
|
||||
Reference in New Issue
Block a user