diff --git a/src/main/java/me/totalfreedom/totalfreedommod/blocking/EventBlocker.java b/src/main/java/me/totalfreedom/totalfreedommod/blocking/EventBlocker.java index bc2ec9ba..a70fce45 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/blocking/EventBlocker.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/blocking/EventBlocker.java @@ -163,12 +163,9 @@ public class EventBlocker extends FreedomService if (ConfigEntry.ENABLE_PET_PROTECT.getBoolean()) { Entity entity = event.getEntity(); - if (entity instanceof Tameable) + if (entity instanceof Tameable tameable && tameable.isTamed()) { - if (((Tameable) entity).isTamed()) - { - event.setCancelled(true); - } + event.setCancelled(true); } } }