Service cleanup

This commit is contained in:
Gabriele C
2016-10-04 19:08:18 +02:00
parent 5c2d7139bc
commit 42dbb27728
89 changed files with 319 additions and 257 deletions
+1 -28
View File
@@ -16,26 +16,10 @@ public final class Utils {
/** Number of milliseconds in an hour. */
public static final long MILLIS_PER_HOUR = 60 * MILLIS_PER_MINUTE;
// Utility class
private Utils() {
}
/**
* Get player's UUID if can, name otherwise.
*
* @param player Player to retrieve
*
* @return player's UUID or Name in String.
*/
public static String getUUIDorName(OfflinePlayer player) {
// We may made this configurable in future
// so we can have uuid support.
try {
return player.getUniqueId().toString();
} catch (NoSuchMethodError ignore) {
return player.getName();
}
}
/**
* Compile Pattern sneaky without throwing Exception.
*
@@ -52,17 +36,6 @@ public final class Utils {
}
}
/**
* Returns the IP of the given player.
*
* @param p The player to return the IP address for
*
* @return The player's IP address
*/
public static String getPlayerIp(Player p) {
return p.getAddress().getAddress().getHostAddress();
}
/**
* Returns whether the class exists in the current class loader.
*