Class ChatMenu


  • public class ChatMenu
    extends java.lang.Object
    A Utilities class for creating a FancyMessage Chat Menu
    • Constructor Detail

      • ChatMenu

        public ChatMenu()
        Instantiates a new Chat menu.
      • ChatMenu

        public ChatMenu​(org.bukkit.ChatColor lineColor)
      • ChatMenu

        public ChatMenu​(ChatMenu.HeightControl heightControl)
        Instantiates a new Chat menu.
        Parameters:
        heightControl - the height control
      • ChatMenu

        public ChatMenu​(java.lang.String title)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
      • ChatMenu

        public ChatMenu​(java.lang.String title,
                        ChatMenu.HeightControl heightControl)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        heightControl - the height control
      • ChatMenu

        public ChatMenu​(java.lang.String title,
                        org.bukkit.ChatColor lineColor)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        lineColor - the line color
      • ChatMenu

        public ChatMenu​(java.lang.String title,
                        org.bukkit.ChatColor lineColor,
                        ChatMenu.HeightControl heightControl)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        lineColor - the line color
        heightControl - the height control
      • ChatMenu

        public ChatMenu​(java.lang.String title,
                        org.bukkit.ChatColor lineColor,
                        int height)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        lineColor - the line color
        height - the height
      • ChatMenu

        public ChatMenu​(java.lang.String title,
                        org.bukkit.ChatColor lineColor,
                        int height,
                        ChatMenu.HeightControl heightControl)
      • ChatMenu

        public ChatMenu​(java.lang.String title,
                        java.lang.String footer,
                        org.bukkit.ChatColor lineColor)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        footer - the footer
        lineColor - the line color
      • ChatMenu

        public ChatMenu​(java.lang.String title,
                        java.lang.String footer,
                        org.bukkit.ChatColor lineColor,
                        ChatMenu.HeightControl heightControl)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        footer - the footer
        lineColor - the line color
        heightControl - the height control
      • ChatMenu

        public ChatMenu​(java.lang.String title,
                        FancyMessage footer,
                        org.bukkit.ChatColor lineColor)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        footer - the footer
        lineColor - the line color
      • ChatMenu

        public ChatMenu​(java.lang.String title,
                        FancyMessage footer,
                        org.bukkit.ChatColor lineColor,
                        ChatMenu.HeightControl heightControl)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        footer - the footer
        lineColor - the line color
        heightControl - the height control
      • ChatMenu

        public ChatMenu​(FancyMessage title,
                        java.lang.String footer,
                        org.bukkit.ChatColor lineColor)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        footer - the footer
        lineColor - the line color
      • ChatMenu

        public ChatMenu​(FancyMessage title,
                        java.lang.String footer,
                        org.bukkit.ChatColor lineColor,
                        ChatMenu.HeightControl heightControl)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        footer - the footer
        lineColor - the line color
        heightControl - the height control
      • ChatMenu

        public ChatMenu​(FancyMessage title)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
      • ChatMenu

        public ChatMenu​(FancyMessage title,
                        ChatMenu.HeightControl heightControl)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        heightControl - the height control
      • ChatMenu

        public ChatMenu​(FancyMessage title,
                        org.bukkit.ChatColor lineColor)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        lineColor - the line color
      • ChatMenu

        public ChatMenu​(FancyMessage title,
                        org.bukkit.ChatColor lineColor,
                        ChatMenu.HeightControl heightControl)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        lineColor - the line color
        heightControl - the height control
      • ChatMenu

        public ChatMenu​(FancyMessage title,
                        org.bukkit.ChatColor lineColor,
                        int height)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        lineColor - the line color
        height - the height
      • ChatMenu

        public ChatMenu​(FancyMessage title,
                        FancyMessage footer,
                        org.bukkit.ChatColor lineColor)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        footer - the footer
        lineColor - the line color
      • ChatMenu

        public ChatMenu​(FancyMessage title,
                        FancyMessage footer,
                        org.bukkit.ChatColor lineColor,
                        ChatMenu.HeightControl heightControl)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        footer - the footer
        lineColor - the line color
        heightControl - the height control
      • ChatMenu

        public ChatMenu​(java.lang.String title,
                        java.lang.String footer,
                        org.bukkit.ChatColor lineColor,
                        int height)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        footer - the footer
        lineColor - the line color
        height - the height
      • ChatMenu

        public ChatMenu​(java.lang.String title,
                        java.lang.String footer,
                        org.bukkit.ChatColor lineColor,
                        int height,
                        ChatMenu.HeightControl heightControl)
      • ChatMenu

        public ChatMenu​(java.lang.String title,
                        FancyMessage footer,
                        org.bukkit.ChatColor lineColor,
                        int height)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        footer - the footer
        lineColor - the line color
        height - the height
      • ChatMenu

        public ChatMenu​(FancyMessage title,
                        java.lang.String footer,
                        org.bukkit.ChatColor lineColor,
                        int height)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        footer - the footer
        lineColor - the line color
        height - the height
      • ChatMenu

        public ChatMenu​(FancyMessage title,
                        FancyMessage footer,
                        org.bukkit.ChatColor lineColor,
                        int height)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        footer - the footer
        lineColor - the line color
        height - the height
      • ChatMenu

        public ChatMenu​(FancyMessage title,
                        FancyMessage footer,
                        org.bukkit.ChatColor lineColor,
                        int height,
                        ChatMenu.HeightControl heightControl)
        Instantiates a new Chat menu.
        Parameters:
        title - the title
        footer - the footer
        lineColor - the line color
        height - the height
        heightControl - the heightcontroller
    • Method Detail

      • getLines

        public java.util.ArrayList<java.util.ArrayList<FancyMessage>> getLines()
        Gets lines.
        Returns:
        the lines
      • getLines

        public java.util.ArrayList<FancyMessage> getLines​(int page)
        Gets lines.
        Parameters:
        page - the page
        Returns:
        the lines
      • clear

        public void clear()
      • getFormattedTitle

        public FancyMessage getFormattedTitle()
        Gets formatted title.
        Returns:
        the formatted title
      • getFormattedFooter

        public FancyMessage getFormattedFooter()
        Gets formatted footer.
        Returns:
        the formatted footer
      • getFormatted

        public FancyMessage getFormatted​(FancyMessage fancyMessage)
        Gets formatted.
        Parameters:
        fancyMessage - the fancy message
        Returns:
        the formatted
      • getTitle

        public FancyMessage getTitle()
        Gets title.
        Returns:
        the title
      • setTitle

        public void setTitle​(java.lang.String title)
      • getFooter

        public FancyMessage getFooter()
        Gets footer.
        Returns:
        the footer
      • setFooter

        public void setFooter​(FancyMessage footer)
      • setFooter

        public void setFooter​(java.lang.String footer)
      • getLineColor

        public org.bukkit.ChatColor getLineColor()
        Gets line color.
        Returns:
        the line color
      • setLineColor

        public void setLineColor​(org.bukkit.ChatColor lineColor)
      • getMaxHeight

        public int getMaxHeight()
      • addLine

        public ChatMenu addLine​(java.lang.String message)
        Add line chat menu.
        Parameters:
        message - the message
        Returns:
        the chat menu
      • addLine

        public ChatMenu addLine​(FancyMessage message)
        Add line chat menu.
        Parameters:
        message - the message
        Returns:
        the chat menu
      • addLine

        public ChatMenu addLine​(int page,
                                java.lang.String message)
        Add line chat menu.
        Parameters:
        page - the page
        message - the message
        Returns:
        the chat menu
      • addLine

        public ChatMenu addLine​(int page,
                                FancyMessage message)
        Add line chat menu.
        Parameters:
        page - the page
        message - the message
        Returns:
        the chat menu
      • setLine

        public ChatMenu setLine​(int line,
                                java.lang.String message)
        Sets line.
        Parameters:
        line - the line
        message - the message
        Returns:
        the line
      • setLine

        public ChatMenu setLine​(int page,
                                int line,
                                java.lang.String message,
                                FancyClickEvent fancyClickEvent)
      • setLine

        public ChatMenu setLine​(int page,
                                int line,
                                java.lang.String message)
        Sets line.
        Parameters:
        page - the page
        line - the line
        message - the message
        Returns:
        the line
      • setLine

        public ChatMenu setLine​(int line,
                                FancyMessage message)
        Sets line.
        Parameters:
        line - the line
        message - the message
        Returns:
        the line
      • setLine

        public ChatMenu setLine​(int page,
                                int line,
                                FancyMessage message)
        Sets line.
        Parameters:
        page - the page
        line - the line
        message - the message
        Returns:
        the line
      • nextPage

        public ChatMenu nextPage()
        Next page chat menu.
        Returns:
        the chat menu
      • addBlankLine

        public ChatMenu addBlankLine()
        Add blank line chat menu.
        Returns:
        the chat menu
      • addBlankLine

        public ChatMenu addBlankLine​(int page)
        Add blank line chat menu.
        Parameters:
        page - the page
        Returns:
        the chat menu
      • show

        public void show​(org.bukkit.entity.Player player)
        Show.
        Parameters:
        player - the player
      • show

        public void show​(int page,
                         org.bukkit.entity.Player player)
        Show.
        Parameters:
        page - the page
        player - the player
      • toBottom

        public ChatMenu toBottom​(int space)
        To bottom chat menu.
        Parameters:
        space - the space
        Returns:
        the chat menu
      • isSpacedFormat

        public boolean isSpacedFormat()
      • setSpacedFormat

        public ChatMenu setSpacedFormat​(boolean spacedFormat)