mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-07 11:05:13 +01:00
SPIGOT-3238: Add Server.advancementIterator
This commit is contained in:
parent
5195487ec6
commit
743252dbe5
1 changed files with 11 additions and 0 deletions
|
@ -118,6 +118,7 @@ import com.google.common.base.Charsets;
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
import com.google.common.collect.Iterators;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.MapMaker;
|
import com.google.common.collect.MapMaker;
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
|
@ -1661,6 +1662,16 @@ public final class CraftServer implements Server {
|
||||||
return (advancement == null) ? null : advancement.bukkit;
|
return (advancement == null) ? null : advancement.bukkit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Iterator<org.bukkit.advancement.Advancement> advancementIterator() {
|
||||||
|
return Iterators.unmodifiableIterator(Iterators.transform(console.getAdvancementData().c().iterator(), new Function<Advancement, org.bukkit.advancement.Advancement>() { // PAIL: rename
|
||||||
|
@Override
|
||||||
|
public org.bukkit.advancement.Advancement apply(Advancement advancement) {
|
||||||
|
return advancement.bukkit;
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@Override
|
@Override
|
||||||
public UnsafeValues getUnsafe() {
|
public UnsafeValues getUnsafe() {
|
||||||
|
|
Loading…
Reference in a new issue