public @NotNull ShowEntity type(final @NotNull Key type) {
      if (requireNonNull(type, "type").equals(this.type)) return this;
      return new ShowEntity(type, this.id, this.name);
    }
Sets the type.

@param type the type
@return a {@code ShowEntity}
@since 4.0.0
api/src/main/java/net/kyori/adventure/text/event/HoverEvent.java