mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-12-23 03:34:57 +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)
|
@EventHandler(priority = EventPriority.HIGH)
|
||||||
public void onVehicleCollisionEntity(VehicleEntityCollisionEvent event) {
|
public void onVehicleCollisionEntity(VehicleEntityCollisionEvent event) {
|
||||||
event.setCollisionCancelled(true);
|
if(event.getEntity() instanceof Vehicle) {
|
||||||
event.setPickupCancelled(true);
|
event.setCollisionCancelled(true);
|
||||||
event.setCancelled(true);
|
event.setPickupCancelled(true);
|
||||||
event.getVehicle().remove();
|
event.setCancelled(true);
|
||||||
}
|
event.getVehicle().remove();
|
||||||
|
}
|
||||||
@EventHandler(priority = EventPriority.HIGH)
|
|
||||||
public void onVehicleCollisionBlock(VehicleBlockCollisionEvent event) {
|
|
||||||
event.getVehicle().remove();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGH)
|
@EventHandler(priority = EventPriority.HIGH)
|
||||||
|
|
Loading…
Reference in a new issue