Command

From BergerHealer Wiki
Jump to navigation Jump to search
(Add examples section and make description optional)
Line 4: Line 4:
<pre>{{Command|command|description|permission}}</pre>
<pre>{{Command|command|description|permission}}</pre>


== Example ==
== Examples ==
 
=== Full Example ===
'''Code'''
<pre>{{Command|train|Main command of TrainCarts|train.command.train}}</pre>
<pre>{{Command|train|Main command of TrainCarts|train.command.train}}</pre>


Line 10: Line 13:
{{Command|train|Main command of TrainCarts|train.command.train}}
{{Command|train|Main command of TrainCarts|train.command.train}}


You can also omit the permissions at the end which will look like this:
=== No permissions ===
'''Code'''
<pre>{{Command|train|Main command of TrainCarts}}</pre>
 
'''Result'''
{{Command|train|Main command of TrainCarts}}
 
=== No Description ===
'''Code'''
<pre>{{Command|train||train.command.train}}</pre>
 
'''Result'''
{{Command|train||train.command.train}}
 
=== With Examples ===
'''Code'''
<pre>{{Command|train setname [name]|Set the name of the selected train|train.command.name|/train setname SomeName}}</pre>


{{Command|train|Main command of TrainCarts}}</noinclude>
'''Result'''
{{Command|train setname [name]|Set the name of the selected train|train.command.name|/train setname SomeName}}</noinclude>


<includeonly><onlyinclude>{|class="wikitable"
<includeonly><onlyinclude>{|class="wikitable"
|colspan="2"| {{{2|''No Description provided''}}}
  {{#if: {{{2|}}}|
|-
  {{!}}colspan="2"{{!}}{{{2}}}
! Command
  {{!}}-
| /{{{1|command}}}
  }}
|-
! Command
  {{#if: {{{3|}}}|
| /{{{1|command}}}
  ! Permission
|-
  {{!}} {{{3}}}
  {{#if: {{{3|}}}|
  }}
  ! Permission
|}</onlyinclude></includeonly>
  {{!}} {{{3}}}
  }}
|-
  {{#if: {{{4|}}}|
  ! colspan="2" {{!}} Examples
  {{!}}-
  {{!}} colspan="2" {{!}} {{{4}}}
  }}
|-
|}</onlyinclude></includeonly>

Revision as of 14:25, 14 February 2021

Template to display a Description, command and permission.

Usage

{{Command|command|description|permission}}

Examples

Full Example

Code

{{Command|train|Main command of TrainCarts|train.command.train}}

Result:

Main command of TrainCarts
Command /train
Permission train.command.train

No permissions

Code

{{Command|train|Main command of TrainCarts}}

Result

Main command of TrainCarts
Command /train

No Description

Code

{{Command|train||train.command.train}}

Result

Command /train
Permission train.command.train

With Examples

Code

{{Command|train setname [name]|Set the name of the selected train|train.command.name|/train setname SomeName}}

Result

Set the name of the selected train
Command /train setname [name]
Permission train.command.name
Examples
/train setname SomeName