SPIGOT-3238: Add Server.advancementIterator

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot 2017-05-15 08:25:11 +10:00
parent 75a18fd5ad
commit 5dcd2db4e8
2 changed files with 18 additions and 0 deletions

View file

@ -1144,6 +1144,16 @@ public final class Bukkit {
return server.getAdvancement(key);
}
/**
* Get an iterator through all advancements. Advancements cannot be removed
* from this iterator,
*
* @return an advancement iterator
*/
public static Iterator<Advancement> advancementIterator() {
return server.advancementIterator();
}
/**
* @see UnsafeValues
* @return the unsafe values instance

View file

@ -936,6 +936,14 @@ public interface Server extends PluginMessageRecipient {
*/
Advancement getAdvancement(NamespacedKey key);
/**
* Get an iterator through all advancements. Advancements cannot be removed
* from this iterator,
*
* @return an advancement iterator
*/
Iterator<Advancement> advancementIterator();
/**
* @see UnsafeValues
* @return the unsafe values instance