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
-
Method Summary
Modifier and TypeMethodDescriptioncreateNamedNPCRegistry
(String name, NPCDataStore store) Gets the CitizensLocationLookup
getNamedNPCRegistry
(String name) Get all registeredNPCRegistry
s.Gets the defaultNPCRegistry
.getShops()
Gets the TraitFactory.boolean
onCommand
(CommandSender sender, Command command, String cmdName, String[] args) void
void
void
onEnable()
void
Called when the current Citizens implementation is changedvoid
registerCommandClass
(Class<?> clazz) void
reload()
void
removeNamedNPCRegistry
(String name) Removes the named NPCRegistry with the given name.void
Sets the default NPC data store.void
void
storeNPCs
(boolean async) void
talk
(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, toString
Methods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.bukkit.plugin.Plugin
getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getLogger, getName, getPluginLoader, getResource, getServer, isEnabled, isNaggable, onLoad, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setNaggable
Methods inherited from interface org.bukkit.command.TabCompleter
onTabComplete
-
Constructor Details
-
Citizens
public Citizens()
-
-
Method Details
-
createAnonymousNPCRegistry
- Specified by:
createAnonymousNPCRegistry
in 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:
createNamedNPCRegistry
in 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:
getCommandManager
in interfaceCitizensPlugin
-
getDefaultNPCSelector
- Specified by:
getDefaultNPCSelector
in interfaceCitizensPlugin
- Returns:
- The default
NPCSelector
for managing player/server NPC selection
-
getLocationLookup
Description copied from interface:CitizensPlugin
Gets the CitizensLocationLookup
- Specified by:
getLocationLookup
in interfaceCitizensPlugin
- Returns:
-
getNamedNPCRegistry
- Specified by:
getNamedNPCRegistry
in interfaceCitizensPlugin
- Parameters:
name
- The plugin name- Returns:
- A NPCRegistry previously created via
CitizensPlugin.createNamedNPCRegistry(String, NPCDataStore)
, or null if not found
-
getNMSHelper
- Specified by:
getNMSHelper
in interfaceCitizensPlugin
-
getNPCRegistries
Description copied from interface:CitizensPlugin
Get all registeredNPCRegistry
s.- Specified by:
getNPCRegistries
in interfaceCitizensPlugin
-
getNPCRegistry
Description copied from interface:CitizensPlugin
Gets the defaultNPCRegistry
.- Specified by:
getNPCRegistry
in interfaceCitizensPlugin
- Returns:
- The NPC registry
-
getNPCSelector
-
getOwningClassLoader
- Specified by:
getOwningClassLoader
in interfaceCitizensPlugin
-
getProtocolLibListener
-
getShops
-
getTemplateRegistry
- Specified by:
getTemplateRegistry
in interfaceCitizensPlugin
-
getTemporaryNPCRegistry
- Specified by:
getTemporaryNPCRegistry
in interfaceCitizensPlugin
-
getTraitFactory
Description copied from interface:CitizensPlugin
Gets the TraitFactory.- Specified by:
getTraitFactory
in interfaceCitizensPlugin
- Returns:
- Citizens trait factory
-
onCommand
- Specified by:
onCommand
in interfaceCommandExecutor
- Overrides:
onCommand
in classJavaPlugin
-
onDependentPluginDisable
public void onDependentPluginDisable() -
onDisable
public void onDisable()- Specified by:
onDisable
in interfacePlugin
- Overrides:
onDisable
in classJavaPlugin
-
onEnable
public void onEnable()- Specified by:
onEnable
in interfacePlugin
- Overrides:
onEnable
in classJavaPlugin
-
onImplementationChanged
public void onImplementationChanged()Description copied from interface:CitizensPlugin
Called when the current Citizens implementation is changed- Specified by:
onImplementationChanged
in interfaceCitizensPlugin
-
registerCommandClass
-
reload
- Throws:
NPCLoadException
-
removeNamedNPCRegistry
Description copied from interface:CitizensPlugin
Removes the named NPCRegistry with the given name.- Specified by:
removeNamedNPCRegistry
in interfaceCitizensPlugin
-
setDefaultNPCDataStore
Description copied from interface:CitizensPlugin
Sets the default NPC data store. Should be set during onEnable.- Specified by:
setDefaultNPCDataStore
in interfaceCitizensPlugin
- Parameters:
store
- The new default store
-
storeNPCs
public void storeNPCs() -
storeNPCs
public void storeNPCs(boolean async) -
talk
- Specified by:
talk
in interfaceCitizensPlugin
-