Check for more correct profile validation (#10730)

This commit is contained in:
Jake Potrebic
2024-05-19 17:45:43 -07:00
parent 3fb22e8951
commit 763f42fc65
4 changed files with 19 additions and 8 deletions

View File

@@ -362,6 +362,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ *
+ * @param name Name to create profile for
+ * @return A PlayerProfile object
+ * @throws IllegalArgumentException if the name is longer than 16 characters
+ * @throws IllegalArgumentException if the name contains invalid characters
+ */
+ @NotNull
+ public static com.destroystokyo.paper.profile.PlayerProfile createProfile(@NotNull String name) {
@@ -386,6 +388,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @param uuid UUID to create profile for
+ * @param name Name to create profile for
+ * @return A PlayerProfile object
+ * @throws IllegalArgumentException if the name is longer than 16 characters
+ * @throws IllegalArgumentException if the name contains invalid characters
+ */
+ @NotNull
+ public static com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nullable UUID uuid, @Nullable String name) {
@@ -406,6 +410,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @param uuid UUID to create profile for
+ * @param name Name to create profile for
+ * @return A PlayerProfile object
+ * @throws IllegalArgumentException if the name is longer than 16 characters
+ * @throws IllegalArgumentException if the name contains invalid characters
+ */
+ @NotNull
+ public static com.destroystokyo.paper.profile.PlayerProfile createProfileExact(@Nullable UUID uuid, @Nullable String name) {
@@ -448,6 +454,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ *
+ * @param name Name to create profile for
+ * @return A PlayerProfile object
+ * @throws IllegalArgumentException if the name is longer than 16 characters
+ * @throws IllegalArgumentException if the name contains invalid characters
+ */
+ @NotNull
+ com.destroystokyo.paper.profile.PlayerProfile createProfile(@NotNull String name);
@@ -471,6 +479,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @param name Name to create profile for
+ * @return A PlayerProfile object
+ * @throws IllegalArgumentException if the name is longer than 16 characters
+ * @throws IllegalArgumentException if the name contains invalid characters
+ */
+ @NotNull
+ com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nullable UUID uuid, @Nullable String name);
@@ -490,6 +499,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @param name Name to create profile for
+ * @return A PlayerProfile object
+ * @throws IllegalArgumentException if the name is longer than 16 characters
+ * @throws IllegalArgumentException if the name contains invalid characters
+ */
+ @NotNull
+ com.destroystokyo.paper.profile.PlayerProfile createProfileExact(@Nullable UUID uuid, @Nullable String name);