@EventHandler(priority=EventPriority.MONITOR)
public void spectatorDeath(EntityDamageEvent event)
{
World world = event.getEntity().getWorld();
AutoRefMatch match = plugin.getMatch(world);
if (event.getEntityType() != EntityType.PLAYER) return;
Player player = (Player) event.getEntity();
if (match != null && match.isSpectator(player))
{
Location loc = player.getLocation();
event.setCancelled(true);
if (loc.getY() < -64 && event.getCause() == DamageCause.VOID)
player.teleport(match.getPlayerSpawn(player));
player.setFallDistance(0);
}
}