mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-29 03:21:20 +01:00
Handle Tameable as a cause.
This commit is contained in:
parent
4379c7e989
commit
eb23e28c16
@ -22,6 +22,7 @@
|
||||
import com.google.common.base.Joiner;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Projectile;
|
||||
import org.bukkit.entity.Tameable;
|
||||
import org.bukkit.entity.Vehicle;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
@ -98,6 +99,8 @@ private static void expand(List<Object> list, @Nullable Object ... element) {
|
||||
expand(list, ((Projectile) o).getShooter());
|
||||
} else if (o instanceof Vehicle) {
|
||||
expand(list, ((Vehicle) o).getPassenger());
|
||||
} else if (o instanceof Tameable) {
|
||||
expand(list, ((Tameable) o).getOwner());
|
||||
} else {
|
||||
list.add(o);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user