mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-22 08:29:28 +00:00
49 lines
1.6 KiB
Diff
49 lines
1.6 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 d1025b65d159ad3bf99157570b8b81fdb759ac34..37668e737e7b507757c70e432a19647db6628b81 100644
|
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
|
@@ -8,8 +8,11 @@ import java.util.Collection;
|
|
import java.util.Date;
|
|
import java.util.Map;
|
|
import java.util.UUID;
|
|
-
|
|
import org.bukkit.BanEntry;
|
|
+// KeYi start
|
|
+import java.util.concurrent.CompletableFuture;
|
|
+import net.kyori.adventure.text.Component;
|
|
+// KeYi end
|
|
import org.bukkit.DyeColor;
|
|
import org.bukkit.Effect;
|
|
import org.bukkit.GameMode;
|
|
@@ -3422,4 +3425,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
|
sendDeathScreen(message);
|
|
}
|
|
// Purpur end
|
|
+
|
|
+ // KeYi start
|
|
+ /**
|
|
+ * Get a skull item of a player.
|
|
+ * This method runs on main thread, which may freeze the server.
|
|
+ *
|
|
+ * @return A ItemStack of the skull 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 the of ItemStack of the skull of the player
|
|
+ */
|
|
+ CompletableFuture<ItemStack> getSkullAsynchronously();
|
|
+ // KeYi end
|
|
}
|