Package net.citizensnpcs.api
Interface CitizensPlugin
- All Superinterfaces:
CommandExecutor
,Plugin
,TabCompleter
,TabExecutor
- All Known Implementing Classes:
Citizens
-
Method Summary
Modifier and TypeMethodDescriptioncreateNamedNPCRegistry
(String name, NPCDataStore store) Gets the CitizensLocationLookup
getNamedNPCRegistry
(String name) Get all registeredNPCRegistry
s.Gets the defaultNPCRegistry
.Gets the TraitFactory.void
Called when the current Citizens implementation is changedvoid
removeNamedNPCRegistry
(String name) Removes the named NPCRegistry with the given name.void
Sets the default NPC data store.void
talk
(SpeechContext context) Methods inherited from interface org.bukkit.command.CommandExecutor
onCommand
Methods inherited from interface org.bukkit.plugin.Plugin
getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getLogger, getName, getPluginLoader, getResource, getServer, isEnabled, isNaggable, onDisable, onEnable, onLoad, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setNaggable
Methods inherited from interface org.bukkit.command.TabCompleter
onTabComplete
-
Method Details
-
createAnonymousNPCRegistry
- Parameters:
store
- The data store of the registry- Returns:
- A new anonymous NPCRegistry that is not accessible via
getNamedNPCRegistry(String)
-
createNamedNPCRegistry
- Parameters:
name
- The plugin namestore
- 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 CitizensLocationLookup
- Returns:
-
getNamedNPCRegistry
- 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 registeredNPCRegistry
s. -
getNPCRegistry
NPCRegistry getNPCRegistry()Gets the defaultNPCRegistry
.- Returns:
- The NPC registry
-
getOwningClassLoader
ClassLoader getOwningClassLoader() -
getTemplateRegistry
TemplateRegistry getTemplateRegistry() -
getTemporaryNPCRegistry
NPCRegistry getTemporaryNPCRegistry() -
getTraitFactory
TraitFactory getTraitFactory()Gets the TraitFactory.- Returns:
- Citizens trait factory
-
onImplementationChanged
void onImplementationChanged()Called when the current Citizens implementation is changed -
removeNamedNPCRegistry
Removes the named NPCRegistry with the given name. -
setDefaultNPCDataStore
Sets the default NPC data store. Should be set during onEnable.- Parameters:
store
- The new default store
-
talk
-