package eu.mrneznamy.mrultimatelibrary.utils;

import org.bukkit.Location;

public class LocationUtil {

    /**
     * Converts a Location to a string representation.
     * e.g. world(1,2,3)
     * @param loc The location to convert
     * @return The string representation of the location
     */
    public static String locToString(Location loc) {
        if (loc == null || loc.getWorld() == null) return "null";
        return loc.getWorld().getName() + "(" + loc.getBlockX() + "," + loc.getBlockY() + "," + loc.getBlockZ() + ")";
    }
}