mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-22 16:39:22 +00:00
1.19.4
still WIP
This commit is contained in:
46
patches/api/0007-KeYi-Player-Skull-API.patch
Normal file
46
patches/api/0007-KeYi-Player-Skull-API.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
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 15c57f3e4e1c023e0f3168ce03dd770f006cf27b..9b1390c60bb8a5777a93676ad878b3bee1e8fd4e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -4,7 +4,8 @@ import java.net.InetSocketAddress;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
-
|
||||
+import java.util.concurrent.CompletableFuture;
|
||||
+import net.kyori.adventure.text.Component;
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.GameMode;
|
||||
@@ -3012,4 +3013,23 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@Override
|
||||
Spigot spigot();
|
||||
// Spigot 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
|
||||
}
|
||||
Reference in New Issue
Block a user