-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bukkit profile creation doesn't work on 1.20.2 #9769
Comments
I can confirm this issue |
Any updates? This bug makes my server unable to update to 1.20.2, since we use yaml serialized itemstacks. |
This should be resolved once #9770 is merged. Note that storing ItemStacks with null in profile names is something that has been warned against for several years, as those profiles are considered invalid by Mojang and stuff blowing up now isn't really a surprise. |
Where are things like this documented? I never had any warnings in the console and could not find anything in the javadocs. |
There is a level of this API wrapped internal implementation detail and so we often never really documented such aspects, half completed, mangled, profiles have always caused varying issues within the space of craftbukkit and mojang, The behavior around this stuff has always been kinda janky in varying ways, it was just generally predictable in how it would behave so most people often just ignored that given that the API wasn't exactly as integrated as it could be to make the full extent of potential situations more visible |
Fixed! |
Expected behavior
PlayerProfile profile = Bukkit.createProfile(uuid); should work
Observed/Actual behavior
java.lang.NullPointerException: Profile name must not be null
at java.util.Objects.requireNonNull(Objects.java:235) ~[?:?]
at com.mojang.authlib.GameProfile.(GameProfile.java:31) ~[authlib-5.0.47.jar:?]
at com.destroystokyo.paper.profile.CraftPlayerProfile.(CraftPlayerProfile.java:39) ~[paper-1.20.2.jar:git-Paper-"fe54a13"]
at org.bukkit.craftbukkit.v1_20_R2.CraftServer.createProfile(CraftServer.java:3086) ~[paper-1.20.2.jar:git-Paper-"fe54a13"]
at org.bukkit.craftbukkit.v1_20_R2.CraftServer.createProfile(CraftServer.java:3073) ~[paper-1.20.2.jar:git-Paper-"fe54a13"]
at org.bukkit.Bukkit.createProfile(Bukkit.java:2513) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
Steps/models to reproduce
1.20.2 server, call Bukkit.createProfile(uuid)
Plugin and Datapack List
N/A just a custom plugin to call Bukkit.createProfile(UUID)
Paper version
paper 1.20.2 #203
Other
Another weird thing, calling YamlConfiguration configuration = YamlConfiguration.loadConfiguration(file);
on a yaml file with presumably a skull itemstack (I can't test because yaml exceptions aren't thrown, they are just spit into console for some reason) does this:
java.lang.NullPointerException: Profile name must not be null
at java.util.Objects.requireNonNull(Objects.java:235) ~[?:?]
at com.mojang.authlib.GameProfile.(GameProfile.java:31) ~[authlib-5.0.47.jar:?]
at com.destroystokyo.paper.profile.CraftPlayerProfile.(CraftPlayerProfile.java:39) ~[paper-1.20.2.jar:git-Paper-"fe54a13"]
at com.destroystokyo.paper.profile.CraftPlayerProfile.deserialize(CraftPlayerProfile.java:312) ~[paper-1.20.2.jar:git-Paper-"fe54a13"]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at org.bukkit.configuration.serialization.ConfigurationSerialization.deserializeViaMethod(ConfigurationSerialization.java:85) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.configuration.serialization.ConfigurationSerialization.deserialize(ConfigurationSerialization.java:127) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.configuration.serialization.ConfigurationSerialization.deserializeObject(ConfigurationSerialization.java:207) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.configuration.file.YamlConstructor$ConstructCustomObject.construct(YamlConstructor.java:58) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:264) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:247) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping2ndStep(BaseConstructor.java:576) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.SafeConstructor.constructMapping2ndStep(SafeConstructor.java:210) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping(BaseConstructor.java:552) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlMap.construct(SafeConstructor.java:597) ~[snakeyaml-2.2.jar:?]
at org.bukkit.configuration.file.YamlConstructor$ConstructCustomObject.construct(YamlConstructor.java:49) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:264) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:247) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping2ndStep(BaseConstructor.java:576) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.SafeConstructor.constructMapping2ndStep(SafeConstructor.java:210) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping(BaseConstructor.java:552) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlMap.construct(SafeConstructor.java:597) ~[snakeyaml-2.2.jar:?]
at org.bukkit.configuration.file.YamlConstructor$ConstructCustomObject.construct(YamlConstructor.java:49) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:264) ~[snakeyaml-2.2.jar:?]
at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:247) ~[snakeyaml-2.2.jar:?]
at org.bukkit.configuration.file.YamlConstructor.construct(YamlConstructor.java:37) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.configuration.file.YamlConfiguration.fromNodeTree(YamlConfiguration.java:163) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.configuration.file.YamlConfiguration.fromNodeTree(YamlConfiguration.java:161) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.configuration.file.YamlConfiguration.fromNodeTree(YamlConfiguration.java:161) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:120) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:160) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:128) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(YamlConfiguration.java:309) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
The text was updated successfully, but these errors were encountered: