@@ -0,0 +1,1274 @@
+package me.otisdiver.otisarena.utils;%0A%0Aimport org.bukkit.Location;%0Aimport org.bukkit.entity.Player;%0A%0Apublic class LocationUtils %7B%0A%0A    /** Calculates the pythagorean distance between two points.%0A     * %0A     * @param al the first location value%0A     * @param bl the second location value%0A     * @return the distance between the two locations%0A     */%0A    public static double calculateDistance(Location al, Location bl) %7B%0A        double ax = al.getX();%0A        double ay = al.getY();%0A        double az = al.getZ();%0A        double bx = bl.getX();%0A        double by = bl.getY();%0A        double bz = bl.getZ();%0A        %0A        double dx = ax - bx;%0A        double dy = ay - by;%0A        double dz = az - bz;%0A        %0A        return Math.sqrt(dx * dx + dy * dy + dz * dz);%0A    %7D%0A    %0A    /** Checks whether two players are within (inclusive) a distance of each other.%0A     * %0A     * @param a the first player%0A     * @param b the second player%0A     * @param distance the maximum distance at which true should be returned%0A     * @return whether Players 'a' and 'b' are within 'distance' of each other%0A     */%0A    public static boolean withinDistance(Player a, Player b, double distance) %7B%0A        return calculateDistance(a.getLocation(), b.getLocation()) %3C= distance;%0A    %7D%0A    %0A%7D%0A

create LocationUtils