Class JeffLib

java.lang.Object
de.jeff_media.jefflib.JeffLib

public class JeffLib extends Object
Main class of the library, has to be initialized for certain methods to work.
  • Method Details

    • getThreadLocalRandom

      public static ThreadLocalRandom getThreadLocalRandom()
      Returns the ThreadLocalRandom instance.
      Returns:
      ThreadLocalRandom instance
    • getPlugin

      public static org.bukkit.plugin.Plugin getPlugin()
      Returns the Plugin instance.
      Returns:
      Plugin instance
    • getRandom

      public static Random getRandom()
      Returns the Random instance.
      Returns:
      Random instance
    • init

      public static void init(org.bukkit.plugin.Plugin plugin, boolean trackBlocks)
      Initializes the library. Needed for some methods.
      Parameters:
      plugin - Plugin instance
      trackBlocks - Whether to use the BlockTracker feature. Only available in 1.16.3 and later.
    • init

      public static void init(org.bukkit.plugin.Plugin plugin)
      Initializes the Library
      Parameters:
      plugin - Plugin instance
    • isRunningSpigot

      public static boolean isRunningSpigot()
      Checks whether Spigot or a fork is running
      Returns:
      true when running at least Spigot