This commit is contained in:
Chayapak 2023-07-14 16:49:23 +07:00
parent 1b7ace7aa8
commit 2081ed9423

View file

@ -13,6 +13,7 @@ import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.text.Text;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class ChomeNSBotCommandSuggestions extends Listener {
@ -67,13 +68,14 @@ public class ChomeNSBotCommandSuggestions extends Listener {
commands = children.subList(1, children.size())
.stream()
.map(
(eachCum) ->
new ChomeNSBotCommand(
ChipmunkMod.CONFIG.bots.chomens.prefix + ((TextComponent) eachCum).content(),
ChomeNSBotCommand.TrustLevel.valueOf(((TextComponent) eachCum.children().get(0)).content())
)
(eachCum) -> new ChomeNSBotCommand(
ChipmunkMod.CONFIG.bots.chomens.prefix + ((TextComponent) eachCum).content(),
ChomeNSBotCommand.TrustLevel.valueOf(((TextComponent) eachCum.children().get(0)).content())
)
)
.toList();
} catch (Exception ignored) {}
} catch (Exception ignored) {
ignored.printStackTrace();
}
}
}