Package de.z0rdak.yawp.util
Class ChatComponentBuilder
java.lang.Object
de.z0rdak.yawp.util.ChatComponentBuilder
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringbuildBlockPosLinkText(net.minecraft.core.BlockPos target) static net.minecraft.network.chat.MutableComponentbuildExecuteCmdComponent(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) static net.minecraft.network.chat.MutableComponentbuildExecuteCmdLink(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) static net.minecraft.network.chat.MutableComponentbuildExecuteCmdLinkWithBrackets(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) static StringbuildExecuteCommandString(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dim, String command) static net.minecraft.network.chat.MutableComponentbuildFlagInfoHeader(IProtectedRegion region, IFlag flag) static net.minecraft.network.chat.MutableComponentbuildFlagMessageComponent(IProtectedRegion region, IFlag flag) Message: [set] [x]: 'msg'static net.minecraft.network.chat.MutableComponentbuildFlagMessageHoverText(IProtectedRegion region, IFlag flag) static net.minecraft.network.chat.MutableComponentbuildFlagStateComponent(IProtectedRegion region, IFlag flag) static net.minecraft.network.chat.MutableComponentbuildGroupInfo(IProtectedRegion region, String groupMemberName, GroupType groupType) static net.minecraft.network.chat.MutableComponentbuildGroupListHeader(IProtectedRegion region, String group) static net.minecraft.network.chat.MutableComponentbuildGroupTypeHeader(IProtectedRegion region, String group, GroupType groupType) static net.minecraft.network.chat.MutableComponentbuildHeader(net.minecraft.network.chat.MutableComponent header) static net.minecraft.network.chat.MutableComponentstatic net.minecraft.network.chat.MutableComponentbuildInfoComponent(String subjectLangKey, String fallback, net.minecraft.network.chat.MutableComponent payload) static net.minecraft.network.chat.MutableComponentbuildInfoComponent(net.minecraft.network.chat.MutableComponent subject, net.minecraft.network.chat.MutableComponent content) static net.minecraft.network.chat.MutableComponentbuildInfoComponent(net.minecraft.network.chat.MutableComponent subject, net.minecraft.network.chat.MutableComponent info, net.minecraft.network.chat.MutableComponent actions) static net.minecraft.network.chat.MutableComponentbuildPlayerHoverComponent(net.minecraft.world.entity.player.Player player) static net.minecraft.network.chat.MutableComponentstatic net.minecraft.network.chat.MutableComponentbuildRemoveGroupEntry(IProtectedRegion region, String name, GroupType groupType, String group) static List<net.minecraft.network.chat.Component>buildRemoveGroupMemberEntries(IProtectedRegion region, List<String> names, GroupType groupType, String group) static List<net.minecraft.network.chat.Component>buildRemoveRegionEntries(IProtectedRegion parent, List<IProtectedRegion> regions) static net.minecraft.network.chat.MutableComponentbuildRemoveRegionEntry(IProtectedRegion parent, IProtectedRegion region) static net.minecraft.network.chat.MutableComponentbuildTeamHoverComponent(net.minecraft.world.scores.Team team) static StringbuildTeleportCmd(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dim, String tpSource, net.minecraft.core.BlockPos target) static net.minecraft.network.chat.MutableComponentbuildTextWithHoverAndBracketsMsg(net.minecraft.network.chat.MutableComponent text, net.minecraft.network.chat.MutableComponent hoverText, net.minecraft.ChatFormatting color) static net.minecraft.network.chat.MutableComponentbuildTextWithHoverMsg(net.minecraft.network.chat.MutableComponent text, net.minecraft.network.chat.MutableComponent hoverText, net.minecraft.ChatFormatting color) static net.minecraft.network.chat.MutableComponentbuildTextWithWhiteBracketsAndHover(net.minecraft.network.chat.MutableComponent text, net.minecraft.network.chat.MutableComponent hoverText, net.minecraft.ChatFormatting color) static StringcommandBlockPosStr(net.minecraft.core.BlockPos target) Builds a string from the given block pos which can be used in commandsgetGroupList(IProtectedRegion region, String group, GroupType groupType) getGroupsForRegion(IProtectedRegion region) static intgetGroupSize(IProtectedRegion region, String groupName) static StringshortBlockPos(net.minecraft.core.BlockPos target) static StringshortBlockPosBracketed(net.minecraft.core.BlockPos target) static StringtinyBlockPos(net.minecraft.core.BlockPos target) static net.minecraft.network.chat.MutableComponenttruncateMsg(IFlag flag) static net.minecraft.network.chat.MutableComponenttruncateMsg(IFlag flag, int length)
-
Method Details
-
commandBlockPosStr
Builds a string from the given block pos which can be used in commands -
shortBlockPosBracketed
-
shortBlockPos
-
tinyBlockPos
-
buildBlockPosLinkText
-
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) -
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
-
getGroupSize
-
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
-
truncateMsg
-
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
-
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
-
buildTeleportCmd
-
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 fornames- the names of the players or teams of the groupgroupType- 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
-
buildFlagInfoHeader
public static net.minecraft.network.chat.MutableComponent buildFlagInfoHeader(IProtectedRegion region, IFlag flag)
-