Package dk.minepay.server.bukkit
Class MinePayApi
java.lang.Object
dk.minepay.server.bukkit.MinePayApi
Main API class for the MinePay plugin. This class handles the initialization and management of
the plugin's components.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks if the required folders exist and creates them if they do not.voiddisable()Disables the MinePayApi instance.voidinit(org.bukkit.plugin.java.JavaPlugin javaPlugin) Initializes the MinePayApi instance with the given JavaPlugin.static MinePayApiinitApi(org.bukkit.plugin.java.JavaPlugin javaPlugin) Initializes the MinePay API with the given JavaPlugin instance.voidInitializes the RequestManager and schedules a task to process requests periodically.booleanChecks if the MinePayApi instance is initialized.voidLoads the online votes/requests from the saves.yml file.static voidRuns the given Runnable asynchronously.voidSaves the online requests and votes to a file.
-
Constructor Details
-
MinePayApi
public MinePayApi()Constructor for the MinePayApi class.
-
-
Method Details
-
initApi
Initializes the MinePay API with the given JavaPlugin instance.- Parameters:
javaPlugin- the JavaPlugin instance- Returns:
- the initialized MinePayApi instance
-
isInitialized
public boolean isInitialized()Checks if the MinePayApi instance is initialized.- Returns:
- true if the instance is initialized, false otherwise
-
init
public void init(org.bukkit.plugin.java.JavaPlugin javaPlugin) Initializes the MinePayApi instance with the given JavaPlugin.- Parameters:
javaPlugin- the JavaPlugin instance
-
checkFolders
public void checkFolders()Checks if the required folders exist and creates them if they do not. -
saveOnline
public void saveOnline()Saves the online requests and votes to a file. -
loadOnline
public void loadOnline()Loads the online votes/requests from the saves.yml file. -
disable
public void disable()Disables the MinePayApi instance. -
initRequestManager
public void initRequestManager()Initializes the RequestManager and schedules a task to process requests periodically. -
runAsync
Runs the given Runnable asynchronously.- Parameters:
runnable- the Runnable to run
-