-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
dB.java
68 lines (51 loc) · 2.11 KB
/
dB.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
package net.aufdemrand.denizencore.utilities.debugging;
import net.aufdemrand.denizencore.DenizenCore;
import net.aufdemrand.denizencore.scripts.queues.ScriptQueue;
public class dB {
public static boolean showScriptBuilder = false;
public static boolean showEventsTrimming = false;
public static boolean verbose = false;
/**
* Can be used with echoDebug(...) to output a header, footer,
* or a spacer.
* <p/>
* DebugElement.Header = +- string description ------+
* DebugElement.Spacer =
* DebugElement.Footer = +--------------+
* <p/>
* Also includes color.
*/
public static enum DebugElement {
Header, Footer, Spacer
}
public static void echoError(String error) {
DenizenCore.getImplementation().debugError(error);
}
public static void echoError(ScriptQueue queue, String error) {
DenizenCore.getImplementation().debugError(queue, error);
}
public static void echoError(ScriptQueue queue, Throwable error) {
DenizenCore.getImplementation().debugError(queue, error);
}
public static void echoError(Throwable ex) {
DenizenCore.getImplementation().debugException(ex);
}
public static void log(String message) {
DenizenCore.getImplementation().debugMessage(message);
}
public static void echoApproval(String message) {
DenizenCore.getImplementation().debugApproval(message);
}
public static void echoDebug(Debuggable entry, String message) {
DenizenCore.getImplementation().debugEntry(entry, message);
}
public static void echoDebug(Debuggable entry, DebugElement element, String message) {
DenizenCore.getImplementation().debugEntry(entry, element, message);
}
public static void echoDebug(Debuggable entry, DebugElement element) {
DenizenCore.getImplementation().debugEntry(entry, element);
}
public static void report(Debuggable caller, String name, String message) {
DenizenCore.getImplementation().debugReport(caller, name, message);
}
}