Package dev.cwhead.GravesX.manager
Class DebugManager
java.lang.Object
dev.cwhead.GravesX.manager.DebugManager
Debug output manager (info/warn) for console + configured admins.
Severity:
- 0 = disabled (never prints)
- 1 = info
- 2 = warnings
Only one instance is active; creating a new one unloads the previous.
-
Constructor Summary
ConstructorsConstructorDescriptionDebugManager(Graves plugin) Creates a new manager and unloads any previous active instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidLogs a message by severity.voidLogs a message with an optional throwable.voidLogs an info message (severity 1).booleanisEnabled(int severity) Checks if a severity should be printed.booleanvoidunload()Unloads this manager (disables output).voidLogs a warning message (severity 2).
-
Constructor Details
-
DebugManager
Creates a new manager and unloads any previous active instance.- Parameters:
plugin- plugin instance
-
-
Method Details
-
unload
public void unload()Unloads this manager (disables output). -
isUnloaded
public boolean isUnloaded()- Returns:
- true if unloaded
-
isEnabled
public boolean isEnabled(int severity) Checks if a severity should be printed.- Parameters:
severity- 0=disabled, 1=info, 2=warnings- Returns:
- true if allowed by config
-
info
Logs an info message (severity 1).- Parameters:
message- message
-
warn
Logs a warning message (severity 2).- Parameters:
message- message
-
debug
Logs a message by severity.- Parameters:
message- messageseverity- 0=disabled, 1=info, 2=warnings
-
debug
Logs a message with an optional throwable.- Parameters:
message- messageseverity- 0=disabled, 1=info, 2=warningsthrowable- optional throwable
-