Skip to content

Commit

Permalink
Fix build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rainbowdashlabs committed Jul 27, 2024
1 parent 66130b2 commit 5999c54
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@
* <p>
* Easy to use and fully automatic setup and updating of locales.
* <p>
* Requires to have at least one default locale and one fallback locale in the resources. Use the {@link
* #create(Plugin, String...) constructor for initial setup. This will create missing files
* Requires to have at least one default locale and one fallback locale in the resources. Use the {@link #create(Plugin, String...)} constructor for initial setup. This will create missing files
* and updates existing files.
* <p>
* You can change the currently used locale every time via {@link #setLocale(String)}.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* SPDX-License-Identifier: LGPL-3.0-or-later
*
* Copyright (C) EldoriaRPG Team and Contributor
*/

package de.eldoria.eldoutilities.localization;

import org.bukkit.entity.Player;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import de.eldoria.eldoutilities.utils.TextUtil;
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
import org.intellij.lang.annotations.Language;

import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -35,12 +36,16 @@ public static String escape(String text) {
return ILocalizer.escape(text);
}

public MessageComposer localeCode(String propertyKey, TagResolver... replacements) {
public MessageComposer localeCode(@Language("properties") String propertyKey, TagResolver... replacements) {
stringBuilder.append(ILocalizer.escape(propertyKey));
this.replacements.addAll(Arrays.asList(replacements));
return this;
}

public MessageComposer tag(String text) {
return text("<%s>", text);
}

/**
* Add a string to the message.
* <p>
Expand Down

0 comments on commit 5999c54

Please sign in to comment.