public static Direction from(Location location) {
        Objects.requireNonNull(location, "location");
        return of(location.getYaw(), location.getPitch());
    }
An immutable and serializable direction object
helper/src/main/java/me/lucko/helper/serialize/Direction.java