public void setPlayerInArea(Player p, Location newPos) {
        double x = newPos.getX();
        double y = newPos.getY();
        double z = newPos.getZ();
        boolean f = false;
        Location min = minPoint.getLocation();
        Location max = maxPoint.getLocation();
        if(x < min.getX()) {
            newPos.setX(min.getX() + 1 + 0.5F);
            f = true;
        }
        if(x > max.getX()) {
            newPos.setX(max.getX() - 1 + 0.5F);
            f = true;
        }
        if(y < min.getY()) {
            newPos.setY(min.getY() + 1 + 0.5F);
            f = true;
        }
        if(y > max.getY()) {
            newPos.setY(max.getY() - 1 + 0.5F);
            f = true;
        }
        if(z < min.getZ()) {
            newPos.setZ(min.getZ() + 1 + 0.5F);
            f = true;
        }
        if(z > max.getZ()) {
            newPos.setZ(max.getZ() - 1 + 0.5F);
            f = true;
        }
        if(newPos.getWorld() != min.getWorld()) {
            newPos.setWorld(min.getWorld());
            f = true;
        }
        if(f) {
            p.teleport(newPos);
        }
    }