default boolean getBoolean(final @NotNull String key, final boolean defaultValue) {
    final BinaryTag tag = this.get(key);
    if (tag instanceof ByteBinaryTag) {
      // != 0 might look weird, but it is what vanilla does
      return ((ByteBinaryTag) tag).value() != 0;
    }
    return defaultValue;
  }
Gets a boolean.

<p>Booleans are stored as a {@link ByteBinaryTag} with a value of {@code 0} for {@code false} and {@code 1} for {@code true}.</p>

@param key the key
@param defaultValue the default value
@return the boolean value, or {@code defaultValue} if this compound does not contain a boolean tag
    with the specified key, or has a tag with a different type
@since 4.0.0
nbt/src/main/java/net/kyori/adventure/nbt/CompoundBinaryTag.java