mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-12-23 03:44: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)
|
||||
public void onVehicleCollisionEntity(VehicleEntityCollisionEvent event) {
|
||||
if(event.getEntity() instanceof Vehicle) {
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue