You only use this here - would make more sense to just have the next line be

````
TeleportCause cause = entity.getBukkitEntity().getLocation().getBlock().getType()
````