Class Knob
- java.lang.Object
-
- net.kyori.adventure.platform.facet.Knob
-
public final class Knob extends java.lang.ObjectFacet utilities and logging pipeline.This is not supported API. Subject to change at any time.
- Since:
- 4.0.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisEnabled(@NotNull java.lang.String key, boolean defaultValue)Gets whether a facet should be enabled.static voidlogError(@Nullable java.lang.Throwable error, @NotNull java.lang.String format, @NotNull java.lang.Object... arguments)Logs an error.static voidlogMessage(@NotNull java.lang.String format, @NotNull java.lang.Object... arguments)Logs a message.static voidlogUnsupported(@NotNull java.lang.Object facet, @NotNull java.lang.Object value)Logs an unsupported value.
-
-
-
Method Detail
-
isEnabled
public static boolean isEnabled(@NotNull @NotNull java.lang.String key, boolean defaultValue)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 java.lang.Throwable error, @NotNull @NotNull java.lang.String format, @NotNull @NotNull java.lang.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 java.lang.String format, @NotNull @NotNull java.lang.Object... arguments)Logs a message.- Parameters:
format- a string formatarguments- an array of arguments- Since:
- 4.0.0
-
logUnsupported
public static void logUnsupported(@NotNull @NotNull java.lang.Object facet, @NotNull @NotNull java.lang.Object value)Logs an unsupported value.- Parameters:
facet- a facetvalue- a value- Since:
- 4.0.0
-
-