diff --git a/patches/api/0058-Basic-PlayerProfile-API.patch b/patches/api/0058-Basic-PlayerProfile-API.patch index 118997f906..3b8aba8ecd 100644 --- a/patches/api/0058-Basic-PlayerProfile-API.patch +++ b/patches/api/0058-Basic-PlayerProfile-API.patch @@ -289,10 +289,10 @@ index 0000000000000000000000000000000000000000..7b3b6ef533d32169fbeca389bd61cfc6 + } +} diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index ece84330d2700db8708d2ae2ab7badf4acb428a8..621420d35378e0038c33892c185216894912f023 100644 +index ece84330d2700db8708d2ae2ab7badf4acb428a8..90c875ad60e473c3ec25f209933d48615d0fd6c0 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -2092,6 +2092,50 @@ public final class Bukkit { +@@ -2092,6 +2092,83 @@ public final class Bukkit { public static boolean suggestPlayerNamesWhenNullTabCompletions() { return server.suggestPlayerNamesWhenNullTabCompletions(); } @@ -301,7 +301,7 @@ index ece84330d2700db8708d2ae2ab7badf4acb428a8..621420d35378e0038c33892c18521689 + * Creates a PlayerProfile for the specified uuid, with name as null. + * + * If a player with the passed uuid exists on the server at the time of creation, the returned player profile will -+ * be populated with the properties of said player. ++ * be populated with the properties of said player (including their uuid and name). + * + * @param uuid UUID to create profile for + * @return A PlayerProfile object @@ -315,7 +315,12 @@ index ece84330d2700db8708d2ae2ab7badf4acb428a8..621420d35378e0038c33892c18521689 + * Creates a PlayerProfile for the specified name, with UUID as null. + * + * If a player with the passed name exists on the server at the time of creation, the returned player profile will -+ * be populated with the properties of said player. ++ * be populated with the properties of said player (including their uuid and name). ++ *
++ * E.g. if the player 'jeb_' is currently playing on the server, calling {@code createProfile("JEB_")} will ++ * yield a profile with the name 'jeb_', their uuid and their textures. ++ * To bypass this pre-population on a case-insensitive name match, see {@link #createProfileExact(UUID, String)}. ++ *
+ * + * @param name Name to create profile for + * @return A PlayerProfile object @@ -330,7 +335,15 @@ index ece84330d2700db8708d2ae2ab7badf4acb428a8..621420d35378e0038c33892c18521689 + * + * Both UUID and Name can not be null at same time. One must be supplied. + * If a player with the passed uuid or name exists on the server at the time of creation, the returned player -+ * profile will be populated with the properties of said player. ++ * profile will be populated with the properties of said player (including their uuid and name). ++ *
++ * E.g. if the player 'jeb_' is currently playing on the server, calling {@code createProfile(null, "JEB_")} will ++ * yield a profile with the name 'jeb_', their uuid and their textures. ++ * To bypass this pre-population on an case-insensitive name match, see {@link #createProfileExact(UUID, String)}. ++ *
++ * ++ * The name comparison will compare the {@link String#toLowerCase()} version of both the passed name parameter and ++ * a players name to honour the case-insensitive nature of a mojang profile lookup. + * + * @param uuid UUID to create profile for + * @param name Name to create profile for @@ -339,15 +352,35 @@ index ece84330d2700db8708d2ae2ab7badf4acb428a8..621420d35378e0038c33892c18521689 + @NotNull + public static com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nullable UUID uuid, @Nullable String name) { + return server.createProfile(uuid, name); ++ } ++ ++ /** ++ * Creates an exact PlayerProfile for the specified name/uuid ++ * ++ * Both UUID and Name can not be null at same time. One must be supplied. ++ * If a player with the passed uuid or name exists on the server at the time of creation, the returned player ++ * profile will be populated with the properties of said player. ++ *
++ * Compared to {@link #createProfile(UUID, String)}, this method will never mutate the passed uuid or name. ++ * If a player with either the same uuid or a matching name (case-insensitive) is found on the server, their ++ * properties, such as textures, will be pre-populated in the profile, however the passed uuid and name stay intact. ++ * ++ * @param uuid UUID to create profile for ++ * @param name Name to create profile for ++ * @return A PlayerProfile object ++ */ ++ @NotNull ++ public static com.destroystokyo.paper.profile.PlayerProfile createProfileExact(@Nullable UUID uuid, @Nullable String name) { ++ return server.createProfileExact(uuid, name); + } // Paper end @NotNull diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 3c987b2fb0f748ce92a87c4ee54a4e9722e1910e..58c8e74b61dd4d952919a854a374ae7b4c3e02c0 100644 +index 3c987b2fb0f748ce92a87c4ee54a4e9722e1910e..9796ae6fcf605af88c1e5c1d29d77ea6857632cc 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1838,5 +1838,43 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -1838,5 +1838,74 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi * @return true if player names should be suggested */ boolean suggestPlayerNamesWhenNullTabCompletions(); @@ -356,7 +389,7 @@ index 3c987b2fb0f748ce92a87c4ee54a4e9722e1910e..58c8e74b61dd4d952919a854a374ae7b + * Creates a PlayerProfile for the specified uuid, with name as null. + * + * If a player with the passed uuid exists on the server at the time of creation, the returned player profile will -+ * be populated with the properties of said player. ++ * be populated with the properties of said player (including their uuid and name). + * + * @param uuid UUID to create profile for + * @return A PlayerProfile object @@ -368,7 +401,12 @@ index 3c987b2fb0f748ce92a87c4ee54a4e9722e1910e..58c8e74b61dd4d952919a854a374ae7b + * Creates a PlayerProfile for the specified name, with UUID as null. + * + * If a player with the passed name exists on the server at the time of creation, the returned player profile will -+ * be populated with the properties of said player. ++ * be populated with the properties of said player (including their uuid and name). ++ *
++ * E.g. if the player 'jeb_' is currently playing on the server, calling {@code createProfile("JEB_")} will ++ * yield a profile with the name 'jeb_', their uuid and their textures. ++ * To bypass this pre-population on a case-insensitive name match, see {@link #createProfileExact(UUID, String)}. ++ *
+ * + * @param name Name to create profile for + * @return A PlayerProfile object @@ -381,7 +419,15 @@ index 3c987b2fb0f748ce92a87c4ee54a4e9722e1910e..58c8e74b61dd4d952919a854a374ae7b + * + * Both UUID and Name can not be null at same time. One must be supplied. + * If a player with the passed uuid or name exists on the server at the time of creation, the returned player -+ * profile will be populated with the properties of said player. ++ * profile will be populated with the properties of said player (including their uuid and name). ++ *
++ * E.g. if the player 'jeb_' is currently playing on the server, calling {@code createProfile(null, "JEB_")} will ++ * yield a profile with the name 'jeb_', their uuid and their textures. ++ * To bypass this pre-population on an case-insensitive name match, see {@link #createProfileExact(UUID, String)}. ++ *
++ * ++ * The name comparison will compare the {@link String#toLowerCase()} version of both the passed name parameter and ++ * a players name to honour the case-insensitive nature of a mojang profile lookup. + * + * @param uuid UUID to create profile for + * @param name Name to create profile for @@ -389,5 +435,23 @@ index 3c987b2fb0f748ce92a87c4ee54a4e9722e1910e..58c8e74b61dd4d952919a854a374ae7b + */ + @NotNull + com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nullable UUID uuid, @Nullable String name); ++ ++ /** ++ * Creates an exact PlayerProfile for the specified name/uuid ++ * ++ * Both UUID and Name can not be null at same time. One must be supplied. ++ * If a player with the passed uuid or name exists on the server at the time of creation, the returned player ++ * profile will be populated with the properties of said player. ++ *
++ * Compared to {@link #createProfile(UUID, String)}, this method will never mutate the passed uuid or name.
++ * If a player with either the same uuid or a matching name (case-insensitive) is found on the server, their
++ * properties, such as textures, will be pre-populated in the profile, however the passed uuid and name stay intact.
++ *
++ * @param uuid UUID to create profile for
++ * @param name Name to create profile for
++ * @return A PlayerProfile object
++ */
++ @NotNull
++ com.destroystokyo.paper.profile.PlayerProfile createProfileExact(@Nullable UUID uuid, @Nullable String name);
// Paper end
}
diff --git a/patches/api/0183-Expose-the-internal-current-tick.patch b/patches/api/0183-Expose-the-internal-current-tick.patch
index ecdeedced9..93623ddd7d 100644
--- a/patches/api/0183-Expose-the-internal-current-tick.patch
+++ b/patches/api/0183-Expose-the-internal-current-tick.patch
@@ -5,12 +5,12 @@ Subject: [PATCH] Expose the internal current tick
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
-index c8580174d88674a8ab115976e93f225bb20b5854..af91f6cf87ad0f01370db31720fe318d84786ebd 100644
+index 5e145a95c1259e084aeed08a3b1d773843939e3f..070a06b1f19c663063f8803bd3698569f67549b4 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
-@@ -2162,6 +2162,10 @@ public final class Bukkit {
- public static com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nullable UUID uuid, @Nullable String name) {
- return server.createProfile(uuid, name);
+@@ -2195,6 +2195,10 @@ public final class Bukkit {
+ public static com.destroystokyo.paper.profile.PlayerProfile createProfileExact(@Nullable UUID uuid, @Nullable String name) {
+ return server.createProfileExact(uuid, name);
}
+
+ public static int getCurrentTick() {
@@ -20,13 +20,13 @@ index c8580174d88674a8ab115976e93f225bb20b5854..af91f6cf87ad0f01370db31720fe318d
@NotNull
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
-index f673927df360702b07f1fd197a3de07bc47b60cd..dc119a58c02a6b4177d560b70f026db6d9e08c55 100644
+index e32e6b87fefa95c07a0aef58cac33c99efea2631..38312ba54a4afd61b002091a742a8c91ecda1b1c 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
-@@ -1898,5 +1898,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
+@@ -1929,5 +1929,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
*/
@NotNull
- com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nullable UUID uuid, @Nullable String name);
+ com.destroystokyo.paper.profile.PlayerProfile createProfileExact(@Nullable UUID uuid, @Nullable String name);
+
+ /**
+ * Get the current internal server tick
diff --git a/patches/api/0190-Expose-MinecraftServer-isRunning.patch b/patches/api/0190-Expose-MinecraftServer-isRunning.patch
index 005325eb98..d9320fd81b 100644
--- a/patches/api/0190-Expose-MinecraftServer-isRunning.patch
+++ b/patches/api/0190-Expose-MinecraftServer-isRunning.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning
This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading.
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
-index a6808ead643db1833e1bb2a5f758f1e1d73059c1..61a60d02557ec83392dc9ce53ac83d8e4060d23b 100644
+index d93c189807ca1d22b86ed60e3eb1c1fe0a863495..ffd1c908e56fe4e09def7d7658b59e5827d8ad55 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
-@@ -2185,6 +2185,15 @@ public final class Bukkit {
+@@ -2218,6 +2218,15 @@ public final class Bukkit {
public static int getCurrentTick() {
return server.getCurrentTick();
}
@@ -26,10 +26,10 @@ index a6808ead643db1833e1bb2a5f758f1e1d73059c1..61a60d02557ec83392dc9ce53ac83d8e
@NotNull
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
-index 02139695e15ec52b09ccbdf6105fa2bc786cf9be..fdf88c204505efdb8bd2a51e0f7e0ad1ca803e75 100644
+index 81761ca547e6d2283edc5516a115c84cc48016c0..8a71aaf28eb4c38396c330e0d6eac0ed31182c94 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
-@@ -1920,5 +1920,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
+@@ -1951,5 +1951,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
* @return Current tick
*/
int getCurrentTick();
diff --git a/patches/api/0200-Add-Mob-Goal-API.patch b/patches/api/0200-Add-Mob-Goal-API.patch
index 92f1902063..bcef3aeaef 100644
--- a/patches/api/0200-Add-Mob-Goal-API.patch
+++ b/patches/api/0200-Add-Mob-Goal-API.patch
@@ -523,10 +523,10 @@ index 0000000000000000000000000000000000000000..8fd399f791b45eb7fc62693ca954eea0
+ @Deprecated GoalKey