Command
Jump to navigation
Jump to search
m (→Usage) |
(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}} | ||
=== 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| | '''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" | ||
{{#if: {{{2|}}}| | |||
{{!}}colspan="2"{{!}}{{{2}}} | |||
{{!}}- | |||
}} | |||
! Command | |||
| /{{{1|command}}} | |||
|- | |||
{{#if: {{{3|}}}| | |||
! Permission | |||
{{!}} {{{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 |