9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-30 20:39:21 +00:00
Files
Leaf/leaf-api/paper-patches/features/0014-KeYi-Player-Skull-API.patch
Dreeam e97f007991 API patches work
* Merged Gale's
2025-03-26 13:01:14 -04:00

37 lines
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: nostalgic853 <yuu8583@proton.me>
Date: Sun, 20 Nov 2022 00:20:01 +0800
Subject: [PATCH] KeYi: Player Skull API
Original license: MIT
Original project: https://github.com/KeYiMC/KeYi
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index cb8da28d86d44b3633cf47f75141c9a093c63dab..7d223c7da83b2e51c07aa832da08774bb1e9f206 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3904,4 +3904,23 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param score New death screen score of player
*/
void setDeathScreenScore(int score);
+
+ // Leaf start - KeYi - Player Skull API
+ /**
+ * Get a skull item of a player.
+ * This method runs on main thread, which may freeze the server.
+ *
+ * @return A skull ItemStack of the player
+ */
+ ItemStack getSkull();
+
+ /**
+ * Get a skull item of a player.
+ * This method runs on main thread, which may freeze the server.
+ *
+ * @return A CompletableFuture of the skull ItemStack of the player
+ */
+ @Deprecated(forRemoval = true)
+ CompletableFuture<ItemStack> getSkullAsynchronously();
+ // Leaf end - KeYi - Player Skull API
}