Difference between revisions of "Template:Command"

From BergerHealer Wiki
Jump to navigation Jump to search
(Created page with "<noinclude>Template to display a Description, command and permission. == Usage == <pre><code>{{Command|command|description|permission}}</code></pre> == Example == <pre><code...")
 
(Make permission optional)
Line 5: Line 5:
  
 
== Example ==
 
== Example ==
<pre><code>{{Command|train|Main command of TrainCarts|train.command.train}}</code></pre>
+
<pre>{{Command|train|Main command of TrainCarts|train.command.train}}</pre>
  
 
'''Result:'''
 
'''Result:'''
{{Command|train|Main command of TrainCarts|train.command.train}}</noinclude>
+
{{Command|train|Main command of TrainCarts|train.command.train}}
 +
 
 +
You can also omit the permissions at the end which will look like this:
 +
 
 +
{{Command|train|Main command of TrainCarts}}</noinclude>
  
 
<includeonly><onlyinclude>{|class="wikitable"
 
<includeonly><onlyinclude>{|class="wikitable"
  |colspan="2"| {{{2|}}}
+
  |colspan="2"| {{{2|''No Description provided''}}}
 
  |-
 
  |-
 
  ! Command
 
  ! Command
 
  | /{{{1|command}}}
 
  | /{{{1|command}}}
 
  |-
 
  |-
! Permission
+
  {{#if: {{{3|}}}|
| {{{3|no.permission.set}}}
+
  ! Permission
 +
  {{!}} {{{3}}}
 +
  }}
 
  |}</onlyinclude></includeonly>
 
  |}</onlyinclude></includeonly>

Revision as of 20:46, 29 December 2020

Template to display a Description, command and permission.

Usage

<code>{{Command|command|description|permission}}</code>

Example

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

Result:

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

You can also omit the permissions at the end which will look like this:

Main command of TrainCarts
Command /train