Сделать команду активной

ilich_ad

Пользователь
Сообщения
120
Как сделать любую команду активной, чтобы её можно было подсосать табуляцией?
Есть у меня такие команды, как list и menu. Как сделать, чтобы при начале ввода они предлагались к выбору?
Спасибо.
 
В CMI например есть CustomAlias, подробнее
Но можешь также сделать это и в Commands.yml,
находится в корне конфигов твоего сервера
(там где spigot.yml/paper.yml/bukkit.yml)
Можешь, пожалуйста, привести пример как редактировать Commands.yml.
 
Т.к. у них похожее действие с CMI, приведу комментарий оттуда:

YAML:
# Edit custom variables in game if possible
# Some extra variables can be used, like [playerName] will insert senders name automatically
# If command is shortened and you need to provide some changing variables like target player name you need to define what and where it should be placed
# Example: /cmi heal Zrips
# Can be shortened with custom alias to something like /h zrips by using alias command like
# cmi heal $1
# If you need to add more than one variable, use $1- format. Number represents variable place when used in alias command
# Example: cmi tppos $1-
# In case you want to print out help page if player enters wrong subcommand, use ? in alias
# Example: ca ?
# In this case if player performs /ca wrongsub or /ca anotherwrong
# Commands under this alias will get executed. Exelent way to show help page and correct usage if needed

И уже есть готовый пример:

Код:
aliases:
  icanhasbukkit:
  - version $1-
 
ilich_ad,
Wiki:

Код:
aliases:
  НоваяКоманда:
  - СуществующаяКоманда $1-

Код:
aliases:
  РегистраторКоманды (плагин, ядро):КомандаКоторуюНужноУбрать:
  - []
 
Т.к. у них похожее действие с CMI, приведу комментарий оттуда:

YAML:
# Edit custom variables in game if possible
# Some extra variables can be used, like [playerName] will insert senders name automatically
# If command is shortened and you need to provide some changing variables like target player name you need to define what and where it should be placed
# Example: /cmi heal Zrips
# Can be shortened with custom alias to something like /h zrips by using alias command like
# cmi heal $1
# If you need to add more than one variable, use $1- format. Number represents variable place when used in alias command
# Example: cmi tppos $1-
# In case you want to print out help page if player enters wrong subcommand, use ? in alias
# Example: ca ?
# In this case if player performs /ca wrongsub or /ca anotherwrong
# Commands under this alias will get executed. Exelent way to show help page and correct usage if needed

И уже есть готовый пример:

Код:
aliases:
  icanhasbukkit:
  - version $1-
Спасибо, в примере смутил $1
Теперь всё ясно
Авто объединение сообщений:

Я может плохо описал задачу
У меня команда выполняется, но она не показывается как возможная к выполнению. Это конкретно команда /menu
Она выполняется, но не подсасывается табом и не предлагается для написания при вводе me. Попытался добавить, как рассказали выше. Не помогает.
 
Последнее редактирование:
Назад
Сверху Снизу