Class Knob
java.lang.Object
net.kyori.adventure.platform.facet.Knob
Facet utilities and logging pipeline.
This is not supported API. Subject to change at any time.
- Since:
- 4.0.0
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Gets whether a facet should be enabled.static void
Logs an error.static void
logMessage
(@NotNull String format, @NotNull Object... arguments) Logs a message.static void
logUnsupported
(@NotNull Object facet, @NotNull Object value) Logs an unsupported value.
-
Field Details
-
DEBUG
public static final boolean DEBUG -
OUT
-
ERR
-
-
Method Details
-
isEnabled
Gets whether a facet should be enabled.Use the JVM flag,
-Dnet.kyori.adventure.<key>=true
, to enable the facet.- Parameters:
key
- a keydefaultValue
- the default value- Returns:
- if the feature is enabled
- Since:
- 4.0.0
-
logError
public static void logError(@Nullable @Nullable Throwable error, @NotNull @NotNull String format, @NotNull @NotNull Object... arguments) Logs an error.- Parameters:
error
- an errorformat
- a string formatarguments
- an array of arguments- Since:
- 4.0.0
-
logMessage
public static void logMessage(@NotNull @NotNull String format, @NotNull @NotNull Object... arguments) Logs a message.- Parameters:
format
- a string formatarguments
- an array of arguments- Since:
- 4.0.0
-
logUnsupported
Logs an unsupported value.- Parameters:
facet
- a facetvalue
- a value- Since:
- 4.0.0
-