Template:Infobox command: Difference between revisions

mNo edit summary
simplify
Line 4: Line 4:
|rows=
|rows=
{{#if: {{{alias|}}} | {{infobox row|class=list-style-none|Aliases|{{{alias}}} }} }}
{{#if: {{{alias|}}} | {{infobox row|class=list-style-none|Aliases|{{{alias}}} }} }}
{{infobox row|class=list-style-none|Visibility|{{ #ifeq: {{{hidden|}}} | 1 | Hidden | Visible }} }}
{{#if: {{{hidden|}}} | {{infobox row|class=list-style-none|Visibility|{{
{{infobox row|Restrictions|{{#if: {{{oplevel|}}} | {{
      #ifeq: {{{hidden|}}} | 1 | Hidden | Visible }}}}
  #switch: {{lc:{{{oplevel|}}}}}
}}
  |1 = Bypass spawn protection
{{infobox row|[[Commands#Permission level|Permission]]|{{#if:{{{oplevel|}}}|{{{oplevel}}}|Unknown}}}}
  |2 = Cheats enabled
{{infobox row|[[Commands#Restrictions|Restrictions]]|{{
  |3 = [[Operator]]
   #if: {{{nocmdblock|}}} | No [[command block]]s<br> }}{{
  |4 = [[Administrator]]
  #if: {{{cheat|}}} | [[Option|Cheat]] only<br> }}{{
  |Unknown
   #if: {{{serveronly|}}} | Dedicated server only<br>}}{{
  }}}}{{
   #if: {{{singleplayer|}}} | [[Singleplayer]] only<br> }}{{
   #if: {{{nocmdblock|}}} | <br>No [[command block]]s | {{#switch: {{{oplevel|}}} | 3|4 = <br>No [[command block]]s {{abbr|by default|Can be changed in server.properties}} }} }}{{
   #if: {{{others|}}} | {{{others}}} }}{{
   #if: {{{multiplayer|}}} | <br>[[Multiplayer]] only }}{{
  #if: {{{nocmdblock|}}}{{{serveronly|}}}{{{singleplayer|}}}{{{cheat|}}}{{{others|}}} || None }}
   #if: {{{singleplayer|}}} | <br>[[Singleplayer]] only }}{{
   #if: {{{oplevel|}}}{{{nocmdblock|}}}{{{multiplayer|}}}{{{singleplayer|}}} || None }}
}}
}}
}}</includeonly><noinclude>
}}</includeonly><noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>