Skip to content
Produktecheck edited this page Oct 12, 2021 · 1 revision

Custom demo command with tabcompleter

'demo':
    permission: 'custom.demo' 
    no_permission: '&cYou dont have any permission for this command' 
    usage: '&cuse /demo'
    command:
      - demo #command
      - dm
    output:
      message:
        - '&aDemo message 1'
        - '&bDemo message 2' 
        - '&cDemo message 3' 
      console:
        - 'say hi %player%' 
      broadcast:
        - '&dDemo broadcast message 1' 
        - '&eDemo broadcast message 2'
        - '&fDemo broadcast message 3' 
    tab_completer:
      demo2: #second command argument name
        command:
          - 'demo2' #a second command argument
          - 'dm2' #a second command argument
        tab_completer_output:
          message:
            - '&1Demo message 1 with a second argument (demo2)' 
            - '&2Demo message 2 with a second argument (demo2)' 
            - '&3Demo message 3 with a second argument (demo2)' 
          console:
            - 'say %player% say Hello' #command issued in the console
          broadcast:
            - '&4Demo broadcast message 1 with a second argument (demo2)' 
            - '&5Demo broadcast message 2 with a second argument (demo2)' 
            - '&6Demo broadcast message 3 with a second argument (demo2)' 
      demo3: 
        command:
          - 'demo3' 
          - 'dm3' 
        tab_completer_output:
          message:
            - '&1Demo message 1 with a second argument (demo3)' 
            - '&2Demo message 2 with a second argument (demo3)' 
            - '&3Demo message 3 with a second argument (demo3)' 
          console:
            - 'say %player% say Hello' 
          broadcast:
            - '&4Demo broadcast message 1 with a second argument (demo3)' 
            - '&5Demo broadcast message 2 with a second argument (demo3)' 
            - '&6Demo broadcast message 3 with a second argument (demo3)' 

Create a command

'commandname':
    permission: 'custom.demo' 
    no_permission: '&cYou dont have any permission for this command' 
    usage: '&cuse /demo'
    command:
      - demo
      - dm
    output:
      message:
        - '&aDemo message 1'
        - '&bDemo message 2' 
        - '&cDemo message 3' 
  • commandname is the name of the command
  • permission is the permission do you need to perform this command
  • no_permission is the message when you dont have the permission
  • usage is the usage message
  • command: here you can add the command and the alias

Output

  • You can run other commands or console commands.
  • Send text or send a broadcast text
output:
      message:
        - '&aDemo message 1'
        - '&bDemo message 2' 
        - '&cDemo message 3' 
      console:
        - 'say hi %player%' 
      broadcast:
        - '&dDemo broadcast message 1' 
        - '&eDemo broadcast message 2'
        - '&fDemo broadcast message 3' 

CommandTool


More help is available on the Discord Discord

Clone this wiki locally