mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-12-23 03:24:58 +00:00
Attempt to patch Minecart crash
This commit is contained in:
parent
702abbae48
commit
5ccf83ecec
1 changed files with 3 additions and 6 deletions
|
@ -6,10 +6,7 @@ import org.bukkit.event.EventHandler;
|
|||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.entity.*;
|
||||
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
|
||||
import org.bukkit.event.vehicle.VehicleCollisionEvent;
|
||||
import org.bukkit.event.vehicle.VehicleCreateEvent;
|
||||
import org.bukkit.event.vehicle.VehicleMoveEvent;
|
||||
import org.bukkit.event.vehicle.*;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class EntityListener implements Listener {
|
||||
|
@ -146,8 +143,8 @@ public class EntityListener implements Listener {
|
|||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onVehicleCollision(VehicleCollisionEvent event) {
|
||||
event.getVehicle().setVelocity(new Vector(0, 0, 0));
|
||||
public void onVehicleCollision(VehicleEntityCollisionEvent event) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
|
|
Loading…
Reference in a new issue