mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-12-22 22:24:56 +00:00
Attempt to patch Minecart crash
This commit is contained in:
parent
dca071141c
commit
de44f0a564
1 changed files with 6 additions and 9 deletions
|
@ -146,15 +146,12 @@ public class EntityListener implements Listener {
|
|||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onVehicleCollisionEntity(VehicleEntityCollisionEvent event) {
|
||||
event.setCollisionCancelled(true);
|
||||
event.setPickupCancelled(true);
|
||||
event.setCancelled(true);
|
||||
event.getVehicle().remove();
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onVehicleCollisionBlock(VehicleBlockCollisionEvent event) {
|
||||
event.getVehicle().remove();
|
||||
if(event.getEntity() instanceof Vehicle) {
|
||||
event.setCollisionCancelled(true);
|
||||
event.setPickupCancelled(true);
|
||||
event.setCancelled(true);
|
||||
event.getVehicle().remove();
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
|
|
Loading…
Reference in a new issue