Skip to content

Commit 9d4d1b8

Browse files
author
david
committed
Remove @ApiStatus.Internal annotations and adjust nullability.
The commit removes the @ApiStatus.Internal annotations from several methods, making them accessible outside their current package. Additionally, it corrects the nullability annotation for the Title.Times parameter in the sendTitle method to ensure proper handling of nullable arguments.
1 parent 600360a commit 9d4d1b8

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

i18n/src/main/java/core/i18n/file/ComponentBundle.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717
import net.kyori.adventure.title.Title;
1818
import net.kyori.adventure.translation.GlobalTranslator;
1919
import net.kyori.adventure.translation.TranslationRegistry;
20-
import org.jetbrains.annotations.ApiStatus;
21-
import org.jetbrains.annotations.Nullable;
2220
import org.jspecify.annotations.NullMarked;
21+
import org.jspecify.annotations.Nullable;
2322

2423
import java.io.File;
2524
import java.io.FileNotFoundException;
@@ -141,7 +140,6 @@ public ComponentBundle register(String baseName, Locale locale) {
141140
* @param key the key
142141
* @return the format
143142
*/
144-
@ApiStatus.Internal
145143
public @Nullable String format(Locale locale, String key) {
146144
var request = files.get(locale);
147145
if (request != null && request.containsKey(key))
@@ -161,7 +159,6 @@ public ComponentBundle register(String baseName, Locale locale) {
161159
* @param key the key
162160
* @return the format
163161
*/
164-
@ApiStatus.Internal
165162
public @Nullable String format(Audience audience, String key) {
166163
return format(mapping().apply(audience), key);
167164
}
@@ -250,7 +247,6 @@ public Component[] components(Audience audience, String key, TagResolver... tagR
250247
* @param tagResolvers a series of tag resolvers to apply extra tags from, last specified taking priority
251248
* @return the {@link MiniMessage#deserialize(String, TagResolver...) deserialized} component
252249
*/
253-
@ApiStatus.Internal
254250
public Component deserialize(String message, TagResolver... tagResolvers) {
255251
return miniMessage.deserialize(message, tagResolvers);
256252
}
@@ -262,7 +258,6 @@ public Component deserialize(String message, TagResolver... tagResolvers) {
262258
* @param tagResolvers a series of tag resolvers to apply extra tags from, last specified taking priority
263259
* @return the {@link MiniMessage#deserialize(String, TagResolver...) deserialized} component
264260
*/
265-
@ApiStatus.Internal
266261
public Component[] deserializeArray(String message, TagResolver... tagResolvers) {
267262
return Arrays.stream(message.split("\n|<newline>"))
268263
.map(s -> deserialize(s, tagResolvers))
@@ -358,7 +353,7 @@ public void sendTitle(Audience audience, String title, String subtitle, TagResol
358353
* @param times the timings of the title
359354
* @param tagResolvers a series of tag resolvers to apply extra tags from, last specified taking priority
360355
*/
361-
public void sendTitle(Audience audience, @Nullable String title, @Nullable String subtitle, @Nullable Title.Times times, TagResolver... tagResolvers) {
356+
public void sendTitle(Audience audience, @Nullable String title, @Nullable String subtitle, Title.@Nullable Times times, TagResolver... tagResolvers) {
362357
var titleComponent = title != null ? nullable(mapping.apply(audience), title, tagResolvers) : null;
363358
var subtitleComponent = subtitle != null ? nullable(mapping.apply(audience), subtitle, tagResolvers) : null;
364359
if (titleComponent != null || subtitleComponent != null) audience.showTitle(Title.title(

0 commit comments

Comments
 (0)