Class AdvancementDisplay
java.lang.Object
eu.endercentral.crazy_advancements.advancement.AdvancementDisplay
Represents the Display Information of an Advancement
- Author:
- Axel
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Represents the Frame of an Advancement -
Constructor Summary
ConstructorDescriptionAdvancementDisplay
(ItemStack icon, JSONMessage title, JSONMessage description, AdvancementDisplay.AdvancementFrame frame, AdvancementVisibility visibility) AdvancementDisplay
(ItemStack icon, JSONMessage title, JSONMessage description, AdvancementDisplay.AdvancementFrame frame, String backgroundTexture, AdvancementVisibility visibility) AdvancementDisplay
(ItemStack icon, String title, String description, AdvancementDisplay.AdvancementFrame frame, AdvancementVisibility visibility) AdvancementDisplay
(ItemStack icon, String title, String description, AdvancementDisplay.AdvancementFrame frame, String backgroundTexture, AdvancementVisibility visibility) AdvancementDisplay
(Material icon, JSONMessage title, JSONMessage description, AdvancementDisplay.AdvancementFrame frame, AdvancementVisibility visibility) AdvancementDisplay
(Material icon, JSONMessage title, JSONMessage description, AdvancementDisplay.AdvancementFrame frame, String backgroundTexture, AdvancementVisibility visibility) AdvancementDisplay
(Material icon, String title, String description, AdvancementDisplay.AdvancementFrame frame, AdvancementVisibility visibility) AdvancementDisplay
(Material icon, String title, String description, AdvancementDisplay.AdvancementFrame frame, String backgroundTexture, AdvancementVisibility visibility) -
Method Summary
Modifier and TypeMethodDescriptionfloat
Gets the absolute x coordinatefloat
Gets the absolute y coordinategetFrame()
getIcon()
getTitle()
Gets theAdvancementVisibility
float
getX()
Gets the relative X coordinatefloat
getY()
Gets the relative y coordinateboolean
isVisible
(Player player, Advancement advancement) void
setBackgroundTexture
(String backgroundTexture) Sets the background texturevoid
setCoordinates
(float x, float y) Changes the relative coordinatesvoid
setDescription
(JSONMessage description) Changes the Descriptionvoid
setDescription
(String description) Changes the Descriptionvoid
Changes the Framevoid
Changes the Iconvoid
Changes the Iconvoid
setPositionOrigin
(Advancement positionOrigin) Changes the advancement that marks the origin of the coordinatesvoid
setTitle
(JSONMessage title) Changes the Titlevoid
Changes the Titlevoid
setVisibility
(AdvancementVisibility visibility) Changes the visibilityvoid
setX
(float x) Changes the relative x coordinatevoid
setY
(float y) Changes the relative y coordinate
-
Constructor Details
-
AdvancementDisplay
public AdvancementDisplay(Material icon, JSONMessage title, JSONMessage description, AdvancementDisplay.AdvancementFrame frame, AdvancementVisibility visibility) - Parameters:
icon
- IconMaterial
title
- TitleJSONMessage
description
- DescriptionJSONMessage
frame
-AdvancementDisplay.AdvancementFrame
visibility
- When an advancement is visible
-
AdvancementDisplay
public AdvancementDisplay(Material icon, String title, String description, AdvancementDisplay.AdvancementFrame frame, AdvancementVisibility visibility) - Parameters:
icon
- IconMaterial
title
- TitleString
description
- DescriptionString
frame
-AdvancementDisplay.AdvancementFrame
visibility
- When an advancement is visible
-
AdvancementDisplay
public AdvancementDisplay(Material icon, JSONMessage title, JSONMessage description, AdvancementDisplay.AdvancementFrame frame, String backgroundTexture, AdvancementVisibility visibility) - Parameters:
icon
- IconMaterial
title
- TitleJSONMessage
description
- DescriptionJSONMessage
frame
-AdvancementDisplay.AdvancementFrame
backgroundTexture
- Background texture pathvisibility
- When an advancement is visible
-
AdvancementDisplay
public AdvancementDisplay(Material icon, String title, String description, AdvancementDisplay.AdvancementFrame frame, String backgroundTexture, AdvancementVisibility visibility) - Parameters:
icon
- IconMaterial
title
- TitleString
description
- DescriptionString
frame
-AdvancementDisplay.AdvancementFrame
backgroundTexture
- Background texture pathvisibility
- When an advancement is visible
-
AdvancementDisplay
public AdvancementDisplay(ItemStack icon, JSONMessage title, JSONMessage description, AdvancementDisplay.AdvancementFrame frame, AdvancementVisibility visibility) - Parameters:
icon
- IconItemStack
title
- TitleJSONMessage
description
- DescriptionJSONMessage
frame
-AdvancementDisplay.AdvancementFrame
visibility
- When an advancement is visible
-
AdvancementDisplay
public AdvancementDisplay(ItemStack icon, String title, String description, AdvancementDisplay.AdvancementFrame frame, AdvancementVisibility visibility) - Parameters:
icon
- IconItemStack
title
- TitleString
description
- DescriptionString
frame
-AdvancementDisplay.AdvancementFrame
visibility
- When an advancement is visible
-
AdvancementDisplay
public AdvancementDisplay(ItemStack icon, JSONMessage title, JSONMessage description, AdvancementDisplay.AdvancementFrame frame, String backgroundTexture, AdvancementVisibility visibility) - Parameters:
icon
- IconItemStack
title
- TitleJSONMessage
description
- DescriptionJSONMessage
frame
-AdvancementDisplay.AdvancementFrame
backgroundTexture
- Background texture pathvisibility
- When an advancement is visible
-
AdvancementDisplay
public AdvancementDisplay(ItemStack icon, String title, String description, AdvancementDisplay.AdvancementFrame frame, String backgroundTexture, AdvancementVisibility visibility) - Parameters:
icon
- IconItemStack
title
- TitleString
description
- DescriptionString
frame
-AdvancementDisplay.AdvancementFrame
backgroundTexture
- Background texture pathvisibility
- When an advancement is visible
-
-
Method Details
-
getIcon
- Returns:
- Icon
ItemStack
-
getTitle
- Returns:
- Title
JSONMessage
-
getDescription
- Returns:
- Description
JSONMessage
-
getFrame
- Returns:
AdvancementDisplay.AdvancementFrame
-
getBackgroundTexture
- Returns:
- Background texture path
-
setBackgroundTexture
Sets the background texture- Parameters:
backgroundTexture
- Background Texture path
-
getX
public float getX()Gets the relative X coordinate- Returns:
- relative X coordinate
-
getY
public float getY()Gets the relative y coordinate- Returns:
- relative y coordinate
-
generateX
public float generateX()Gets the absolute x coordinate- Returns:
- absolute x coordinate
-
generateY
public float generateY()Gets the absolute y coordinate- Returns:
- absolute y coordinate
-
getVisibility
Gets theAdvancementVisibility
- Returns:
- when an advancement is visible
-
isVisible
- Parameters:
player
- Player to checkadvancement
- Advancement to check (becauseAdvancementDisplay
is not bound to one advancement)- Returns:
- true if it should be currently visible
-
getPositionOrigin
- Returns:
- the advancement that marks the origin of the coordinates
-
setIcon
Changes the Icon- Parameters:
icon
- New Icon Material to display
-
setIcon
Changes the Icon- Parameters:
icon
- New Icon to display
-
setTitle
Changes the Title- Parameters:
title
- New titleJSONMessage
-
setTitle
Changes the Title- Parameters:
title
- New TitleString
-
setDescription
Changes the Description- Parameters:
description
- New descriptionJSONMessage
-
setDescription
Changes the Description- Parameters:
description
- New DescriptionString
-
setFrame
Changes the Frame- Parameters:
frame
- New Frame
-
setVisibility
Changes the visibility- Parameters:
visibility
- New Visibility
-
setCoordinates
public void setCoordinates(float x, float y) Changes the relative coordinates- Parameters:
x
- relative x coordinatey
- relative y coordinate
-
setX
public void setX(float x) Changes the relative x coordinate- Parameters:
x
- relative x coordinate
-
setY
public void setY(float y) Changes the relative y coordinate- Parameters:
y
- relative y coordinate
-
setPositionOrigin
Changes the advancement that marks the origin of the coordinates- Parameters:
positionOrigin
- New position origin
-