@EventHandler
    public void onPlayerMoveEvent(PlayerMoveEvent e) {
        Player p = e.getPlayer();
        Location l = p.getLocation();
        int lightlevel = p.getLocation().getBlock().getLightLevel();
        if (lightlevel < 5) {
            p.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, Integer.MAX_VALUE, 1));
        } else {
            p.removePotionEffect(PotionEffectType.BLINDNESS);

        }
    }