ru:tutorial:commands
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
ru:tutorial:commands [2022/02/28 21:23] – основная информация переведена furnygo | ru:tutorial:commands [2022/03/03 11:50] – furnygo | ||
---|---|---|---|
Line 2: | Line 2: | ||
Создание команд позволяет разработчику наращивать функционал и способ воздействия с пользователем через, собственно, | Создание команд позволяет разработчику наращивать функционал и способ воздействия с пользователем через, собственно, | ||
- | Это руководство расскажет как регистрировать команды и общую инофрмацию о структуре Brigadier. | + | Это руководство расскажет как регистрировать команды и общую информацию о структуре Brigadier. |
Примечание: | Примечание: | ||
Line 105: | Line 105: | ||
CommandManager находится в '' | CommandManager находится в '' | ||
- | ==== Подкоманда ==== | + | ===== Подкоманда |
Чтобы добавить команде подкоманду, | Чтобы добавить команде подкоманду, | ||
Line 218: | Line 218: | ||
^ Страница | ^ Страница | ||
- | | [[ru:tutorials: | + | | [[ru:tutorial: |
- | | [[ru:tutorials: | + | | [[ru:tutorial: |
- | | [[ru: | + | | [[ru: |
- | | [[ru:tutorials: | + | | [[ru:tutorial: |
- | | [[ru:tutorials: | + | | [[ru:tutorial: |
- | | [[ru:tutorials: | + | | [[ru:tutorial: |
**Будет сделано позже: | **Будет сделано позже: | ||
Line 229: | Line 229: | ||
====== Часто задаваемые вопросы ====== | ====== Часто задаваемые вопросы ====== | ||
- | ===== Why does my command not compile | + | ===== Почему моя команда не компилируется? |
- | There are two immediate possibilities for why this could occur. | + | Есть две непосредственные возможности того, почему это могло произойти. |
- | ==== Catch or throw a CommandSyntaxException ==== | + | ==== Поймать или вызвать исключение |
- | The solution to this issue is to make the run or suggest | + | Решение этой проблемы состоит в том, чтобы заставить методы |
- | ==== Issues with generics | + | ==== Проблемы с дженериками |
- | You may have an issue with generic types once in a while. Verify you are using '' | + | Время от времени у вас могут возникать проблемы с типами дженерика. Убедитесь, |
- | ===== Can I register client side commands? ===== | + | ===== Могу ли я зарегистрировать команды на стороне клиента? ===== |
- | Fabric | + | Fabric |
- | ===== Dark Arts ===== | + | ===== " |
- | A few things we don't recommend, but are possible. | + | Несколько вещей, которые мы не рекомендуем, |
- | ==== Can I register commands in runtime? ==== | + | ==== Могу ли я регистрировать команды во время выполнения? ==== |
- | You can do this but it is not recommended. You would get the '' | + | Вы можете это сделать, |
- | After that you need to send the command tree to every player again using '' | + | После этого вам нужно снова отправить дерево команд каждому игроку, |
- | ==== Can I unregister commands in runtime? ==== | + | ==== Могу ли я отменить регистрацию команд во время выполнения? ==== |
- | You can also do this, however it is much less stable than registering commands and could cause unwanted side effects. To keep things simple, you need to use reflection on brigadier and remove the nodes. After this, you need to send the command tree to every player again using '' | + | Вы также можете сделать это, однако это гораздо менее стабильно, |
---- | ---- | ||
- | ====== | + | ====== |
**__Currently this article is being migrated, so things may be a mess. Below is are the parts of the article that are yet to be migrated to the new format.__** | **__Currently this article is being migrated, so things may be a mess. Below is are the parts of the article that are yet to be migrated to the new format.__** |
ru/tutorial/commands.txt · Last modified: 2022/03/03 13:27 by furnygo