public class AdvancementDisplay
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static class |
AdvancementDisplay.AdvancementFrame |
Modifier and Type | Field | Description |
---|---|---|
java.lang.String |
visibilityIdentifier |
Constructor | Description |
---|---|
AdvancementDisplay(org.bukkit.inventory.ItemStack icon,
JSONMessage title,
JSONMessage description,
AdvancementDisplay.AdvancementFrame frame,
boolean showToast,
boolean announceChat,
AdvancementVisibility visibility) |
|
AdvancementDisplay(org.bukkit.inventory.ItemStack icon,
JSONMessage title,
JSONMessage description,
AdvancementDisplay.AdvancementFrame frame,
java.lang.String backgroundTexture,
boolean showToast,
boolean announceChat,
AdvancementVisibility visibility) |
|
AdvancementDisplay(org.bukkit.inventory.ItemStack icon,
java.lang.String title,
java.lang.String description,
AdvancementDisplay.AdvancementFrame frame,
boolean showToast,
boolean announceChat,
AdvancementVisibility visibility) |
|
AdvancementDisplay(org.bukkit.inventory.ItemStack icon,
java.lang.String title,
java.lang.String description,
AdvancementDisplay.AdvancementFrame frame,
java.lang.String backgroundTexture,
boolean showToast,
boolean announceChat,
AdvancementVisibility visibility) |
|
AdvancementDisplay(org.bukkit.Material icon,
JSONMessage title,
JSONMessage description,
AdvancementDisplay.AdvancementFrame frame,
boolean showToast,
boolean announceChat,
AdvancementVisibility visibility) |
|
AdvancementDisplay(org.bukkit.Material icon,
JSONMessage title,
JSONMessage description,
AdvancementDisplay.AdvancementFrame frame,
java.lang.String backgroundTexture,
boolean showToast,
boolean announceChat,
AdvancementVisibility visibility) |
|
AdvancementDisplay(org.bukkit.Material icon,
java.lang.String title,
java.lang.String description,
AdvancementDisplay.AdvancementFrame frame,
boolean showToast,
boolean announceChat,
AdvancementVisibility visibility) |
|
AdvancementDisplay(org.bukkit.Material icon,
java.lang.String title,
java.lang.String description,
AdvancementDisplay.AdvancementFrame frame,
java.lang.String backgroundTexture,
boolean showToast,
boolean announceChat,
AdvancementVisibility visibility) |
Modifier and Type | Method | Description |
---|---|---|
float |
generateX() |
Gets the absolute x coordinate
|
float |
generateY() |
Gets the absolute y coordinate
|
java.lang.String |
getBackgroundTexture() |
|
JSONMessage |
getDescription() |
|
AdvancementDisplay.AdvancementFrame |
getFrame() |
|
org.bukkit.inventory.ItemStack |
getIcon() |
|
Advancement |
getPositionOrigin() |
|
float |
getTabHeight() |
|
float |
getTabWidth() |
|
JSONMessage |
getTitle() |
|
AdvancementVisibility |
getVisibility() |
Gets the
AdvancementVisibility |
float |
getX() |
Gets the relative X coordinate
|
float |
getY() |
Gets the relative y coordinate
|
boolean |
isAnnouncedToChat() |
|
boolean |
isToastShown() |
|
boolean |
isVisible(org.bukkit.entity.Player player,
Advancement advancement) |
|
void |
setAnnounceChat(boolean announceChat) |
Changes if chat messages should be displayed
|
void |
setBackgroundTexture(java.lang.String backgroundTexture) |
Sets the background texture
|
void |
setCoordinates(float x,
float y) |
Changes the relative coordinates
|
void |
setDescription(JSONMessage description) |
Changes the Description
|
void |
setDescription(java.lang.String description) |
Changes the Description
|
void |
setFrame(AdvancementDisplay.AdvancementFrame frame) |
Changes the Frame
|
void |
setIcon(org.bukkit.inventory.ItemStack icon) |
Changes the Icon
|
void |
setIcon(org.bukkit.Material icon) |
Changes the Icon
|
void |
setPositionOrigin(Advancement positionOrigin) |
Changes the advancement that marks the origin of the coordinates
|
void |
setShowToast(boolean showToast) |
Changes if toasts should be shown
|
void |
setTabHeight(float tabHeight) |
|
void |
setTabWidth(float tabWidth) |
|
void |
setTitle(JSONMessage title) |
Changes the Title
|
void |
setTitle(java.lang.String title) |
Changes the Title
|
void |
setVisibility(AdvancementVisibility visibility) |
Changes the visibility
|
void |
setX(float x) |
Changes the relative x coordinate
|
void |
setY(float y) |
Changes the relative y coordinate
|
@SerializedName("visibility") public java.lang.String visibilityIdentifier
public AdvancementDisplay(org.bukkit.Material icon, JSONMessage title, JSONMessage description, AdvancementDisplay.AdvancementFrame frame, boolean showToast, boolean announceChat, AdvancementVisibility visibility)
icon
- Icon Material
title
- Title JSONMessage
description
- Description JSONMessage
frame
- AdvancementDisplay.AdvancementFrame
showToast
- Should toast messages be shownannounceChat
- Should advancements be announced in chatvisibility
- When an advancement is visiblepublic AdvancementDisplay(org.bukkit.Material icon, java.lang.String title, java.lang.String description, AdvancementDisplay.AdvancementFrame frame, boolean showToast, boolean announceChat, AdvancementVisibility visibility)
icon
- Icon Material
title
- Title String
description
- Description String
frame
- AdvancementDisplay.AdvancementFrame
showToast
- Should toast messages be shownannounceChat
- Should advancements be announced in chatvisibility
- When an advancement is visiblepublic AdvancementDisplay(org.bukkit.Material icon, JSONMessage title, JSONMessage description, AdvancementDisplay.AdvancementFrame frame, java.lang.String backgroundTexture, boolean showToast, boolean announceChat, AdvancementVisibility visibility)
icon
- Icon Material
title
- Title JSONMessage
description
- Description JSONMessage
frame
- AdvancementDisplay.AdvancementFrame
backgroundTexture
- Background texture pathshowToast
- Should toast messages be shownannounceChat
- Should advancements be announced in chatvisibility
- When an advancement is visiblepublic AdvancementDisplay(org.bukkit.Material icon, java.lang.String title, java.lang.String description, AdvancementDisplay.AdvancementFrame frame, java.lang.String backgroundTexture, boolean showToast, boolean announceChat, AdvancementVisibility visibility)
icon
- Icon Material
title
- Title String
description
- Description String
frame
- AdvancementDisplay.AdvancementFrame
backgroundTexture
- Background texture pathshowToast
- Should toast messages be shownannounceChat
- Should advancements be announced in chatvisibility
- When an advancement is visiblepublic AdvancementDisplay(org.bukkit.inventory.ItemStack icon, JSONMessage title, JSONMessage description, AdvancementDisplay.AdvancementFrame frame, boolean showToast, boolean announceChat, AdvancementVisibility visibility)
icon
- Icon ItemStack
title
- Title JSONMessage
description
- Description JSONMessage
frame
- AdvancementDisplay.AdvancementFrame
showToast
- Should toast messages be shownannounceChat
- Should advancements be announced in chatvisibility
- When an advancement is visiblepublic AdvancementDisplay(org.bukkit.inventory.ItemStack icon, java.lang.String title, java.lang.String description, AdvancementDisplay.AdvancementFrame frame, boolean showToast, boolean announceChat, AdvancementVisibility visibility)
icon
- Icon ItemStack
title
- Title String
description
- Description String
frame
- AdvancementDisplay.AdvancementFrame
showToast
- Should toast messages be shownannounceChat
- Should advancements be announced in chatvisibility
- When an advancement is visiblepublic AdvancementDisplay(org.bukkit.inventory.ItemStack icon, JSONMessage title, JSONMessage description, AdvancementDisplay.AdvancementFrame frame, java.lang.String backgroundTexture, boolean showToast, boolean announceChat, AdvancementVisibility visibility)
icon
- Icon ItemStack
title
- Title JSONMessage
description
- Description JSONMessage
frame
- AdvancementDisplay.AdvancementFrame
backgroundTexture
- Background texture pathshowToast
- Should toast messages be shownannounceChat
- Should advancements be announced in chatvisibility
- When an advancement is visiblepublic AdvancementDisplay(org.bukkit.inventory.ItemStack icon, java.lang.String title, java.lang.String description, AdvancementDisplay.AdvancementFrame frame, java.lang.String backgroundTexture, boolean showToast, boolean announceChat, AdvancementVisibility visibility)
icon
- Icon ItemStack
title
- Title String
description
- Description String
frame
- AdvancementDisplay.AdvancementFrame
backgroundTexture
- Background texture pathshowToast
- Should toast messages be shownannounceChat
- Should advancements be announced in chatvisibility
- When an advancement is visiblepublic org.bukkit.inventory.ItemStack getIcon()
ItemStack
public JSONMessage getTitle()
JSONMessage
public JSONMessage getDescription()
JSONMessage
public AdvancementDisplay.AdvancementFrame getFrame()
AdvancementDisplay.AdvancementFrame
public boolean isToastShown()
public boolean isAnnouncedToChat()
@Nullable public java.lang.String getBackgroundTexture()
public void setBackgroundTexture(@Nullable java.lang.String backgroundTexture)
backgroundTexture
- Background Texture pathpublic float getX()
public float getY()
public float generateX()
public float generateY()
public float getTabWidth()
public float getTabHeight()
public AdvancementVisibility getVisibility()
AdvancementVisibility
public boolean isVisible(org.bukkit.entity.Player player, Advancement advancement)
player
- Player to checkadvancement
- Advancement to check (because AdvancementDisplay
is not bound to one advancement)public Advancement getPositionOrigin()
public void setIcon(org.bukkit.Material icon)
icon
- New Icon Material to displaypublic void setIcon(org.bukkit.inventory.ItemStack icon)
icon
- New Icon to displaypublic void setTitle(JSONMessage title)
title
- New title JSONMessage
public void setTitle(java.lang.String title)
title
- New Title String
public void setDescription(JSONMessage description)
title
- New title JSONMessage
public void setDescription(java.lang.String description)
title
- New Title String
public void setFrame(AdvancementDisplay.AdvancementFrame frame)
frame
- New Framepublic void setShowToast(boolean showToast)
showToast
- public void setAnnounceChat(boolean announceChat)
announceChat
- public void setVisibility(AdvancementVisibility visibility)
visibility
- New Visibilitypublic void setCoordinates(float x, float y)
x
- relative x coordinatey
- relative y coordinatepublic void setX(float x)
x
- relative x coordinatepublic void setY(float y)
y
- relative y coordinatepublic void setTabHeight(float tabHeight)
public void setTabWidth(float tabWidth)
public void setPositionOrigin(Advancement positionOrigin)
positionOrigin
- New position origin