From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: nostalgic853 Date: Sun, 20 Nov 2022 00:20:01 +0800 Subject: [PATCH] Player Skull API diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java index 5ed16b78c39de21eff18a4824f84457a7c70fb58..fda61b6b550ab58d3a6ca0c4981ebf37885983b8 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -3,6 +3,9 @@ package org.bukkit.entity; import java.net.InetSocketAddress; import java.util.Collection; import java.util.UUID; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.Future; + import com.destroystokyo.paper.ClientOption; // Paper import com.destroystokyo.paper.Title; // Paper import net.kyori.adventure.text.Component; @@ -3020,4 +3023,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ void sendDeathScreen(@NotNull Component message, @Nullable Entity killer); // 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 getSkullAsynchronously(); + // KeYi end }