public class Advancement
extends java.lang.Object
Constructor | Description |
---|---|
Advancement(Advancement parent,
NameKey name,
AdvancementDisplay display) |
Modifier and Type | Method | Description |
---|---|---|
void |
displayMessageToEverybody(org.bukkit.entity.Player player) |
Displays an Advancement Message to every Player saying Player has completed said advancement
Note that this doesn't grant the advancement |
void |
displayToast(org.bukkit.entity.Player player) |
Sends a Toast Message regardless if the Player has it in one of their Advancement Managers or not
|
static Advancement |
fromJSON(com.google.gson.JsonElement json) |
Generates an Advancement
|
static Advancement |
fromJSON(java.lang.String json) |
Generates an Advancement
|
java.lang.String |
getAdvancementJSON() |
|
java.util.Map<java.lang.String,java.util.HashSet<java.lang.String>> |
getAwardedCriteria() |
|
java.util.HashSet<java.lang.String> |
getAwardedCriteria(java.util.UUID uuid) |
|
java.util.HashSet<Advancement> |
getChildren() |
|
int |
getCriteria() |
|
AdvancementDisplay |
getDisplay() |
Get the Display
|
boolean |
getHiddenStatus(org.bukkit.entity.Player player) |
|
net.minecraft.server.v1_16_R3.IChatBaseComponent |
getMessage(org.bukkit.entity.Player player) |
|
NameKey |
getName() |
|
Advancement |
getParent() |
|
net.minecraft.server.v1_16_R3.AdvancementProgress |
getProgress(java.util.UUID uuid) |
|
net.minecraft.server.v1_16_R3.AdvancementProgress |
getProgress(org.bukkit.entity.Player player) |
|
AdvancementReward |
getReward() |
|
Advancement |
getRootAdvancement() |
|
java.util.List<Advancement> |
getRow() |
|
java.util.List<Advancement> |
getRowAfter() |
|
java.util.List<Advancement> |
getRowUntil() |
|
net.minecraft.server.v1_16_R3.Advancement |
getSavedAdvancement() |
|
java.util.Map<java.lang.String,net.minecraft.server.v1_16_R3.Criterion> |
getSavedCriteria() |
|
java.lang.String[][] |
getSavedCriteriaRequirements() |
|
SaveMethod |
getSaveMethod() |
Get the Save/Load Method that is currently in use
|
NameKey |
getTab() |
|
boolean |
hasName(NameKey key) |
|
boolean |
isAnythingGrantedAfter(org.bukkit.entity.Player player) |
|
boolean |
isAnythingGrantedUntil(org.bukkit.entity.Player player) |
|
boolean |
isDone(java.util.UUID uuid) |
|
boolean |
isDone(org.bukkit.entity.Player player) |
|
boolean |
isGranted(org.bukkit.entity.Player player) |
|
void |
saveAdvancement(net.minecraft.server.v1_16_R3.Advancement save) |
|
void |
saveCriteria(java.util.Map<java.lang.String,net.minecraft.server.v1_16_R3.Criterion> save) |
|
void |
saveCriteriaRequirements(java.lang.String[][] save) |
|
void |
saveHiddenStatus(org.bukkit.entity.Player player,
boolean hidden) |
|
void |
setAwardedCriteria(java.util.Map<java.lang.String,java.util.HashSet<java.lang.String>> awardedCriteria) |
|
void |
setCriteria(int criteria) |
Sets the Required Criteria Amount
|
void |
setProgress(org.bukkit.entity.Player player,
net.minecraft.server.v1_16_R3.AdvancementProgress progress) |
|
void |
setReward(AdvancementReward reward) |
Sets the Reward for completing the Advancement
|
void |
setSaveMethod(SaveMethod saveMethod) |
Set the Save/Load method
SaveMethod.DEFAULT - Criteria Values will be saved and loadedSaveMethod.NUMBER - Criteria Number will be saved and loaded |
java.lang.String |
toString() |
|
void |
unsetAwardedCriteria(java.util.UUID uuid) |
|
void |
unsetProgress(java.util.UUID uuid) |
public Advancement(@Nullable Advancement parent, NameKey name, AdvancementDisplay display)
parent
- Parent advancement, used for drawing lines between different advancementsname
- Unique Namedisplay
- public static Advancement fromJSON(java.lang.String json)
json
- JSON representation of Advancement
instanceAdvancement
public static Advancement fromJSON(com.google.gson.JsonElement json)
json
- JSON representation of Advancement
instanceAdvancement
public java.lang.String getAdvancementJSON()
Advancement
instance@Nullable public Advancement getParent()
public void setCriteria(int criteria)
criteria
- public int getCriteria()
public NameKey getName()
public AdvancementDisplay getDisplay()
public void setSaveMethod(SaveMethod saveMethod)
SaveMethod.DEFAULT
- Criteria Values will be saved and loadedSaveMethod.NUMBER
- Criteria Number will be saved and loadedsaveMethod
- The Save/Load Methodpublic SaveMethod getSaveMethod()
public void setReward(@Nullable AdvancementReward reward)
reward
- public AdvancementReward getReward()
public void displayMessageToEverybody(org.bukkit.entity.Player player)
player
- Player who has recieved the advancementpublic net.minecraft.server.v1_16_R3.IChatBaseComponent getMessage(org.bukkit.entity.Player player)
player
- Player who has recieved the advancementpublic void displayToast(org.bukkit.entity.Player player)
player
- Player who should see the Toast Messagepublic java.util.HashSet<Advancement> getChildren()
public Advancement getRootAdvancement()
Advancement
public NameKey getTab()
public java.util.List<Advancement> getRow()
public java.util.List<Advancement> getRowUntil()
public java.util.List<Advancement> getRowAfter()
public boolean isAnythingGrantedUntil(org.bukkit.entity.Player player)
player
- Player to checkpublic boolean isAnythingGrantedAfter(org.bukkit.entity.Player player)
player
- Player to checkpublic void saveHiddenStatus(org.bukkit.entity.Player player, boolean hidden)
public boolean getHiddenStatus(org.bukkit.entity.Player player)
public void saveCriteria(java.util.Map<java.lang.String,net.minecraft.server.v1_16_R3.Criterion> save)
public java.util.Map<java.lang.String,net.minecraft.server.v1_16_R3.Criterion> getSavedCriteria()
public void saveCriteriaRequirements(java.lang.String[][] save)
public java.lang.String[][] getSavedCriteriaRequirements()
public void saveAdvancement(net.minecraft.server.v1_16_R3.Advancement save)
public net.minecraft.server.v1_16_R3.Advancement getSavedAdvancement()
public java.util.HashSet<java.lang.String> getAwardedCriteria(java.util.UUID uuid)
public java.util.Map<java.lang.String,java.util.HashSet<java.lang.String>> getAwardedCriteria()
public void setAwardedCriteria(java.util.Map<java.lang.String,java.util.HashSet<java.lang.String>> awardedCriteria)
public void unsetAwardedCriteria(java.util.UUID uuid)
public net.minecraft.server.v1_16_R3.AdvancementProgress getProgress(org.bukkit.entity.Player player)
public net.minecraft.server.v1_16_R3.AdvancementProgress getProgress(java.util.UUID uuid)
public void setProgress(org.bukkit.entity.Player player, net.minecraft.server.v1_16_R3.AdvancementProgress progress)
public void unsetProgress(java.util.UUID uuid)
public boolean isDone(org.bukkit.entity.Player player)
public boolean isDone(java.util.UUID uuid)
public boolean isGranted(org.bukkit.entity.Player player)
player
- Player to checkpublic boolean hasName(NameKey key)
key
- Key to checkAdvancement
name and key share the same namespace and namepublic java.lang.String toString()
toString
in class java.lang.Object