Minecraft 1.12-pre2 API Changes

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2017-05-14 12:00:00 +10:00
parent 05d2efaa86
commit 75a18fd5ad
29 changed files with 785 additions and 36 deletions

View File

@@ -0,0 +1,64 @@
package org.bukkit.advancement;
import java.util.Collection;
import java.util.Date;
/**
* The individual status of an advancement for a player. This class is not
* reference safe as the underlying advancement may be reloaded.
*/
public interface AdvancementProgress {
/**
* The advancement this progress is concerning.
*
* @return the relevant advancement
*/
Advancement getAdvancement();
/**
* Check if all criteria for this advancement have been met.
*
* @return true if this advancement is done
*/
boolean isDone();
/**
* Mark the specified criteria as awarded at the current time.
*
* @param criteria the criteria to mark
* @return true if awarded, false if criteria does not exist or already
* awarded.
*/
boolean awardCriteria(String criteria);
/**
* Mark the specified criteria as uncompleted.
*
* @param criteria the criteria to mark
* @return true if removed, false if criteria does not exist or not awarded
*/
boolean revokeCriteria(String criteria);
/**
* Get the date the specified critera was awarded.
*
* @param criteria the criteria to check
* @return date awarded or null if unawarded or criteria does not exist
*/
Date getDateAwarded(String criteria);
/**
* Get the criteria which have not been awarded.
*
* @return unmodifiable copy of criteria remaining
*/
Collection<String> getRemainingCriteria();
/**
* Gets the criteria which have been awarded.
*
* @return unmodifiable copy of criteria awarded
*/
Collection<String> getAwardedCriteria();
}