From 0f196f59c6a4cb76ab8409da62ff1f35505f94a8 Mon Sep 17 00:00:00 2001 From: Dico Karssiens Date: Sun, 11 Nov 2018 14:06:45 +0000 Subject: Changes I made before breaking my local repository. Hoping this works. --- .../chat/help/defaults/DefaultPageLayout.java | 80 +++++++++++----------- 1 file changed, 40 insertions(+), 40 deletions(-) (limited to 'dicore3/command/src/main/java/io/dico/dicore/command/chat/help/defaults/DefaultPageLayout.java') diff --git a/dicore3/command/src/main/java/io/dico/dicore/command/chat/help/defaults/DefaultPageLayout.java b/dicore3/command/src/main/java/io/dico/dicore/command/chat/help/defaults/DefaultPageLayout.java index 8d3d004..d950b09 100644 --- a/dicore3/command/src/main/java/io/dico/dicore/command/chat/help/defaults/DefaultPageLayout.java +++ b/dicore3/command/src/main/java/io/dico/dicore/command/chat/help/defaults/DefaultPageLayout.java @@ -1,40 +1,40 @@ -package io.dico.dicore.command.chat.help.defaults; - -import io.dico.dicore.command.EMessageType; -import io.dico.dicore.command.ExecutionContext; -import io.dico.dicore.command.ICommandAddress; -import io.dico.dicore.command.ModifiableCommandAddress; -import io.dico.dicore.Formatting; -import io.dico.dicore.command.chat.IChatHandler; -import io.dico.dicore.command.chat.help.IPageBorder; -import io.dico.dicore.command.chat.help.IPageLayout; -import io.dico.dicore.command.chat.help.PageBorders; -import org.bukkit.permissions.Permissible; - -public class DefaultPageLayout implements IPageLayout { - - @Override - public PageBorders getPageBorders(ICommandAddress target, Permissible viewer, ExecutionContext context, int pageNum) { - IChatHandler c = context.getAddress().getChatHandler(); - String prefix = c.getMessagePrefixForType(EMessageType.INFORMATIVE); - Formatting informative = c.getChatFormatForType(EMessageType.INFORMATIVE); - Formatting number = c.getChatFormatForType(EMessageType.NEUTRAL); - - String nextPageCommand; - ICommandAddress executor = context.getAddress(); - if (((ModifiableCommandAddress) executor).hasHelpCommand()) { - nextPageCommand = ((ModifiableCommandAddress) executor).getHelpCommand().getAddress() + ' ' + (pageNum + 1); - } else { - nextPageCommand = executor.getAddress() + ' ' + (pageNum + 1); - } - - String header = prefix + informative + "Help page " + number + pageNum + informative + - '/' + number + "%pageCount%" + informative + " for /" + target.getAddress(); - String footer = informative + "Type /" + nextPageCommand + " for the next page"; - - IPageBorder headerBorder = PageBorders.simpleBorder("", header); - IPageBorder footerBorder = PageBorders.disappearingBorder(pageNum, footer); - return new PageBorders(headerBorder, footerBorder); - } - -} +package io.dico.dicore.command.chat.help.defaults; + +import io.dico.dicore.command.EMessageType; +import io.dico.dicore.command.ExecutionContext; +import io.dico.dicore.command.ICommandAddress; +import io.dico.dicore.command.ModifiableCommandAddress; +import io.dico.dicore.Formatting; +import io.dico.dicore.command.chat.IChatHandler; +import io.dico.dicore.command.chat.help.IPageBorder; +import io.dico.dicore.command.chat.help.IPageLayout; +import io.dico.dicore.command.chat.help.PageBorders; +import org.bukkit.permissions.Permissible; + +public class DefaultPageLayout implements IPageLayout { + + @Override + public PageBorders getPageBorders(ICommandAddress target, Permissible viewer, ExecutionContext context, int pageNum) { + IChatHandler c = context.getAddress().getChatHandler(); + String prefix = c.getMessagePrefixForType(EMessageType.INFORMATIVE); + Formatting informative = c.getChatFormatForType(EMessageType.INFORMATIVE); + Formatting number = c.getChatFormatForType(EMessageType.NEUTRAL); + + String nextPageCommand; + ICommandAddress executor = context.getAddress(); + if (((ModifiableCommandAddress) executor).hasHelpCommand()) { + nextPageCommand = ((ModifiableCommandAddress) executor).getHelpCommand().getAddress() + ' ' + (pageNum + 1); + } else { + nextPageCommand = executor.getAddress() + ' ' + (pageNum + 1); + } + + String header = prefix + informative + "Help page " + number + pageNum + informative + + '/' + number + "%pageCount%" + informative + " for /" + target.getAddress(); + String footer = informative + "Type /" + nextPageCommand + " for the next page"; + + IPageBorder headerBorder = PageBorders.simpleBorder("", header); + IPageBorder footerBorder = PageBorders.disappearingBorder(pageNum, footer); + return new PageBorders(headerBorder, footerBorder); + } + +} -- cgit v1.2.3