/
DenizenImplementation.java
143 lines (108 loc) · 4.29 KB
/
DenizenImplementation.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
package net.aufdemrand.denizencore;
import net.aufdemrand.denizencore.objects.aH;
import net.aufdemrand.denizencore.objects.dList;
import net.aufdemrand.denizencore.scripts.ScriptEntry;
import net.aufdemrand.denizencore.scripts.ScriptEntryData;
import net.aufdemrand.denizencore.scripts.queues.ScriptQueue;
import net.aufdemrand.denizencore.tags.TagContext;
import net.aufdemrand.denizencore.utilities.YamlConfiguration;
import net.aufdemrand.denizencore.utilities.debugging.Debuggable;
import net.aufdemrand.denizencore.utilities.debugging.dB.DebugElement;
import java.io.File;
import java.util.List;
/**
* Interface representing all the information that an implementation must provide to the engine.
*/
public interface DenizenImplementation {
/**
* Return a list of all folders that the implementation has scripts within.
*/
public abstract File getScriptFolder();
/**
* Return the current version of the implementation.
* EG, "Gamey Game 1.0 Denizen 0.9"
*/
public abstract String getImplementationVersion();
/**
* Output a debug message to console.
*/
public abstract void debugMessage(String message);
/**
* Output an exception to console.
*/
public abstract void debugException(Throwable ex);
/**
* Output an error to console.
*/
public abstract void debugError(String error);
/**
* Output an error to console, specific to a script queue.
*/
public abstract void debugError(ScriptQueue queue, String error);
/**
* Output an error to console, specific to a script queue.
*/
public abstract void debugError(ScriptQueue queue, Throwable error);
/**
* Output a command information report.
*/
public abstract void debugReport(Debuggable caller, String name, String message);
/**
* Output an 'Okay!' message.
*/
public abstract void debugApproval(String message);
/**
* Outputs a message specific to a debuggable object.
*/
public abstract void debugEntry(Debuggable entry, String message);
/**
* Outputs a message specific to a debuggable object.
*/
public abstract void debugEntry(Debuggable entry, DebugElement element, String message);
/**
* Outputs a message specific to a debuggable object.
*/
public abstract void debugEntry(Debuggable entry, DebugElement element);
/**
* Return the name of the implementation.
* EG, "Gamey Game".
*/
public abstract String getImplementationName();
/**
* Run any code that fires before a script reload goes through,
* EG, clearing custom data.
*/
public abstract void preScriptReload();
/**
* Run any code that fires after a script reload goes through,
* EG, running a public Reload event.
*/
public abstract void onScriptReload();
/**
* Return an empty ScriptEntryData object of the implementation's variety.
* This is to avoid casting issues when ScriptEntry's use generic data objects.
*/
public abstract ScriptEntryData getEmptyScriptEntryData();
/**
* Temporary.
*/
public abstract void buildCoreContainers(YamlConfiguration yamlScripts);
/**
* Temporary.
*/
public abstract List<YamlConfiguration> getOutsideScripts();
public abstract void handleCommandSpecialCases(ScriptEntry entry);
public abstract void debugCommandHeader(ScriptEntry entry);
public abstract TagContext getTagContextFor(ScriptEntry entry, boolean instant);
public abstract boolean handleCustomArgs(ScriptEntry entry, aH.Argument arg, boolean if_ignore);
public abstract void refreshScriptContainers();
public abstract String scriptQueueSpeed();
public abstract dList valueOfFlagdList(String input);
public abstract boolean matchesFlagdList(String input);
public abstract String getLastEntryFromFlag(String flag);
public abstract TagContext getTagContext(ScriptEntry entry);
public abstract int getTagTimeout();
public abstract boolean allowConsoleRedirection();
public abstract String cleanseLogString(String str);
public abstract boolean matchesType(String comparable, String comparedTo);
}