java.lang.Object
net.kyori.adventure.platform.facet.Knob

public final class Knob extends Object
Facet utilities and logging pipeline.

This is not supported API. Subject to change at any time.

Since:
4.0.0
  • Field Details

  • Method Details

    • isEnabled

      public static boolean isEnabled(@NotNull @NotNull 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 key
      defaultValue - 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 error
      format - a string format
      arguments - 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 format
      arguments - an array of arguments
      Since:
      4.0.0
    • logUnsupported

      public static void logUnsupported(@NotNull @NotNull Object facet, @NotNull @NotNull Object value)
      Logs an unsupported value.
      Parameters:
      facet - a facet
      value - a value
      Since:
      4.0.0