Interface LuckPermsBootstrap


public interface LuckPermsBootstrap
Bootstrap plugin interface

Instances of this interface are responsible for loading the "LuckPerms plugin" on their respective platforms.

  • Method Details

    • getPluginLogger

      PluginLogger getPluginLogger()
      Gets the plugin logger
      Returns:
      the logger
    • getScheduler

      SchedulerAdapter getScheduler()
      Gets an adapter for the platforms scheduler
      Returns:
      the scheduler
    • getClassPathAppender

      ClassPathAppender getClassPathAppender()
      Gets a ClassPathAppender for this bootstrap plugin
      Returns:
      a class path appender
    • getLoadLatch

      CountDownLatch getLoadLatch()
      Returns a countdown latch which counts down after the plugin has loaded.
      Returns:
      a loading latch
    • getEnableLatch

      CountDownLatch getEnableLatch()
      Returns a countdown latch which counts down after the plugin has enabled.
      Returns:
      an enable latch
    • getVersion

      String getVersion()
      Gets a string of the plugin's version
      Returns:
      the version of the plugin
    • getStartupTime

      Instant getStartupTime()
      Gets the time when the plugin first started in millis.
      Returns:
      the enable time
    • getType

      net.luckperms.api.platform.Platform.Type getType()
      Gets the platform type this instance of LuckPerms is running on.
      Returns:
      the platform type
    • getServerBrand

      String getServerBrand()
      Gets the name or "brand" of the running platform
      Returns:
      the server brand
    • getServerVersion

      String getServerVersion()
      Gets the version of the running platform
      Returns:
      the server version
    • getServerName

      default @Nullable String getServerName()
      Gets the name associated with this server
      Returns:
      the server name
    • getDataDirectory

      Path getDataDirectory()
      Gets the plugins main data storage directory

      Bukkit: ./plugins/LuckPerms

      BungeeCord: ./plugins/LuckPerms

      Sponge: ./luckperms/

      Velocity: ./plugins/luckperms

      Fabric: ./mods/LuckPerms

      Forge: ./config/luckperms

      Returns:
      the platforms data folder
    • getConfigDirectory

      default Path getConfigDirectory()
      Gets the plugins configuration directory
      Returns:
      the config directory
    • getResourceStream

      default InputStream getResourceStream(String path)
      Gets a bundled resource file from the jar
      Parameters:
      path - the path of the file
      Returns:
      the file as an input stream
    • getPlayer

      Optional<?> getPlayer(UUID uniqueId)
      Gets a player object linked to this User. The returned object must be the same type as the instance used in the platforms ContextManager
      Parameters:
      uniqueId - the users unique id
      Returns:
      a player object, or null, if one couldn't be found.
    • lookupUniqueId

      Optional<UUID> lookupUniqueId(String username)
      Lookup a uuid from a username, using the servers internal uuid cache.
      Parameters:
      username - the username to lookup
      Returns:
      an optional uuid, if found
    • lookupUsername

      Optional<String> lookupUsername(UUID uniqueId)
      Lookup a username from a uuid, using the servers internal uuid cache.
      Parameters:
      uniqueId - the uuid to lookup
      Returns:
      an optional username, if found
    • getPlayerCount

      int getPlayerCount()
      Gets the number of users online on the platform
      Returns:
      the number of users
    • getPlayerList

      Collection<String> getPlayerList()
      Gets the usernames of the users online on the platform
      Returns:
      a List of usernames
    • getOnlinePlayers

      Collection<UUID> getOnlinePlayers()
      Gets the UUIDs of the users online on the platform
      Returns:
      a Set of UUIDs
    • isPlayerOnline

      boolean isPlayerOnline(UUID uniqueId)
      Checks if a user is online
      Parameters:
      uniqueId - the users external uuid
      Returns:
      true if the user is online
    • identifyClassLoader

      default @Nullable String identifyClassLoader(ClassLoader classLoader) throws Exception
      Attempts to identify the plugin behind the given classloader.

      Used for giving more helpful log messages when things break.

      Parameters:
      classLoader - the classloader to identify
      Returns:
      the name of the classloader source
      Throws:
      Exception - anything