PC-696
This commit is contained in:
parent
fceda64a5a
commit
be1e454d5c
@ -178,7 +178,12 @@ public class MountCart extends Mount<SingleEntityMountData<Minecart>>
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void cancelBreak(VehicleDamageEvent event)
|
public void cancelBreak(VehicleDamageEvent event)
|
||||||
{
|
{
|
||||||
if (getActive().values().contains(event.getVehicle()))
|
for (SingleEntityMountData<Minecart> data : getActive().values())
|
||||||
|
{
|
||||||
|
if (data.getEntity().equals(event.getVehicle()))
|
||||||
|
{
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user