Properly create profiles with custom name/uuid (#7558)
This commit is contained in:
parent
5eb61dd432
commit
7b46444bea
13 changed files with 77 additions and 52 deletions
|
@ -289,16 +289,20 @@ index 0000000000000000000000000000000000000000..7b3b6ef533d32169fbeca389bd61cfc6
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index b175f07b99a07ba50c4721c38f9e6330f02942f8..aae3eec8d28a0047bc590ecc55d87d11ee6d08f0 100644
|
||||
index b175f07b99a07ba50c4721c38f9e6330f02942f8..88720b2fa92f387714c11a11cba8c9bf0a25e797 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2080,6 +2080,40 @@ public final class Bukkit {
|
||||
@@ -2080,6 +2080,50 @@ public final class Bukkit {
|
||||
public static boolean suggestPlayerNamesWhenNullTabCompletions() {
|
||||
return server.suggestPlayerNamesWhenNullTabCompletions();
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Creates a PlayerProfile for the specified uuid, with name as null
|
||||
+ * 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.
|
||||
+ *
|
||||
+ * @param uuid UUID to create profile for
|
||||
+ * @return A PlayerProfile object
|
||||
+ */
|
||||
|
@ -308,7 +312,11 @@ index b175f07b99a07ba50c4721c38f9e6330f02942f8..aae3eec8d28a0047bc590ecc55d87d11
|
|||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Creates a PlayerProfile for the specified name, with UUID as null
|
||||
+ * 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.
|
||||
+ *
|
||||
+ * @param name Name to create profile for
|
||||
+ * @return A PlayerProfile object
|
||||
+ */
|
||||
|
@ -321,6 +329,8 @@ index b175f07b99a07ba50c4721c38f9e6330f02942f8..aae3eec8d28a0047bc590ecc55d87d11
|
|||
+ * Creates a 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.
|
||||
+ *
|
||||
+ * @param uuid UUID to create profile for
|
||||
+ * @param name Name to create profile for
|
||||
|
@ -334,16 +344,20 @@ index b175f07b99a07ba50c4721c38f9e6330f02942f8..aae3eec8d28a0047bc590ecc55d87d11
|
|||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 24e68d5cb4f713984b25ab19330cb77f1eddb5cf..51c96a0b6645cf31f4ca051f6a8c75b5f188484c 100644
|
||||
index 24e68d5cb4f713984b25ab19330cb77f1eddb5cf..29886928ab33edf9965b93e89482a84bd82e4fd2 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1825,5 +1825,33 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1825,5 +1825,43 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* @return true if player names should be suggested
|
||||
*/
|
||||
boolean suggestPlayerNamesWhenNullTabCompletions();
|
||||
+
|
||||
+ /**
|
||||
+ * Creates a PlayerProfile for the specified uuid, with name as null
|
||||
+ * 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.
|
||||
+ *
|
||||
+ * @param uuid UUID to create profile for
|
||||
+ * @return A PlayerProfile object
|
||||
+ */
|
||||
|
@ -351,7 +365,11 @@ index 24e68d5cb4f713984b25ab19330cb77f1eddb5cf..51c96a0b6645cf31f4ca051f6a8c75b5
|
|||
+ com.destroystokyo.paper.profile.PlayerProfile createProfile(@NotNull UUID uuid);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates a PlayerProfile for the specified name, with UUID as null
|
||||
+ * 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.
|
||||
+ *
|
||||
+ * @param name Name to create profile for
|
||||
+ * @return A PlayerProfile object
|
||||
+ */
|
||||
|
@ -362,6 +380,8 @@ index 24e68d5cb4f713984b25ab19330cb77f1eddb5cf..51c96a0b6645cf31f4ca051f6a8c75b5
|
|||
+ * Creates a 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.
|
||||
+ *
|
||||
+ * @param uuid UUID to create profile for
|
||||
+ * @param name Name to create profile for
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Make the default permission message configurable
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 76d379cfc00157dd76ae981ebd839ac0954b4773..686235a2347ebeaa5654a14cdd717009f2c0105f 100644
|
||||
index d82d06894e3dd09fe57448fd5bc09fabbff08e62..52f5750e1cbce6000c72f5f1b4bde41b9fa66b23 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2098,6 +2098,15 @@ public final class Bukkit {
|
||||
|
@ -22,10 +22,10 @@ index 76d379cfc00157dd76ae981ebd839ac0954b4773..686235a2347ebeaa5654a14cdd717009
|
|||
+ }
|
||||
+
|
||||
/**
|
||||
* Creates a PlayerProfile for the specified uuid, with name as null
|
||||
* @param uuid UUID to create profile for
|
||||
* Creates a PlayerProfile for the specified uuid, with name as null.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 818c37490d98c287ade9b56f3fc01001db1df773..f43720d07e80e3d2937f5b271664b5268d7af027 100644
|
||||
index 9d5e22d1a4b87476a4c0d83dfdf42821131b30b1..ef10f62a00f19b6a2ca61c3984465f5cd9fa7479 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1841,6 +1841,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
|
@ -40,8 +40,8 @@ index 818c37490d98c287ade9b56f3fc01001db1df773..f43720d07e80e3d2937f5b271664b526
|
|||
+ String getPermissionMessage();
|
||||
+
|
||||
/**
|
||||
* Creates a PlayerProfile for the specified uuid, with name as null
|
||||
* @param uuid UUID to create profile for
|
||||
* Creates a PlayerProfile for the specified uuid, with name as null.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
|
||||
index b1152f4dede61383232cc6713d448840612eac13..95847fcb1ac2e430ee192f4f7ac94e981151c5db 100644
|
||||
--- a/src/main/java/org/bukkit/command/Command.java
|
||||
|
|
|
@ -5,10 +5,10 @@ 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 cf7f8a8f03adcbe466b59ea8b98b527fb54a0803..61877d9d64840408a7aec7bcc2a54779a9e820d8 100644
|
||||
index 19771a9a7a212a71f4cad33981c3b72341d80093..0f77744ac6ea1d41f3e8713236bb85ec182f4010 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2140,6 +2140,10 @@ public final class Bukkit {
|
||||
@@ -2150,6 +2150,10 @@ public final class Bukkit {
|
||||
public static com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nullable UUID uuid, @Nullable String name) {
|
||||
return server.createProfile(uuid, name);
|
||||
}
|
||||
|
@ -20,10 +20,10 @@ index cf7f8a8f03adcbe466b59ea8b98b527fb54a0803..61877d9d64840408a7aec7bcc2a54779
|
|||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 49bcc2edea32ef2b31b9ed5c3a62140bcc81ffc9..73ec2a8541ae95e07e32327ad0fff3a30b091658 100644
|
||||
index 790c09d8fc67dfe6325faff419be7d980415bad8..fcc48b9a512c756f22075d58021cad23d1ac1091 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1875,5 +1875,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1885,5 +1885,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
*/
|
||||
@NotNull
|
||||
com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nullable UUID uuid, @Nullable String name);
|
||||
|
|
|
@ -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 6971ecc8d285f81c476f1b3442159167102a5719..88d1b843d9c8db350f1b64da06bb1b568626d0ce 100644
|
||||
index 3ed3d7eb10f601dcb32e5ca7b053afeb5b0db729..bc4c76eb8b5329b4eeefe62828fed45b8b1c5154 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2163,6 +2163,15 @@ public final class Bukkit {
|
||||
@@ -2173,6 +2173,15 @@ public final class Bukkit {
|
||||
public static int getCurrentTick() {
|
||||
return server.getCurrentTick();
|
||||
}
|
||||
|
@ -26,10 +26,10 @@ index 6971ecc8d285f81c476f1b3442159167102a5719..88d1b843d9c8db350f1b64da06bb1b56
|
|||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index a543d5ec7df410cad15affb22058b60ec6a5c570..ce8e0c4e90f59d7446f761d0df9ab1c73bbbb676 100644
|
||||
index 84bcfb8f8220700c0336a378eec41be765db844a..9e459ea23dc480996ebea314e5bc98dd891c020a 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1897,5 +1897,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1907,5 +1907,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* @return Current tick
|
||||
*/
|
||||
int getCurrentTick();
|
||||
|
|
|
@ -523,10 +523,10 @@ index 0000000000000000000000000000000000000000..8fd399f791b45eb7fc62693ca954eea0
|
|||
+ @Deprecated GoalKey<Mob> UNIVERSAL_ANGER_RESET = GoalKey.of(Mob.class, NamespacedKey.minecraft("universal_anger_reset"));
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 111323f84fb6f34f5a61c5e24d1f1a058744416d..ed6dab65a21b9c089e69cf9fe2fda3919be4e5a3 100644
|
||||
index b6707f205757eb3ab09d15a20f8f93d1ba5cfff8..640e4cb43b278a06416303d96c73e50e12f6a853 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2184,6 +2184,16 @@ public final class Bukkit {
|
||||
@@ -2194,6 +2194,16 @@ public final class Bukkit {
|
||||
public static boolean isStopping() {
|
||||
return server.isStopping();
|
||||
}
|
||||
|
@ -544,10 +544,10 @@ index 111323f84fb6f34f5a61c5e24d1f1a058744416d..ed6dab65a21b9c089e69cf9fe2fda391
|
|||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 5b52ec962c0ebd8cf8968dcbc31a9900eb15f6c0..705d30a68d6f10e5c5dd49b70535b320895c8502 100644
|
||||
index 35e3a1814ad3d4891d9e07be23a019ab650c31ff..e6c491c3c6246784f6741a99120b0e1f09f71232 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1914,5 +1914,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1924,5 +1924,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* @return true if server is in the process of being shutdown
|
||||
*/
|
||||
boolean isStopping();
|
||||
|
|
|
@ -70,10 +70,10 @@ index 0000000000000000000000000000000000000000..58f78d5e91beacaf710f62461cf869f7
|
|||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index c8ea04b06d7178c6cc992a9a1b0355a70a035152..7732d26277ca8b845898cb01c7623a2f175f0aaa 100644
|
||||
index 8106fd5806fc47cb7138e01d9d5c458153afa3d5..adc8ed72acbb1ca788d44fa9542d287dbbafc669 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2238,6 +2238,14 @@ public final class Bukkit {
|
||||
@@ -2248,6 +2248,14 @@ public final class Bukkit {
|
||||
public static com.destroystokyo.paper.entity.ai.MobGoals getMobGoals() {
|
||||
return server.getMobGoals();
|
||||
}
|
||||
|
@ -89,10 +89,10 @@ index c8ea04b06d7178c6cc992a9a1b0355a70a035152..7732d26277ca8b845898cb01c7623a2f
|
|||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 75aba8c3db5198c11e0bb9c262388632a47d93e6..1d2970dc4d18122e95db8cc9830aa5c41a59e24b 100644
|
||||
index d43f785471d3671bad6eb270a87a70b27f85adcb..1446fe0be113f5d0b98f34b1da19900acc7f015d 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1961,5 +1961,11 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1971,5 +1971,11 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
*/
|
||||
@NotNull
|
||||
com.destroystokyo.paper.entity.ai.MobGoals getMobGoals();
|
||||
|
|
|
@ -102,10 +102,10 @@ index 0000000000000000000000000000000000000000..cb6d93526b637946aec311bef103ad30
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 795f8c0aa3929f6de4b4ea4b139bef8b672ab97a..944f9b87a11472ac6d7e328acc00bf09f899e648 100644
|
||||
index 41be35164aa240ab1ea69bac96b667183960d9cd..c093ba024cfd951be1afc4100d899ed8f70ab003 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2297,6 +2297,15 @@ public final class Bukkit {
|
||||
@@ -2307,6 +2307,15 @@ public final class Bukkit {
|
||||
public static io.papermc.paper.datapack.DatapackManager getDatapackManager() {
|
||||
return server.getDatapackManager();
|
||||
}
|
||||
|
@ -122,10 +122,10 @@ index 795f8c0aa3929f6de4b4ea4b139bef8b672ab97a..944f9b87a11472ac6d7e328acc00bf09
|
|||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 79120b42a3993beda1e3474fa4b722402e9d849f..f63587cfa651a3893d2efa3730dc80f271d56b1c 100644
|
||||
index 25e5fa7b6ebebdf86070d95330e8ae272fc0c593..cb511df257b389e06a4f947b6e837cb5986b28db 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1995,5 +1995,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -2005,5 +2005,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
*/
|
||||
@NotNull
|
||||
io.papermc.paper.datapack.DatapackManager getDatapackManager();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue