Add missing disabled region support check.

Fixes WORLDGUARD-3839.
This commit is contained in:
wizjany 2017-06-20 22:04:38 -04:00
parent 84bc322de7
commit 3a8e3e84b8

View File

@ -515,6 +515,7 @@ public void onDamageEntity(DamageEntityEvent event) {
@EventHandler(ignoreCancelled = true) @EventHandler(ignoreCancelled = true)
public void onVehicleExit(VehicleExitEvent event) { public void onVehicleExit(VehicleExitEvent event) {
Entity vehicle = event.getVehicle(); Entity vehicle = event.getVehicle();
if (!isRegionSupportEnabled(vehicle.getWorld())) return; // Region support disabled
Entity exited = event.getExited(); Entity exited = event.getExited();
if (vehicle instanceof Tameable && exited instanceof Player) { if (vehicle instanceof Tameable && exited instanceof Player) {