PaperMC/patches/api/0387-OfflinePlayer-advancements.patch

30 lines
1.1 KiB
Diff
Raw Normal View History

2021-07-09 08:57:32 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Thu, 22 Apr 2021 01:42:02 -0700
Subject: [PATCH] OfflinePlayer advancements
diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java
index a7d1f1e701f23e851f735584a30bedadb0d8b9bd..2946b0432316fff2c77dca303dea297bbda239d5 100644
--- a/src/main/java/org/bukkit/OfflinePlayer.java
+++ b/src/main/java/org/bukkit/OfflinePlayer.java
@@ -203,6 +203,18 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
* @return last seen time
*/
public long getLastSeen();
+
+ /**
+ * Return the player's progression on the specified advancement.
+ * May cause an I/O operation.
+ * <p>
+ * <b>You cannot award criteria to an offline player!</b>
+ *
+ * @param advancement advancement
+ * @return object detailing the player's progress
+ */
+ @NotNull
+ org.bukkit.advancement.AdvancementProgress getAdvancementProgress(@NotNull org.bukkit.advancement.Advancement advancement);
// Paper end
/**