Skip to content

Commit

Permalink
Remove logs
Browse files Browse the repository at this point in the history
  • Loading branch information
esotericenderman committed Aug 4, 2024
1 parent a2c602c commit 0f5cd51
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

import java.util.Set;

import org.bukkit.Bukkit;

import net.kyori.adventure.text.Component;
import net.slqmy.template_paper_plugin.TemplatePaperPlugin;
import net.slqmy.template_paper_plugin.language.LanguageManager;
Expand All @@ -34,9 +32,6 @@ public SetLanguageCommand(TemplatePaperPlugin plugin) {
@Override
public String apply(CustomArgumentInfo<String> info) throws CustomArgumentException {
String selectedLanguage = info.currentInput();

Bukkit.getLogger().info(selectedLanguage);

if (!languages.contains(selectedLanguage)) {
Component errorMessage = languageManager.getMessage(Message.UNKNOWN_LANGUAGE, info.sender(), selectedLanguage);
throw CustomArgumentException.fromAdventureComponent(errorMessage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,30 +195,18 @@ public Component getMessage(Message message, String language, boolean fallbackOn
String[] parts = placeholderPattern.split(miniMessageString);
List<Integer> argumentIndexes = new ArrayList<>();

plugin.getLogger().info(Arrays.toString(parts));
plugin.getLogger().info(String.valueOf(parts.length));

while (matcher.find()) {
argumentIndexes.add(Integer.parseUnsignedInt(matcher.group(1)));
}

Component output = miniMessage.deserialize(parts[0]);

for (int i = 1; i < parts.length; i++) {
plugin.getLogger().info(String.valueOf(i));

int argumentIndex = argumentIndexes.get(i - 1);

plugin.getLogger().info(String.valueOf(argumentIndex));

output = output.append(arguments[argumentIndex]);

String part = parts[i];

plugin.getLogger().info(part);

Component component = miniMessage.deserialize(part);

output = output.append(component);
}

Expand Down

0 comments on commit 0f5cd51

Please sign in to comment.