All source projects
MrUltimateLibrary Source
Standalone source project / 68 files
MrUltimateLibrary is the backbone of all my plugins; it offers features that facilitate plugin creation, maintenance, and updates.
java
MrUltimateLibrary/src/main/java/eu/mrneznamy/mrultimatelibrary/utils/LocationUtil.java
JAVA · Read-only source
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() + ")";
}
}17 linesGNU GENERAL PUBLIC LICENSE · Version 3, 29 June 2007 · UTF-8 · Read only