From be1e454d5c4af4a93661a7d371b3110eed622cc4 Mon Sep 17 00:00:00 2001 From: samczsun Date: Thu, 9 Mar 2017 19:48:31 -0500 Subject: [PATCH] PC-696 --- .../src/mineplex/core/mount/types/MountCart.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/mount/types/MountCart.java b/Plugins/Mineplex.Core/src/mineplex/core/mount/types/MountCart.java index a1f9f5a5b..4f484219c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/mount/types/MountCart.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/mount/types/MountCart.java @@ -178,7 +178,12 @@ public class MountCart extends Mount> @EventHandler public void cancelBreak(VehicleDamageEvent event) { - if (getActive().values().contains(event.getVehicle())) - event.setCancelled(true); + for (SingleEntityMountData data : getActive().values()) + { + if (data.getEntity().equals(event.getVehicle())) + { + event.setCancelled(true); + } + } } }