Class ChatUtil

java.lang.Object
com.viaversion.viafabricplus.util.ChatUtil

public final class ChatUtil extends Object
This class contains methods to send messages to the player with the ViaFabricPlus prefix
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final net.minecraft.network.chat.Component
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.network.chat.Component
    prefixText(String message)
    Prefixes the message with the ViaFabricPlus prefix
    static net.minecraft.network.chat.Component
    prefixText(net.minecraft.network.chat.Component message)
    Prefixes the message with the ViaFabricPlus prefix
    static void
    sendPrefixedMessage(net.minecraft.network.chat.Component message)
    Sends a prefixed message to the player
    static String
    uncoverTranslationKey(net.minecraft.network.chat.Component text)
     

    Methods inherited from class java.lang.Object

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

    • PREFIX

      public static final String PREFIX
    • PREFIX_TEXT

      public static final net.minecraft.network.chat.Component PREFIX_TEXT
  • Constructor Details

    • ChatUtil

      public ChatUtil()
  • Method Details

    • prefixText

      public static net.minecraft.network.chat.Component prefixText(String message)
      Prefixes the message with the ViaFabricPlus prefix
      Parameters:
      message - The message to send
      Returns:
      The prefixed message
    • prefixText

      public static net.minecraft.network.chat.Component prefixText(net.minecraft.network.chat.Component message)
      Prefixes the message with the ViaFabricPlus prefix
      Parameters:
      message - The message to send
      Returns:
      The prefixed message
    • sendPrefixedMessage

      public static void sendPrefixedMessage(net.minecraft.network.chat.Component message)
      Sends a prefixed message to the player
      Parameters:
      message - The message to send
    • uncoverTranslationKey

      public static String uncoverTranslationKey(net.minecraft.network.chat.Component text)
      Parameters:
      text - The text to uncover
      Returns:
      The translation key of the text