mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-13 11:41:43 +01:00
Handle Vehicle.getPassenger() as a parent cause.
This commit is contained in:
parent
989ce82c5d
commit
4379c7e989
@ -22,6 +22,7 @@
|
||||
import com.google.common.base.Joiner;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Projectile;
|
||||
import org.bukkit.entity.Vehicle;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
@ -95,6 +96,8 @@ private static void expand(List<Object> list, @Nullable Object ... element) {
|
||||
|
||||
if (o instanceof Projectile) {
|
||||
expand(list, ((Projectile) o).getShooter());
|
||||
} else if (o instanceof Vehicle) {
|
||||
expand(list, ((Vehicle) o).getPassenger());
|
||||
} else {
|
||||
list.add(o);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user