[Feature Request] Support registering Cloud commands at runtime on Fabric

オープン
#152 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
kotlin
領域
cli

調査の方向性

Start with FabricServerCommandManager and the existing CloudBrigadierCommand and brigadierManager() flow described in the issue. Trace how a command is registered after startup and how server.commands.sendCommands(player) updates online players. Done means a runtime registration API automatically adds the command to Fabric's dispatcher and resends command trees to online players.

索引モデルが issue の本文から書いたものです。

説明

Currently, Cloud commands registered after server startup or at runtime do not automatically sync with Minecraft's/Fabric's Brigadier dispatcher or update for online players.

To register and dispatch commands late (e.g., dynamic command registration), developers currently have to manually hook into Brigadier like this:

val cloudCommand = factory.build()
cloudManager.command(cloudCommand)

val server = FabricRuntime.require
val brigadierManager = cloudManager.brigadierManager()

val executor = CloudBrigadierCommand(cloudManager, brigadierManager)

val brigadierNode = brigadierManager.literalBrigadierNodeFactory().createNode(
    name,
    cloudCommand,
    executor
)

server.commands.dispatcher.root.addChild(brigadierNode)

for (player in server.playerList.players) {
    server.commands.sendCommands(player)
}

pretty please

Provide built-in support or a API method on FabricServerCommandManager to easily register commands at runtime and automatically resend command trees to online players.

主要言語
Java
スター
7
フォーク
9
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Incendo/cloud-minecraft-modded のほかの issue

Incendo/cloud-minecraft-modded の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。