mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-26 09:42:06 -07:00
Updated Upstream (Bukkit/CraftBukkit) (#7875)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 6a039faf PR-745: Expose more information about advancements 52148c47 PR-749: Various javadoc improvements 23c2d841 PR-748: Remove permissible recalculation from Permission constructor CraftBukkit Changes: a59dc59e SPIGOT-7025: Use existing item in hand for ranged Drowned attack e4cca0ca PR-1050: Expose more information about advancements
This commit is contained in:
@@ -90,11 +90,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java
|
||||
@@ -0,0 +0,0 @@ public class CraftAdvancement implements org.bukkit.advancement.Advancement {
|
||||
public Collection<String> getCriteria() {
|
||||
return Collections.unmodifiableCollection(this.handle.getCriteria().keySet());
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
@Override
|
||||
- public AdvancementDisplay getDisplay() {
|
||||
- if (this.handle.getDisplay() == null) {
|
||||
- return null;
|
||||
+ public io.papermc.paper.advancement.AdvancementDisplay getDisplay() {
|
||||
+ return this.handle.getDisplay() == null ? null : this.handle.getDisplay().paper;
|
||||
+ }
|
||||
@@ -109,10 +112,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ final var children = com.google.common.collect.ImmutableList.<org.bukkit.advancement.Advancement>builder();
|
||||
+ for (Advancement advancement : this.handle.getChildren()) {
|
||||
+ children.add(advancement.bukkit);
|
||||
+ }
|
||||
}
|
||||
+ return children.build();
|
||||
+ }
|
||||
+
|
||||
|
||||
- return new CraftAdvancementDisplay(this.handle.getDisplay());
|
||||
+ @Override
|
||||
+ public org.bukkit.advancement.Advancement getRoot() {
|
||||
+ Advancement advancement = this.handle;
|
||||
@@ -120,7 +124,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ advancement = advancement.getParent();
|
||||
+ }
|
||||
+ return advancement.bukkit;
|
||||
+ }
|
||||
}
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/test/java/io/papermc/paper/advancement/AdvancementFrameTest.java b/src/test/java/io/papermc/paper/advancement/AdvancementFrameTest.java
|
||||
|
Reference in New Issue
Block a user