aikar / aikar/commands

Different Syntax/Command Usages for Player and Console

Ouverte
#347 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
core question
Langage dominant
Java
Étoiles
628
Forks
150
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Is it possible to have 2 syntax/command usages? If so, how?
I want to have different syntax for the Player command and the Console command.
For instance:
* Player: `/tp [player]`
* Console: `/tp `
(Notice the 2nd argument in the Console command is required, while it is optional in the Player command)

(Also, I'm just using `throw new InvalidCommandArgument(true);` to show the syntax since without it, it will just show "Unknown Command, type /help" if I only typed `/tp`)

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.