Fix NotNull locales (#10216)
Two methods returning locales are annotated @NotNull, despite being able to return null
This commit is contained in:
@@ -3608,7 +3608,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public PlayerLocaleChangeEvent(@NotNull Player who, @NotNull String locale) {
|
||||
super(who);
|
||||
this.locale = locale;
|
||||
+ this.adventure$locale = net.kyori.adventure.translation.Translator.parseLocale(locale); // Paper
|
||||
+ this.adventure$locale = java.util.Objects.requireNonNullElse(net.kyori.adventure.translation.Translator.parseLocale(locale), java.util.Locale.US); // Paper start
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user