9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-23 08:59:23 +00:00
Files
Leaf/leaf-api/paper-patches/features/0015-KeYi-Player-Skull-API.patch
2025-04-06 22:24:43 -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 3e2d6105d8d00305076c0c2677a4acd5cc402214..98f5be0e9d33a001f9cb772709ffa31669394896 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -4023,4 +4023,23 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
sendDeathScreen(message);
}
// Purpur end
+
+ // 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
}