aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0493-Add-Offline-PDC-API.patch
diff options
context:
space:
mode:
authorSpottedleaf <[email protected]>2024-10-25 12:47:52 -0700
committerSpottedleaf <[email protected]>2024-10-25 13:05:26 -0700
commite4efb590e49d30c9abe606838572aa5b4e9b5572 (patch)
tree9b60f27fd5f94daa2ea0a24edef90eb52c5811ea /patches/api/0493-Add-Offline-PDC-API.patch
parent2e76d3f1e200c567e62337e0d50ddcb01e3ea895 (diff)
downloadPaper-e4efb590e49d30c9abe606838572aa5b4e9b5572.tar.gz
Paper-e4efb590e49d30c9abe606838572aa5b4e9b5572.zip
fix compile issues
Diffstat (limited to 'patches/api/0493-Add-Offline-PDC-API.patch')
-rw-r--r--patches/api/0493-Add-Offline-PDC-API.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/patches/api/0493-Add-Offline-PDC-API.patch b/patches/api/0493-Add-Offline-PDC-API.patch
new file mode 100644
index 0000000000..32bafdb4b3
--- /dev/null
+++ b/patches/api/0493-Add-Offline-PDC-API.patch
@@ -0,0 +1,40 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Lulu13022002 <[email protected]>
+Date: Sat, 9 Jul 2022 17:17:04 +0200
+Subject: [PATCH] Add Offline PDC API
+
+
+diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java
+index 3993fecec5b4c2bbd77e175a168afcad571ce4d1..a028f2fe541491729856051780b33dba07832fb6 100644
+--- a/src/main/java/org/bukkit/OfflinePlayer.java
++++ b/src/main/java/org/bukkit/OfflinePlayer.java
+@@ -19,7 +19,7 @@ import org.jetbrains.annotations.Nullable;
+ * player that is stored on the disk and can, thus, be retrieved without the
+ * player needing to be online.
+ */
+-public interface OfflinePlayer extends ServerOperator, AnimalTamer, ConfigurationSerializable {
++public interface OfflinePlayer extends ServerOperator, AnimalTamer, ConfigurationSerializable, io.papermc.paper.persistence.PersistentDataViewHolder { // Paper - Add Offline PDC API
+
+ /**
+ * Checks if this player is currently online
+@@ -557,4 +557,20 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
+ */
+ @Nullable
+ public Location getLocation();
++ // Paper start - add pdc to offline player
++ /**
++ * Yields a view of the persistent data container for this offline player.
++ * In case this {@link OfflinePlayer} instance was created for an offline player, the returned view will wrap the persistent
++ * data on disk.
++ * <p>
++ * As such, this method as well as queries to the {@link io.papermc.paper.persistence.PersistentDataContainerView}
++ * may produce blocking IO requests to read the requested data from disk.
++ * Caution in its usage is hence advised.
++ *
++ * @return the persistent data container view
++ * @see io.papermc.paper.persistence.PersistentDataViewHolder#getPersistentDataContainer()
++ */
++ @Override
++ io.papermc.paper.persistence.@NotNull PersistentDataContainerView getPersistentDataContainer();
++ // Paper end - add pdc to offline player
+ }