Class AccountModule

java.lang.Object
com.haven.havenplugin.AccountModule
All Implemented Interfaces:
Module

public class AccountModule extends Object implements Module
Registers account-related HTTP routes with ApiModule and owns the AccountManager instance.

Token verification in other modules

Use

invalid reference
com.haven.havenplugin.api.accounts.TokenManager#verifyToken(String)
directly — it is stateless and requires no reference to this module.

Sending alerts from other modules

AccountModule accounts = plugin.getModule(AccountModule.class);
if (accounts != null) accounts.addUserAlert(uuid, "shop", "Your order shipped.");

plugin.yml

The following entry must be present in plugin.yml:

commands:
  onlineaccount:
    description: Manage your pvc-utils.xyz online account
    usage: /onlineaccount [verify ]
  • Constructor Details

    • AccountModule

      public AccountModule()
  • Method Details

    • onEnable

      public void onEnable(Main plugin)
      Specified by:
      onEnable in interface Module
    • onDisable

      public void onDisable()
      Specified by:
      onDisable in interface Module
    • getName

      public String getName()
      Specified by:
      getName in interface Module
    • getListeners

      public List<org.bukkit.event.Listener> getListeners()
      Specified by:
      getListeners in interface Module
    • getCommands

      public List<String> getCommands()
      Description copied from interface: Module
      Command names this module owns, matching entries in plugin.yml.
      Specified by:
      getCommands in interface Module
    • getExecutor

      public org.bukkit.command.CommandExecutor getExecutor(String command)
      Specified by:
      getExecutor in interface Module
    • getTabCompleter

      public org.bukkit.command.TabCompleter getTabCompleter(String command)
      Specified by:
      getTabCompleter in interface Module
    • addUserAlert

      public void addUserAlert(String uuid, String alertType, String message)
      Append a JSON alert to a user's dynamicData.json. Silently does nothing if this module is inactive.