Interface CitizensPlugin

All Superinterfaces:
CommandExecutor, Plugin, TabCompleter, TabExecutor
All Known Implementing Classes:
Citizens

public interface CitizensPlugin extends Plugin
  • Method Details

    • createAnonymousNPCRegistry

      NPCRegistry createAnonymousNPCRegistry(NPCDataStore store)
      Parameters:
      store - The data store of the registry
      Returns:
      A new anonymous NPCRegistry that is not accessible via getNamedNPCRegistry(String)
    • createCitizensBackedNPCRegistry

      NPCRegistry createCitizensBackedNPCRegistry(NPCDataStore store)
      Creates a new anonymous NPCRegistry that is "Citizens-backed" i.e. will reload and unload at the same time that Citizens reloads and unloads.
      Parameters:
      store - The NPCDataStore to use with the registry
    • createNamedNPCRegistry

      NPCRegistry createNamedNPCRegistry(String name, NPCDataStore store)
      Parameters:
      name - The plugin name
      store - The data store for the registry
      Returns:
      A new NPCRegistry, that can also be retrieved via getNamedNPCRegistry(String)
    • getCommandManager

      CommandManager getCommandManager()
    • getDefaultNPCSelector

      NPCSelector getDefaultNPCSelector()
      Returns:
      The default NPCSelector for managing player/server NPC selection
    • getLocationLookup

      LocationLookup getLocationLookup()
      Gets the Citizens LocationLookup
      Returns:
    • getNamedNPCRegistry

      NPCRegistry getNamedNPCRegistry(String name)
      Parameters:
      name - The plugin name
      Returns:
      A NPCRegistry previously created via createNamedNPCRegistry(String, NPCDataStore), or null if not found
    • getNMSHelper

      NMSHelper getNMSHelper()
    • getNPCRegistries

      Iterable<NPCRegistry> getNPCRegistries()
      Get all registered NPCRegistrys.
    • getNPCRegistry

      NPCRegistry getNPCRegistry()
      Gets the default NPCRegistry.
      Returns:
      The NPC registry
    • getOwningClassLoader

      ClassLoader getOwningClassLoader()
    • getTemplateRegistry

      TemplateRegistry getTemplateRegistry()
    • getTraitFactory

      TraitFactory getTraitFactory()
      Gets the TraitFactory.
      Returns:
      Citizens trait factory
    • onImplementationChanged

      void onImplementationChanged()
      Called when the current Citizens implementation is changed
    • removeNamedNPCRegistry

      void removeNamedNPCRegistry(String name)
      Removes the named NPCRegistry with the given name.
    • setDefaultNPCDataStore

      void setDefaultNPCDataStore(NPCDataStore store)
      Sets the default NPC data store. Should be set during onEnable.
      Parameters:
      store - The new default store
    • talk

      void talk(SpeechContext context)