mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-12-22 22:04:57 +00:00
Attempt to patch Minecart crash
This commit is contained in:
parent
1de17695a0
commit
dca071141c
1 changed files with 8 additions and 1 deletions
|
@ -142,14 +142,21 @@ public class EntityListener implements Listener {
|
|||
}
|
||||
}
|
||||
|
||||
//FIXME Make patch better
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onVehicleCollision(VehicleEntityCollisionEvent event) {
|
||||
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();
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onEntityDeath(EntityDeathEvent event)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue