Class ServerUtils

java.lang.Object
com.marcusslover.plus.lib.server.ServerUtils

public class ServerUtils extends Object
  • Constructor Details

    • ServerUtils

      public ServerUtils()
  • Method Details

    • getOfflinePlayerList

      public static List<org.bukkit.OfflinePlayer> getOfflinePlayerList()
      Returns every player that has joined this server in the past.
      Returns:
      List of OfflinePlayer objects that have connected to the server.
    • getOfflinePlayerIdList

      public static List<UUID> 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

      public static List<String> 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

      public static List<? extends org.bukkit.entity.Player> getOnlinePlayerList()
      Returns every player that is currently connected to the server.
      Returns:
      List of Player objects that are currently connected to the server.
    • getOnlinePlayerIdList

      public static List<UUID> 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

      public static List<String> 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 public static org.bukkit.plugin.Plugin getCallingPlugin()
      Deprecated.
      Gets the plugin that called the calling method of this method
      Returns:
      The plugin which called the method
    • getServerVersion

      public static String 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 plugin
      clazz - The class
      Returns:
      The list of matching classes