Package com.marcusslover.plus.lib.server
Class ServerUtils
java.lang.Object
com.marcusslover.plus.lib.server.ServerUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.plugin.PluginDeprecated.getExtendingClasses(org.bukkit.plugin.Plugin plugin, Class<T> clazz) Gets all non-abstract, non-interface classes which extend a certain class within a pluginReturns every player's UUID that has joined this server in the past.static List<org.bukkit.OfflinePlayer> Returns every player that has joined this server in the past.Returns every player's name that has joined this server in the past.Returns every player's UUID that is currently connected to the server.static List<? extends org.bukkit.entity.Player> Returns every player that is currently connected to the server.Returns every player's name that is currently connected to the server.static String
-
Constructor Details
-
ServerUtils
public ServerUtils()
-
-
Method Details
-
getOfflinePlayerList
Returns every player that has joined this server in the past.- Returns:
- List of OfflinePlayer objects that have connected to the server.
-
getOfflinePlayerIdList
Returns every player's UUID that has joined this server in the past.- Returns:
- List of UUID objects originating from the OfflinePlayer objects that have connected to the server.
-
getOfflinePlayerNameList
Returns every player's name that has joined this server in the past.- Returns:
- List of String objects originating from the OfflinePlayer objects that have connected to the server.
-
getOnlinePlayerList
Returns every player that is currently connected to the server.- Returns:
- List of Player objects that are currently connected to the server.
-
getOnlinePlayerIdList
Returns every player's UUID that is currently connected to the server.- Returns:
- List of UUID objects originating from the Player objects that are currently connected to the server.
-
getOnlinePlayerNameList
Returns every player's name that is currently connected to the server.- Returns:
- List of String objects originating from the Player objects that are currently connected to the server.
-
getCallingPlugin
Deprecated.Gets the plugin that called the calling method of this method- Returns:
- The plugin which called the method
-
getServerVersion
- Returns:
- The server version String (ex: 1.16.4)
-
getExtendingClasses
public static <T> List<Class<? extends T>> getExtendingClasses(org.bukkit.plugin.Plugin plugin, Class<T> clazz) Gets all non-abstract, non-interface classes which extend a certain class within a plugin- Type Parameters:
T- The type of the class- Parameters:
plugin- The pluginclazz- The class- Returns:
- The list of matching classes
-