-
-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathCitizensPlugin.java
99 lines (80 loc) · 2.8 KB
/
CitizensPlugin.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package net.citizensnpcs.api;
import org.bukkit.plugin.Plugin;
import net.citizensnpcs.api.ai.speech.SpeechContext;
import net.citizensnpcs.api.command.CommandManager;
import net.citizensnpcs.api.npc.NPCDataStore;
import net.citizensnpcs.api.npc.NPCRegistry;
import net.citizensnpcs.api.npc.NPCSelector;
import net.citizensnpcs.api.npc.templates.TemplateRegistry;
import net.citizensnpcs.api.trait.TraitFactory;
public interface CitizensPlugin extends Plugin {
/**
* @param store
* The data store of the registry
* @return A new anonymous NPCRegistry that is not accessible via {@link #getNamedNPCRegistry(String)}
*/
public NPCRegistry createAnonymousNPCRegistry(NPCDataStore store);
/**
* @param name
* The plugin name
* @param store
* The data store for the registry
* @return A new NPCRegistry, that can also be retrieved via {@link #getNamedNPCRegistry(String)}
*/
public NPCRegistry createNamedNPCRegistry(String name, NPCDataStore store);
public CommandManager getCommandManager();
/**
* @return The default {@link NPCSelector} for managing player/server NPC selection
*/
public NPCSelector getDefaultNPCSelector();
/**
* Gets the Citizens {@link LocationLookup}
*
* @return
*/
public LocationLookup getLocationLookup();
/**
*
* @param name
* The plugin name
* @return A NPCRegistry previously created via {@link #createNamedNPCRegistry(String, NPCDataStore)}, or null if
* not found
*/
public NPCRegistry getNamedNPCRegistry(String name);
public NMSHelper getNMSHelper();
/**
* Get all registered {@link NPCRegistry}s.
*/
public Iterable<NPCRegistry> getNPCRegistries();
/**
* Gets the <em>default</em> {@link NPCRegistry}.
*
* @return The NPC registry
*/
public NPCRegistry getNPCRegistry();
public ClassLoader getOwningClassLoader();
public TemplateRegistry getTemplateRegistry();
public NPCRegistry getTemporaryNPCRegistry();
/**
* Gets the TraitFactory.
*
* @return Citizens trait factory
*/
public TraitFactory getTraitFactory();
/**
* Called when the current Citizens implementation is changed
*/
public void onImplementationChanged();
/**
* Removes the named NPCRegistry with the given name.
*/
public void removeNamedNPCRegistry(String name);
/**
* Sets the default NPC data store. Should be set during onEnable.
*
* @param store
* The new default store
*/
public void setDefaultNPCDataStore(NPCDataStore store);
public void talk(SpeechContext context);
}