Package com.comphenix.protocol.utility
Class Util
java.lang.Object
com.comphenix.protocol.utility.Util
General utility class
- Author:
- dmulloy2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <E> List<E>asList(E... elements)Converts a variable argument array into a List.static booleanclassExists(String className)static List<org.bukkit.entity.Player>Gets a list of currently online Players.static booleanWhether or not this server is running Spigot or a Spigot fork.
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
getOnlinePlayers
Gets a list of currently online Players.- Returns:
- The list
-
asList
Converts a variable argument array into a List.- Parameters:
elements- Array to convert- Returns:
- The list
-
classExists
-
isUsingSpigot
public static boolean isUsingSpigot()Whether or not this server is running Spigot or a Spigot fork. This works by checking if the SpigotConfig exists, which should be true of all forks.- Returns:
- True if it is, false if not.
-