Class CrazyAdvancementsAPI

java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
eu.endercentral.crazy_advancements.CrazyAdvancementsAPI
All Implemented Interfaces:
CommandExecutor, TabCompleter, TabExecutor, Listener, Plugin

public class CrazyAdvancementsAPI extends JavaPlugin implements Listener
Represents the API's Plugin
Author:
Axel
  • Field Details

    • API_NAMESPACE

      public static final String API_NAMESPACE
      See Also:
    • CRITERION

      public static final net.minecraft.advancements.Criterion<?> CRITERION
      Criterion Instance for Internal Use
  • Constructor Details

    • CrazyAdvancementsAPI

      public CrazyAdvancementsAPI()
  • Method Details

    • reload

      public void reload()
      Reloads the API
      Currently reloads JSON Advancements and Custom Item Definitions
    • onLoad

      public void onLoad()
      Specified by:
      onLoad in interface Plugin
      Overrides:
      onLoad in class JavaPlugin
    • onEnable

      public void onEnable()
      Specified by:
      onEnable in interface Plugin
      Overrides:
      onEnable in class JavaPlugin
    • onDisable

      public void onDisable()
      Specified by:
      onDisable in interface Plugin
      Overrides:
      onDisable in class JavaPlugin
    • getInstance

      public static CrazyAdvancementsAPI getInstance()
      Gets the Instance
      Returns:
      The Instance
    • getGson

      public static com.google.gson.Gson getGson()
      Gets the Gson Instance
      Returns:
      The Gson Instance
    • onJoin

      public void onJoin(PlayerJoinEvent e)
    • onQuit

      public void onQuit(PlayerQuitEvent e)
    • clearActiveTab

      public static void clearActiveTab(Player player)
      Clears the active tab
      Parameters:
      player - The player whose Tab should be cleared
    • setActiveTab

      public static void setActiveTab(Player player, String rootAdvancement)
      Sets the active tab
      Parameters:
      player - The player whose Tab should be changed
      rootAdvancement - The name of the tab to change to
    • setActiveTab

      public static void setActiveTab(Player player, @Nullable NameKey rootAdvancement)
      Sets the active tab
      Parameters:
      player - The player whose Tab should be changed
      rootAdvancement - The name of the tab to change to
    • getActiveTab

      public static NameKey getActiveTab(Player player)
      Gets the active tab
      Parameters:
      player - Player to check
      Returns:
      The active Tab
    • onCommand

      public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args)
      Specified by:
      onCommand in interface CommandExecutor
      Overrides:
      onCommand in class JavaPlugin
    • onTabComplete

      public List<String> onTabComplete(CommandSender sender, Command cmd, String alias, String[] args)
      Specified by:
      onTabComplete in interface TabCompleter
      Overrides:
      onTabComplete in class JavaPlugin