Class MinePayApi

java.lang.Object
dk.minepay.server.bukkit.MinePayApi

public class MinePayApi extends Object
Main API class for the MinePay plugin. This class handles the initialization and management of the plugin's components.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor for the MinePayApi class.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Checks if the required folders exist and creates them if they do not.
    void
    Disables the MinePayApi instance.
    void
    init(org.bukkit.plugin.java.JavaPlugin javaPlugin)
    Initializes the MinePayApi instance with the given JavaPlugin.
    static MinePayApi
    initApi(org.bukkit.plugin.java.JavaPlugin javaPlugin)
    Initializes the MinePay API with the given JavaPlugin instance.
    void
    Initializes the RequestManager and schedules a task to process requests periodically.
    boolean
    Checks if the MinePayApi instance is initialized.
    void
    Loads the online votes/requests from the saves.yml file.
    static void
    runAsync(Runnable runnable)
    Runs the given Runnable asynchronously.
    void
    Saves the online requests and votes to a file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MinePayApi

      public MinePayApi()
      Constructor for the MinePayApi class.
  • Method Details

    • initApi

      public static MinePayApi initApi(org.bukkit.plugin.java.JavaPlugin javaPlugin)
      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

      public static void runAsync(Runnable runnable)
      Runs the given Runnable asynchronously.
      Parameters:
      runnable - the Runnable to run