Skip to content

Commit

Permalink
refactor(utils): make CFH createMessage methods public
Browse files Browse the repository at this point in the history
  • Loading branch information
WakelessSloth56 committed Aug 9, 2022
1 parent 7a88706 commit 99576a3
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -8,6 +8,7 @@
import com.mojang.brigadier.context.CommandContext;
import net.minecraft.ChatFormatting;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;

public class CommandFeedbackHelper {
Expand All @@ -31,8 +32,11 @@ public CommandFeedbackHelper(Function<String, String> i18n) {
this(EmptyText(), i18n);
}

public MutableComponent createMessage(MessageType type, Component message) {
return EmptyText().append(this.prefix).append(message);
}

private MutableComponent createMessage(MessageType type, String key, @Nullable String subKey, Object... args) {
public MutableComponent createMessage(MessageType type, String key, @Nullable String subKey, Object... args) {
var sb = new StringBuilder(5);
{
sb.append("command.");
Expand Down

0 comments on commit 99576a3

Please sign in to comment.