Class ResponsibleFlagPagination
java.lang.Object
de.z0rdak.yawp.util.text.messages.pagination.BasePaginationMessage<FlagCorrelation>
de.z0rdak.yawp.util.text.messages.pagination.ResponsibleFlagPagination
- All Implemented Interfaces:
MultiLineMessage<List<FlagCorrelation>>,PaginationMessage<FlagCorrelation>
-
Field Summary
Fields inherited from class de.z0rdak.yawp.util.text.messages.pagination.BasePaginationMessage
control, FIRST_PAGE_IDX, pageContent, paginationLines -
Constructor Summary
ConstructorsConstructorDescriptionResponsibleFlagPagination(IProtectedRegion region, int pageNumber, int pageSize) -
Method Summary
Modifier and TypeMethodDescriptionList<net.minecraft.network.chat.Component>static List<net.minecraft.network.chat.MutableComponent>buildFlagEntries(IProtectedRegion region) Show flags for region, with a color of their state But also show parent flags in italic How do we want to handle flags defined in the region but also in the parent? If the child flag is dominant, we display the child flag, and add a hint to the parent If the flag is overriden, we format them with strikethrough and add a link to the parent which overrides itstatic List<net.minecraft.network.chat.Component>buildFlagEntries(List<FlagCorrelation> flags) static List<net.minecraft.network.chat.MutableComponent>buildFlagEntries(Map<FlagState, List<FlagCorrelation>> flagStateListMap, FlagState state) static List<net.minecraft.network.chat.MutableComponent>buildFlagEntriesForState(IProtectedRegion region, List<IFlag> selectedFlags, FlagState state) static List<net.minecraft.network.chat.Component>static List<net.minecraft.network.chat.Component>buildRegionFlagEntries(IProtectedRegion region, List<IFlag> selectedFlags) static net.minecraft.network.chat.MutableComponentbuildRegionFlagInfoHeader(IProtectedRegion region, net.minecraft.network.chat.MutableComponent flagListLink) static net.minecraft.network.chat.MutableComponentbuildRemoveFlagEntry(IProtectedRegion region, IFlag flag, net.minecraft.ChatFormatting flagLinkColor, net.minecraft.ChatFormatting... ChatFormattings) Creates a TextComponent for flag removal, followed by the flag infosstatic net.minecraft.ChatFormattingcolorForState(FlagState state) net.minecraft.network.chat.Componentstatic List<FlagCorrelation>getCorrelations(IProtectedRegion region) net.minecraft.network.chat.Componentheader()net.minecraft.network.chat.ComponentsortFlagsByState(IProtectedRegion region) static Map<FlagState,List<FlagCorrelation>> sortFlagsByState(Map<String, FlagCorrelation> flagMap) Methods inherited from class de.z0rdak.yawp.util.text.messages.pagination.BasePaginationMessage
getContent, getLines, padEmptyEntriesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.z0rdak.yawp.util.text.messages.multiline.MultiLineMessage
to
-
Constructor Details
-
ResponsibleFlagPagination
public ResponsibleFlagPagination(IProtectedRegion region, int pageNumber, int pageSize) throws InvalidPageNumberException - Throws:
InvalidPageNumberException
-
-
Method Details
-
buildRegionFlagInfoHeader
public static net.minecraft.network.chat.MutableComponent buildRegionFlagInfoHeader(IProtectedRegion region, net.minecraft.network.chat.MutableComponent flagListLink) -
buildRegionFlagEntries
public static List<net.minecraft.network.chat.Component> buildRegionFlagEntries(IProtectedRegion region) -
buildRegionFlagEntries
public static List<net.minecraft.network.chat.Component> buildRegionFlagEntries(IProtectedRegion region, List<IFlag> selectedFlags) -
buildFlagEntriesForState
public static List<net.minecraft.network.chat.MutableComponent> buildFlagEntriesForState(IProtectedRegion region, List<IFlag> selectedFlags, FlagState state) -
buildRemoveFlagEntry
public static net.minecraft.network.chat.MutableComponent buildRemoveFlagEntry(IProtectedRegion region, IFlag flag, net.minecraft.ChatFormatting flagLinkColor, net.minecraft.ChatFormatting... ChatFormattings) Creates a TextComponent for flag removal, followed by the flag infos -
colorForState
-
buildFlagEntries
public static List<net.minecraft.network.chat.MutableComponent> buildFlagEntries(IProtectedRegion region) Show flags for region, with a color of their state But also show parent flags in italic How do we want to handle flags defined in the region but also in the parent? If the child flag is dominant, we display the child flag, and add a hint to the parent If the flag is overriden, we format them with strikethrough and add a link to the parent which overrides it -
buildFlagEntries
public static List<net.minecraft.network.chat.Component> buildFlagEntries(List<FlagCorrelation> flags) -
buildFlagEntries
-
sortFlagsByState
-
sortFlagsByState
public static Map<FlagState,List<FlagCorrelation>> sortFlagsByState(Map<String, FlagCorrelation> flagMap) -
getCorrelations
-
noContentMsg
public net.minecraft.network.chat.Component noContentMsg()- Specified by:
noContentMsgin classBasePaginationMessage<FlagCorrelation>
-
header
public net.minecraft.network.chat.Component header()- Specified by:
headerin classBasePaginationMessage<FlagCorrelation>
-
buildEntries
- Specified by:
buildEntriesin classBasePaginationMessage<FlagCorrelation>
-
emptyEntry
public net.minecraft.network.chat.Component emptyEntry()- Specified by:
emptyEntryin classBasePaginationMessage<FlagCorrelation>
-