mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 12:35:15 +01:00
Fix NPE on VehicleMoveEvent. Fixes #2195.
This commit is contained in:
parent
f1cf541606
commit
d12bdcfda4
@ -642,9 +642,8 @@ import java.util.regex.Pattern;
|
|||||||
Vehicle vehicle = event.getVehicle();
|
Vehicle vehicle = event.getVehicle();
|
||||||
|
|
||||||
// Check allowed
|
// Check allowed
|
||||||
|
if (!vehicle.getPassengers().isEmpty()) {
|
||||||
|
Entity passenger = vehicle.getPassengers().get(0);
|
||||||
Entity passenger = vehicle.getPassengers().get(1);
|
|
||||||
|
|
||||||
if (passenger instanceof Player) {
|
if (passenger instanceof Player) {
|
||||||
final Player player = (Player) passenger;
|
final Player player = (Player) passenger;
|
||||||
@ -709,6 +708,8 @@ import java.util.regex.Pattern;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
|
Loading…
Reference in New Issue
Block a user