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
37caf04c1d
commit
702abbae48
1 changed files with 10 additions and 0 deletions
|
@ -6,6 +6,11 @@ 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.util.Vector;
|
||||
|
||||
public class EntityListener implements Listener {
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
|
@ -140,6 +145,11 @@ public class EntityListener implements Listener {
|
|||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onVehicleCollision(VehicleCollisionEvent event) {
|
||||
event.getVehicle().setVelocity(new Vector(0, 0, 0));
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onEntityDeath(EntityDeathEvent event)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue