From 5dcd2db4e8991c5160c8d668f629bf297cb79f64 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Mon, 15 May 2017 08:25:11 +1000 Subject: [PATCH] SPIGOT-3238: Add Server.advancementIterator By: md_5 --- paper-api/src/main/java/org/bukkit/Bukkit.java | 10 ++++++++++ paper-api/src/main/java/org/bukkit/Server.java | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/Bukkit.java b/paper-api/src/main/java/org/bukkit/Bukkit.java index 535f0b881d..87c3474320 100644 --- a/paper-api/src/main/java/org/bukkit/Bukkit.java +++ b/paper-api/src/main/java/org/bukkit/Bukkit.java @@ -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 advancementIterator() { + return server.advancementIterator(); + } + /** * @see UnsafeValues * @return the unsafe values instance diff --git a/paper-api/src/main/java/org/bukkit/Server.java b/paper-api/src/main/java/org/bukkit/Server.java index 3301ccdc29..073fecd554 100644 --- a/paper-api/src/main/java/org/bukkit/Server.java +++ b/paper-api/src/main/java/org/bukkit/Server.java @@ -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 advancementIterator(); + /** * @see UnsafeValues * @return the unsafe values instance