Interface ADPBootstrap
-
- All Known Implementing Classes:
AbstractADPPlugin,ADPPlugin
public interface ADPBootstrap
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidexecuteCommand(@NotNull String command)Execute the command via consolevoidexecuteCommandByUser(@NotNull String command, @NotNull User user)Execute the command via console@NotNull StringgetAuthor()Get plugin author@NotNull ADPBootstrapgetBootstrap()Get bootstrap@NotNull PathgetFolder()Get plugin folder@Nullable OfflineUsergetOfflinePlayer(@NotNull UUID uuid)Get offline player with given uuid@NotNull List<User>getOnlinePlayers()Get online players list@NotNull PluginPlatformgetPlatform()Get plugin platform@Nullable UsergetPlayer(@NotNull UUID uuid)Get player with given uuid@Nullable UsergetPlayerByName(@NotNull String name)Get player with given name@Nullable InputStreamgetResource(@NotNull String resource)Get resource from plugin resources@NotNull StringgetVersion()Get plugin version@NotNull ADPLoggerinitializeLogger()Initialize plugin loggerbooleanisPluginEnabled(@NotNull String pluginName)Is the plugin enabled?voidregisterListener(@NotNull Object object)Register a listenervoidstopPlugin()Stop the pluginvoidunregisterListener(@NotNull Object object)Unregister a listener
-
-
-
Method Detail
-
getBootstrap
@NotNull @NotNull ADPBootstrap getBootstrap()
Get bootstrap- Returns:
- the bootstrap
-
initializeLogger
@NotNull @NotNull ADPLogger initializeLogger()
Initialize plugin logger- Returns:
- the logger
-
getFolder
@NotNull @NotNull Path getFolder()
Get plugin folder- Returns:
- the plugin folder path
-
getAuthor
@NotNull @NotNull String getAuthor()
Get plugin author- Returns:
- the author of the plugin
-
getPlatform
@NotNull @NotNull PluginPlatform getPlatform()
Get plugin platform- Returns:
- the
PluginPlatform
-
getVersion
@NotNull @NotNull String getVersion()
Get plugin version- Returns:
- the version of the plugin
-
stopPlugin
void stopPlugin()
Stop the plugin
-
getResource
@Nullable @Nullable InputStream getResource(@NotNull @NotNull String resource)
Get resource from plugin resources- Parameters:
resource- the resource name- Returns:
- the resource found
-
isPluginEnabled
boolean isPluginEnabled(@NotNull @NotNull String pluginName)Is the plugin enabled?- Parameters:
pluginName- the name of the plugin- Returns:
- true if the given plugin is enabled
-
getPlayer
@Nullable @Nullable User getPlayer(@NotNull @NotNull UUID uuid)
Get player with given uuid- Parameters:
uuid- uuid of the player- Returns:
- the player found
-
getPlayerByName
@Nullable @Nullable User getPlayerByName(@NotNull @NotNull String name)
Get player with given name- Parameters:
name- name of the player- Returns:
- the player found
-
getOfflinePlayer
@Nullable @Nullable OfflineUser getOfflinePlayer(@NotNull @NotNull UUID uuid)
Get offline player with given uuid- Parameters:
uuid- uuid of the player- Returns:
- the offline player found
-
getOnlinePlayers
@NotNull @NotNull List<User> getOnlinePlayers()
Get online players list- Returns:
- a list of online players
-
executeCommand
void executeCommand(@NotNull @NotNull String command)Execute the command via console- Parameters:
command- the command to execute
-
executeCommandByUser
void executeCommandByUser(@NotNull @NotNull String command, @NotNull @NotNull User user)Execute the command via console- Parameters:
command- the command to executeuser- the user executor
-
registerListener
void registerListener(@NotNull @NotNull Object object)Register a listener- Parameters:
object- the listener to register
-
unregisterListener
void unregisterListener(@NotNull @NotNull Object object)Unregister a listener- Parameters:
object- the listener to unregister
-
-