Package me.bimmr.bimmcore.gui.chat
Class ChatMenu
- java.lang.Object
-
- me.bimmr.bimmcore.gui.chat.ChatMenu
-
public class ChatMenu extends java.lang.Object
A Utilities class for creating a FancyMessage Chat Menu
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ChatMenu.HeightControl
The enum Height control.
-
Constructor Summary
Constructors Constructor Description ChatMenu()
Instantiates a new Chat menu.ChatMenu(java.lang.String title)
Instantiates a new Chat menu.ChatMenu(java.lang.String title, java.lang.String footer, org.bukkit.ChatColor lineColor)
Instantiates a new Chat menu.ChatMenu(java.lang.String title, java.lang.String footer, org.bukkit.ChatColor lineColor, int height)
Instantiates a new Chat menu.ChatMenu(java.lang.String title, java.lang.String footer, org.bukkit.ChatColor lineColor, int height, ChatMenu.HeightControl heightControl)
ChatMenu(java.lang.String title, java.lang.String footer, org.bukkit.ChatColor lineColor, ChatMenu.HeightControl heightControl)
Instantiates a new Chat menu.ChatMenu(java.lang.String title, ChatMenu.HeightControl heightControl)
Instantiates a new Chat menu.ChatMenu(java.lang.String title, FancyMessage footer, org.bukkit.ChatColor lineColor)
Instantiates a new Chat menu.ChatMenu(java.lang.String title, FancyMessage footer, org.bukkit.ChatColor lineColor, int height)
Instantiates a new Chat menu.ChatMenu(java.lang.String title, FancyMessage footer, org.bukkit.ChatColor lineColor, int height, ChatMenu.HeightControl heightControl)
ChatMenu(java.lang.String title, FancyMessage footer, org.bukkit.ChatColor lineColor, ChatMenu.HeightControl heightControl)
Instantiates a new Chat menu.ChatMenu(java.lang.String title, org.bukkit.ChatColor lineColor)
Instantiates a new Chat menu.ChatMenu(java.lang.String title, org.bukkit.ChatColor lineColor, int height)
Instantiates a new Chat menu.ChatMenu(java.lang.String title, org.bukkit.ChatColor lineColor, int height, ChatMenu.HeightControl heightControl)
ChatMenu(java.lang.String title, org.bukkit.ChatColor lineColor, ChatMenu.HeightControl heightControl)
Instantiates a new Chat menu.ChatMenu(ChatMenu.HeightControl heightControl)
Instantiates a new Chat menu.ChatMenu(FancyMessage title)
Instantiates a new Chat menu.ChatMenu(FancyMessage title, java.lang.String footer, org.bukkit.ChatColor lineColor)
Instantiates a new Chat menu.ChatMenu(FancyMessage title, java.lang.String footer, org.bukkit.ChatColor lineColor, int height)
Instantiates a new Chat menu.ChatMenu(FancyMessage title, java.lang.String footer, org.bukkit.ChatColor lineColor, int height, ChatMenu.HeightControl heightControl)
ChatMenu(FancyMessage title, java.lang.String footer, org.bukkit.ChatColor lineColor, ChatMenu.HeightControl heightControl)
Instantiates a new Chat menu.ChatMenu(FancyMessage title, ChatMenu.HeightControl heightControl)
Instantiates a new Chat menu.ChatMenu(FancyMessage title, FancyMessage footer, org.bukkit.ChatColor lineColor)
Instantiates a new Chat menu.ChatMenu(FancyMessage title, FancyMessage footer, org.bukkit.ChatColor lineColor, int height)
Instantiates a new Chat menu.ChatMenu(FancyMessage title, FancyMessage footer, org.bukkit.ChatColor lineColor, int height, ChatMenu.HeightControl heightControl)
Instantiates a new Chat menu.ChatMenu(FancyMessage title, FancyMessage footer, org.bukkit.ChatColor lineColor, ChatMenu.HeightControl heightControl)
Instantiates a new Chat menu.ChatMenu(FancyMessage title, org.bukkit.ChatColor lineColor)
Instantiates a new Chat menu.ChatMenu(FancyMessage title, org.bukkit.ChatColor lineColor, int height)
Instantiates a new Chat menu.ChatMenu(FancyMessage title, org.bukkit.ChatColor lineColor, int height, ChatMenu.HeightControl heightControl)
ChatMenu(FancyMessage title, org.bukkit.ChatColor lineColor, ChatMenu.HeightControl heightControl)
Instantiates a new Chat menu.ChatMenu(org.bukkit.ChatColor lineColor)
-
Method Summary
Modifier and Type Method Description ChatMenu
addBlankLine()
Add blank line chat menu.ChatMenu
addBlankLine(int page)
Add blank line chat menu.ChatMenu
addLine(int page, java.lang.String message)
Add line chat menu.ChatMenu
addLine(int page, java.lang.String message, FancyClickEvent fancyClickEvent)
ChatMenu
addLine(int page, FancyMessage message)
Add line chat menu.ChatMenu
addLine(java.lang.String message)
Add line chat menu.ChatMenu
addLine(java.lang.String message, FancyClickEvent fancyClickEvent)
ChatMenu
addLine(FancyMessage message)
Add line chat menu.void
clear()
FancyMessage
getFooter()
Gets footer.FancyMessage
getFormatted(FancyMessage fancyMessage)
Gets formatted.FancyMessage
getFormattedFooter()
Gets formatted footer.FancyMessage
getFormattedTitle()
Gets formatted title.ChatMenu.HeightControl
getHeightControl()
org.bukkit.ChatColor
getLineColor()
Gets line color.java.util.ArrayList<java.util.ArrayList<FancyMessage>>
getLines()
Gets lines.java.util.ArrayList<FancyMessage>
getLines(int page)
Gets lines.int
getMaxHeight()
FancyMessage
getTitle()
Gets title.boolean
isSpacedFormat()
ChatMenu
nextPage()
Next page chat menu.void
setFooter(java.lang.String footer)
void
setFooter(FancyMessage footer)
ChatMenu
setLine(int page, int line, java.lang.String message)
Sets line.ChatMenu
setLine(int page, int line, java.lang.String message, FancyClickEvent fancyClickEvent)
ChatMenu
setLine(int page, int line, FancyMessage message)
Sets line.ChatMenu
setLine(int line, java.lang.String message)
Sets line.ChatMenu
setLine(int line, java.lang.String message, FancyClickEvent fancyClickEvent)
ChatMenu
setLine(int line, FancyMessage message)
Sets line.void
setLineColor(org.bukkit.ChatColor lineColor)
ChatMenu
setSpacedFormat(boolean spacedFormat)
void
setTitle(java.lang.String title)
void
setTitle(FancyMessage title)
void
show(int page, org.bukkit.entity.Player player)
Show.void
show(org.bukkit.entity.Player player)
Show.ChatMenu
toBottom(int space)
To bottom 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 titleheightControl
- the height control
-
ChatMenu
public ChatMenu(java.lang.String title, org.bukkit.ChatColor lineColor)
Instantiates a new Chat menu.- Parameters:
title
- the titlelineColor
- 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 titlelineColor
- the line colorheightControl
- the height control
-
ChatMenu
public ChatMenu(java.lang.String title, org.bukkit.ChatColor lineColor, int height)
Instantiates a new Chat menu.- Parameters:
title
- the titlelineColor
- the line colorheight
- 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 titlefooter
- the footerlineColor
- 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 titlefooter
- the footerlineColor
- the line colorheightControl
- the height control
-
ChatMenu
public ChatMenu(java.lang.String title, FancyMessage footer, org.bukkit.ChatColor lineColor)
Instantiates a new Chat menu.- Parameters:
title
- the titlefooter
- the footerlineColor
- 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 titlefooter
- the footerlineColor
- the line colorheightControl
- the height control
-
ChatMenu
public ChatMenu(FancyMessage title, java.lang.String footer, org.bukkit.ChatColor lineColor)
Instantiates a new Chat menu.- Parameters:
title
- the titlefooter
- the footerlineColor
- 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 titlefooter
- the footerlineColor
- the line colorheightControl
- 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 titleheightControl
- the height control
-
ChatMenu
public ChatMenu(FancyMessage title, org.bukkit.ChatColor lineColor)
Instantiates a new Chat menu.- Parameters:
title
- the titlelineColor
- the line color
-
ChatMenu
public ChatMenu(FancyMessage title, org.bukkit.ChatColor lineColor, ChatMenu.HeightControl heightControl)
Instantiates a new Chat menu.- Parameters:
title
- the titlelineColor
- the line colorheightControl
- the height control
-
ChatMenu
public ChatMenu(FancyMessage title, org.bukkit.ChatColor lineColor, int height)
Instantiates a new Chat menu.- Parameters:
title
- the titlelineColor
- the line colorheight
- the height
-
ChatMenu
public ChatMenu(FancyMessage title, org.bukkit.ChatColor lineColor, int height, ChatMenu.HeightControl heightControl)
-
ChatMenu
public ChatMenu(FancyMessage title, FancyMessage footer, org.bukkit.ChatColor lineColor)
Instantiates a new Chat menu.- Parameters:
title
- the titlefooter
- the footerlineColor
- 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 titlefooter
- the footerlineColor
- the line colorheightControl
- 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 titlefooter
- the footerlineColor
- the line colorheight
- 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 titlefooter
- the footerlineColor
- the line colorheight
- the height
-
ChatMenu
public ChatMenu(java.lang.String title, FancyMessage footer, org.bukkit.ChatColor lineColor, int height, ChatMenu.HeightControl heightControl)
-
ChatMenu
public ChatMenu(FancyMessage title, java.lang.String footer, org.bukkit.ChatColor lineColor, int height)
Instantiates a new Chat menu.- Parameters:
title
- the titlefooter
- the footerlineColor
- the line colorheight
- the height
-
ChatMenu
public ChatMenu(FancyMessage title, java.lang.String footer, org.bukkit.ChatColor lineColor, int height, ChatMenu.HeightControl heightControl)
-
ChatMenu
public ChatMenu(FancyMessage title, FancyMessage footer, org.bukkit.ChatColor lineColor, int height)
Instantiates a new Chat menu.- Parameters:
title
- the titlefooter
- the footerlineColor
- the line colorheight
- 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 titlefooter
- the footerlineColor
- the line colorheight
- the heightheightControl
- 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(FancyMessage 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(int page, java.lang.String message, FancyClickEvent fancyClickEvent)
-
addLine
public ChatMenu addLine(java.lang.String message, FancyClickEvent fancyClickEvent)
-
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 pagemessage
- the message- Returns:
- the chat menu
-
addLine
public ChatMenu addLine(int page, FancyMessage message)
Add line chat menu.- Parameters:
page
- the pagemessage
- the message- Returns:
- the chat menu
-
setLine
public ChatMenu setLine(int line, java.lang.String message)
Sets line.- Parameters:
line
- the linemessage
- the message- Returns:
- the line
-
setLine
public ChatMenu setLine(int page, int line, java.lang.String message, FancyClickEvent fancyClickEvent)
-
setLine
public ChatMenu setLine(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 pageline
- the linemessage
- the message- Returns:
- the line
-
setLine
public ChatMenu setLine(int line, FancyMessage message)
Sets line.- Parameters:
line
- the linemessage
- the message- Returns:
- the line
-
setLine
public ChatMenu setLine(int page, int line, FancyMessage message)
Sets line.- Parameters:
page
- the pageline
- the linemessage
- 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
-
getHeightControl
public ChatMenu.HeightControl getHeightControl()
-
show
public void show(int page, org.bukkit.entity.Player player)
Show.- Parameters:
page
- the pageplayer
- 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)
-
-