Package net.citizensnpcs
Class Citizens
java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
net.citizensnpcs.Citizens
- All Implemented Interfaces:
CitizensPlugin,CommandExecutor,TabCompleter,TabExecutor,Plugin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateNamedNPCRegistry(String name, NPCDataStore store) Gets the CitizensLocationLookupgetNamedNPCRegistry(String name) Get all registeredNPCRegistrys.Gets the defaultNPCRegistry.getShops()Gets the TraitFactory.booleanonCommand(CommandSender sender, Command command, String cmdName, String[] args) voidvoidvoidonEnable()voidCalled when the current Citizens implementation is changedvoidregisterCommandClass(Class<?> clazz) voidreload()voidremoveNamedNPCRegistry(String name) Removes the named NPCRegistry with the given name.voidSets the default NPC data store.voidvoidstoreNPCs(boolean async) voidtalk(SpeechContext context) Methods inherited from class org.bukkit.plugin.java.JavaPlugin
getClassLoader, getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onLoad, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toStringMethods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bukkit.plugin.Plugin
getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getLogger, getName, getPluginLoader, getResource, getServer, isEnabled, isNaggable, onLoad, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setNaggableMethods inherited from interface org.bukkit.command.TabCompleter
onTabComplete
-
Constructor Details
-
Citizens
public Citizens()
-
-
Method Details
-
createAnonymousNPCRegistry
- Specified by:
createAnonymousNPCRegistryin interfaceCitizensPlugin- Parameters:
store- The data store of the registry- Returns:
- A new anonymous NPCRegistry that is not accessible via
CitizensPlugin.getNamedNPCRegistry(String)
-
createNamedNPCRegistry
- Specified by:
createNamedNPCRegistryin interfaceCitizensPlugin- Parameters:
name- The plugin namestore- The data store for the registry- Returns:
- A new NPCRegistry, that can also be retrieved via
CitizensPlugin.getNamedNPCRegistry(String)
-
getCommandManager
- Specified by:
getCommandManagerin interfaceCitizensPlugin
-
getDefaultNPCDataStore
-
getDefaultNPCSelector
- Specified by:
getDefaultNPCSelectorin interfaceCitizensPlugin- Returns:
- The default
NPCSelectorfor managing player/server NPC selection
-
getLocationLookup
Description copied from interface:CitizensPluginGets the CitizensLocationLookup- Specified by:
getLocationLookupin interfaceCitizensPlugin- Returns:
-
getNamedNPCRegistry
- Specified by:
getNamedNPCRegistryin interfaceCitizensPlugin- Parameters:
name- The plugin name- Returns:
- A NPCRegistry previously created via
CitizensPlugin.createNamedNPCRegistry(String, NPCDataStore), or null if not found
-
getNMSHelper
- Specified by:
getNMSHelperin interfaceCitizensPlugin
-
getNPCRegistries
Description copied from interface:CitizensPluginGet all registeredNPCRegistrys.- Specified by:
getNPCRegistriesin interfaceCitizensPlugin
-
getNPCRegistry
Description copied from interface:CitizensPluginGets the defaultNPCRegistry.- Specified by:
getNPCRegistryin interfaceCitizensPlugin- Returns:
- The NPC registry
-
getNPCSelector
-
getOwningClassLoader
- Specified by:
getOwningClassLoaderin interfaceCitizensPlugin
-
getProtocolLibListener
-
getShops
-
getTemplateRegistry
- Specified by:
getTemplateRegistryin interfaceCitizensPlugin
-
getTemporaryNPCRegistry
- Specified by:
getTemporaryNPCRegistryin interfaceCitizensPlugin
-
getTraitFactory
Description copied from interface:CitizensPluginGets the TraitFactory.- Specified by:
getTraitFactoryin interfaceCitizensPlugin- Returns:
- Citizens trait factory
-
onCommand
- Specified by:
onCommandin interfaceCommandExecutor- Overrides:
onCommandin classJavaPlugin
-
onDependentPluginDisable
public void onDependentPluginDisable() -
onDisable
public void onDisable()- Specified by:
onDisablein interfacePlugin- Overrides:
onDisablein classJavaPlugin
-
onEnable
public void onEnable()- Specified by:
onEnablein interfacePlugin- Overrides:
onEnablein classJavaPlugin
-
onImplementationChanged
public void onImplementationChanged()Description copied from interface:CitizensPluginCalled when the current Citizens implementation is changed- Specified by:
onImplementationChangedin interfaceCitizensPlugin
-
registerCommandClass
-
reload
- Throws:
NPCLoadException
-
removeNamedNPCRegistry
Description copied from interface:CitizensPluginRemoves the named NPCRegistry with the given name.- Specified by:
removeNamedNPCRegistryin interfaceCitizensPlugin
-
setDefaultNPCDataStore
Description copied from interface:CitizensPluginSets the default NPC data store. Should be set during onEnable.- Specified by:
setDefaultNPCDataStorein interfaceCitizensPlugin- Parameters:
store- The new default store
-
storeNPCs
public void storeNPCs() -
storeNPCs
public void storeNPCs(boolean async) -
talk
- Specified by:
talkin interfaceCitizensPlugin
-