Class ChatComponentBuilder

java.lang.Object
de.z0rdak.yawp.util.ChatComponentBuilder

public class ChatComponentBuilder extends Object
  • Method Details

    • commandBlockPosStr

      public static String commandBlockPosStr(net.minecraft.core.BlockPos target)
      Builds a string from the given block pos which can be used in commands
    • shortBlockPosBracketed

      public static String shortBlockPosBracketed(net.minecraft.core.BlockPos target)
    • shortBlockPos

      public static String shortBlockPos(net.minecraft.core.BlockPos target)
    • tinyBlockPos

      public static String tinyBlockPos(net.minecraft.core.BlockPos target)
    • buildBlockPosLinkText

      public static String buildBlockPosLinkText(net.minecraft.core.BlockPos target)
    • buildHeader

      public static net.minecraft.network.chat.MutableComponent buildHeader(net.minecraft.network.chat.MutableComponent header)
    • buildExecuteCmdComponent

      public static net.minecraft.network.chat.MutableComponent buildExecuteCmdComponent(net.minecraft.network.chat.MutableComponent linkText, net.minecraft.network.chat.MutableComponent hoverText, String command, net.minecraft.network.chat.ClickEvent.Action eventAction, net.minecraft.ChatFormatting color)
    • mapActionToClickEvent

      public static net.minecraft.network.chat.ClickEvent mapActionToClickEvent(net.minecraft.network.chat.ClickEvent.Action clickAction, String content)
    • buildExecuteCmdLink

      public static net.minecraft.network.chat.MutableComponent buildExecuteCmdLink(net.minecraft.network.chat.MutableComponent linkText, net.minecraft.network.chat.MutableComponent hoverText, String command, net.minecraft.network.chat.ClickEvent.Action eventAction, net.minecraft.ChatFormatting color)
    • buildExecuteCmdLinkWithBrackets

      public static net.minecraft.network.chat.MutableComponent buildExecuteCmdLinkWithBrackets(net.minecraft.network.chat.MutableComponent linkText, net.minecraft.network.chat.MutableComponent hoverText, String command, net.minecraft.network.chat.ClickEvent.Action eventAction, net.minecraft.ChatFormatting color)
    • buildPlayerHoverComponent

      public static net.minecraft.network.chat.MutableComponent buildPlayerHoverComponent(net.minecraft.world.entity.player.Player player)
    • buildTeamHoverComponent

      public static net.minecraft.network.chat.MutableComponent buildTeamHoverComponent(net.minecraft.world.scores.Team team)
    • buildRegionAreaDetailComponent

      public static net.minecraft.network.chat.MutableComponent buildRegionAreaDetailComponent(IMarkableRegion region)
    • buildTextWithHoverAndBracketsMsg

      public static net.minecraft.network.chat.MutableComponent buildTextWithHoverAndBracketsMsg(net.minecraft.network.chat.MutableComponent text, net.minecraft.network.chat.MutableComponent hoverText, net.minecraft.ChatFormatting color)
    • buildTextWithWhiteBracketsAndHover

      public static net.minecraft.network.chat.MutableComponent buildTextWithWhiteBracketsAndHover(net.minecraft.network.chat.MutableComponent text, net.minecraft.network.chat.MutableComponent hoverText, net.minecraft.ChatFormatting color)
    • buildTextWithHoverMsg

      public static net.minecraft.network.chat.MutableComponent buildTextWithHoverMsg(net.minecraft.network.chat.MutableComponent text, net.minecraft.network.chat.MutableComponent hoverText, net.minecraft.ChatFormatting color)
    • buildHelpStartComponent

      public static net.minecraft.network.chat.MutableComponent buildHelpStartComponent()
    • getGroupsForRegion

      public static List<String> getGroupsForRegion(IProtectedRegion region)
    • getGroupSize

      public static int getGroupSize(IProtectedRegion region, String groupName)
    • buildGroupListHeader

      public static net.minecraft.network.chat.MutableComponent buildGroupListHeader(IProtectedRegion region, String group)
    • buildGroupTypeHeader

      public static net.minecraft.network.chat.MutableComponent buildGroupTypeHeader(IProtectedRegion region, String group, GroupType groupType)
    • buildFlagStateComponent

      public static net.minecraft.network.chat.MutableComponent buildFlagStateComponent(IProtectedRegion region, IFlag flag)
    • buildFlagMessageHoverText

      public static net.minecraft.network.chat.MutableComponent buildFlagMessageHoverText(IProtectedRegion region, IFlag flag)
    • truncateMsg

      public static net.minecraft.network.chat.MutableComponent truncateMsg(IFlag flag, int length)
    • truncateMsg

      public static net.minecraft.network.chat.MutableComponent truncateMsg(IFlag flag)
    • buildFlagMessageComponent

      public static net.minecraft.network.chat.MutableComponent buildFlagMessageComponent(IProtectedRegion region, IFlag flag)
      Message: [set] [x]: 'msg'
    • buildRemoveRegionEntries

      public static List<net.minecraft.network.chat.Component> buildRemoveRegionEntries(IProtectedRegion parent, List<IProtectedRegion> regions)
    • buildRemoveRegionEntry

      public static net.minecraft.network.chat.MutableComponent buildRemoveRegionEntry(IProtectedRegion parent, IProtectedRegion region)
    • buildInfoComponent

      public static net.minecraft.network.chat.MutableComponent buildInfoComponent(String subjectLangKey, String fallback, net.minecraft.network.chat.MutableComponent payload)
    • buildInfoComponent

      public static net.minecraft.network.chat.MutableComponent buildInfoComponent(net.minecraft.network.chat.MutableComponent subject, net.minecraft.network.chat.MutableComponent info, net.minecraft.network.chat.MutableComponent actions)
    • buildInfoComponent

      public static net.minecraft.network.chat.MutableComponent buildInfoComponent(net.minecraft.network.chat.MutableComponent subject, net.minecraft.network.chat.MutableComponent content)
    • buildExecuteCommandString

      public static String buildExecuteCommandString(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dim, String command)
    • buildTeleportCmd

      public static String buildTeleportCmd(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dim, String tpSource, net.minecraft.core.BlockPos target)
    • buildRemoveGroupMemberEntries

      public static List<net.minecraft.network.chat.Component> buildRemoveGroupMemberEntries(IProtectedRegion region, List<String> names, GroupType groupType, String group)
      Parameters:
      region - the region to build the link for
      names - the names of the players or teams of the group
      groupType - the type of the group (player or team)
      group - the name of the group
      Returns:
      a list of links to remove the group from the region
    • buildRemoveGroupEntry

      public static net.minecraft.network.chat.MutableComponent buildRemoveGroupEntry(IProtectedRegion region, String name, GroupType groupType, String group)
    • buildGroupInfo

      public static net.minecraft.network.chat.MutableComponent buildGroupInfo(IProtectedRegion region, String groupMemberName, GroupType groupType)
    • getGroupList

      public static List<String> getGroupList(IProtectedRegion region, String group, GroupType groupType)
    • buildFlagInfoHeader

      public static net.minecraft.network.chat.MutableComponent buildFlagInfoHeader(IProtectedRegion region, IFlag flag)