Interface LuckPermsBootstrap
public interface LuckPermsBootstrap
Bootstrap plugin interface
Instances of this interface are responsible for loading the "LuckPerms plugin" on their respective platforms.
-
Method Summary
Modifier and TypeMethodDescriptionGets aClassPathAppenderfor this bootstrap plugindefault PathGets the plugins configuration directoryGets the plugins main data storage directoryReturns a countdown latch whichcounts downafter the plugin has enabled.Returns a countdown latch whichcounts downafter the plugin has loaded.Gets the UUIDs of the users online on the platformOptional<?> Gets a player object linked to this User.intGets the number of users online on the platformGets the usernames of the users online on the platformGets the plugin loggerdefault InputStreamgetResourceStream(String path) Gets a bundled resource file from the jarGets an adapter for the platforms schedulerGets the name or "brand" of the running platformdefault @Nullable StringGets the name associated with this serverGets the version of the running platformGets the time when the plugin first started in millis.net.luckperms.api.platform.Platform.TypegetType()Gets the platform type this instance of LuckPerms is running on.Gets a string of the plugin's versiondefault @Nullable StringidentifyClassLoader(ClassLoader classLoader) Attempts to identify the plugin behind the given classloader.booleanisPlayerOnline(UUID uniqueId) Checks if a user is onlinelookupUniqueId(String username) Lookup a uuid from a username, using the servers internal uuid cache.lookupUsername(UUID uniqueId) Lookup a username from a uuid, using the servers internal uuid cache.
-
Method Details
-
getPluginLogger
-
getScheduler
-
getClassPathAppender
ClassPathAppender getClassPathAppender()Gets aClassPathAppenderfor this bootstrap plugin- Returns:
- a class path appender
-
getLoadLatch
CountDownLatch getLoadLatch()Returns a countdown latch whichcounts downafter the plugin has loaded.- Returns:
- a loading latch
-
getEnableLatch
CountDownLatch getEnableLatch()Returns a countdown latch whichcounts downafter the plugin has enabled.- Returns:
- an enable latch
-
getVersion
-
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
-
getServerVersion
-
getServerName
Gets the name associated with this server- Returns:
- the server name
-
getDataDirectory
Path getDataDirectory()Gets the plugins main data storage directoryBukkit: ./plugins/LuckPerms
BungeeCord: ./plugins/LuckPerms
Sponge: ./luckperms/
Velocity: ./plugins/luckperms
Fabric: ./mods/LuckPerms
Forge: ./config/luckperms
- Returns:
- the platforms data folder
-
getConfigDirectory
Gets the plugins configuration directory- Returns:
- the config directory
-
getResourceStream
Gets a bundled resource file from the jar- Parameters:
path- the path of the file- Returns:
- the file as an input stream
-
getPlayer
-
lookupUniqueId
-
lookupUsername
-
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
Listof usernames
-
getOnlinePlayers
Collection<UUID> getOnlinePlayers()Gets the UUIDs of the users online on the platform- Returns:
- a
Setof UUIDs
-
isPlayerOnline
Checks if a user is online- Parameters:
uniqueId- the users external uuid- Returns:
- true if the user is online
-
identifyClassLoader
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
-