java.lang.Object
io.github.projectunified.unidialog.viaversion.input.ViaDialogInput
Direct Known Subclasses:
ViaBooleanInput, ViaNumberRangeInput, ViaSingleOptionInput, ViaTextInput

public abstract class ViaDialogInput extends Object
A ViaVersion-based base class for dialog inputs.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    ViaDialogInput(Function<String,com.viaversion.viaversion.libs.mcstructs.text.TextComponent> componentDeserializer)
    Constructor for ViaDialogInput
  • Method Summary

    Modifier and Type
    Method
    Description
    Function<String,com.viaversion.viaversion.libs.mcstructs.text.TextComponent>
    Get the component deserializer
    abstract void
    write(com.viaversion.nbt.tag.CompoundTag tag, com.viaversion.viaversion.util.SerializerVersion baseVersion, com.viaversion.viaversion.util.SerializerVersion targetVersion)
    Write the type-specific fields of this input into the given tag

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ViaDialogInput

      protected ViaDialogInput(Function<String,com.viaversion.viaversion.libs.mcstructs.text.TextComponent> componentDeserializer)
      Constructor for ViaDialogInput
      Parameters:
      componentDeserializer - the function to deserialize components from strings
  • Method Details

    • write

      public abstract void write(com.viaversion.nbt.tag.CompoundTag tag, com.viaversion.viaversion.util.SerializerVersion baseVersion, com.viaversion.viaversion.util.SerializerVersion targetVersion)
      Write the type-specific fields of this input into the given tag
      Parameters:
      tag - the tag to write into
      baseVersion - the serializer of the server version the dialog is created for
      targetVersion - the serializer of the version the dialog is sent to
    • getComponentDeserializer

      public Function<String,com.viaversion.viaversion.libs.mcstructs.text.TextComponent> getComponentDeserializer()
      Get the component deserializer
      Returns:
      the component deserializer