From 3b61ba408f20feebeef4ee44567da1dcd97b4536 Mon Sep 17 00:00:00 2001 From: Video Date: Fri, 4 Nov 2022 22:58:36 -0600 Subject: [PATCH] Fixes FS-314 --- .../totalfreedommod/blocking/EventBlocker.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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); } } }