Template:Infobox command: Difference between revisions

deprecate mp and multiplayer values of oplevel, these should be replaced with singleplayer and multiplayer arguments; host should be oplevel 3 or 4; added numeric values for oplevel all current oplevel named values need to be replaced; cmdblock was weird as it changed default, added a nocmdblock argument instead which is separated from oplevel entirely
m 87 revisions imported
 
(49 intermediate revisions by 14 users not shown)
Line 1: Line 1:
<includeonly>{{#invoke:infobox|infobox
{{#invoke:infobox|infobox
|title={{{name|{{SUBPAGENAME}}}}}
|title=<code>/{{{name|{{SUBPAGENAME}}}}}</code>
|imagearea=none
|imagearea=none
|rows=
|rows=
{{#if: {{{alias|}}} | {{infobox row|class=list-style-none|Aliases|{{{alias}}}  
{{#if: {{{alias|}}} | {{infobox row|class=list-style-none|Aliases|{{{alias}}} }} }}
}}  
{{#if: {{{hidden|}}} | {{infobox row|class=list-style-none|Visibility|{{
      #ifeq: {{{hidden|}}} | 1 | Hidden | Visible }}}}
}}
}}
{{infobox row|class=list-style-none|Visibility|{{ #ifeq: {{{hidden|}}} | 1 | Hidden | Visible }} }}
{{infobox row|[[Permission level|Permission level<br>required]]|{{#if:{{{oplevel|}}}|{{{oplevel}}}|Unknown}}}}
{{infobox row|Restrictions|{{
{{infobox row|[[Commands#Restrictions|Restrictions]]|{{
   #switch: {{lc:{{{oplevel|}}}}}
   #if: {{{cheat|}}} | [[Option|Cheat]] only<br> }}{{
  |0 = Bypass spawn protection
  #if: {{{serveronly|}}} | Dedicated server only<br>}}{{
  |1 = Cheats enabled
   #if: {{{singleplayer|}}} | [[Singleplayer]] only<br> }}{{
  |3|op|operator = [[Operator]]
   #if: {{{others|}}} | {{{others}}} }}{{
  |4|admin|administrator = [[Administrator]]{{
   #if: {{{serveronly|}}}{{{singleplayer|}}}{{{cheat|}}}{{{others|}}} || None }}
    #ifeq: {{{cmdblock|}}} | 0 | <br>No [[command block]]s }}
  |mp|multiplayer = [[Multiplayer]]<br>[[Operator]]{{
    #ifeq: {{{cmdblock|}}} | 1 || <br>No [[command block]]s }}
  |host|host = Host
  |?|unknown = Unknown
  }}{{
   #if: {{{nocmdblock|}}} | <br>No [[command block]]s }}{{
   #if: {{{multiplayer|}}} | <br>[[Multiplayer]] only }}{{
  #if: {{{singleplayer|}}} | <br>[[Singleplayer]] only }}{{
   #if: {{{oplevel|}}}{{{nocmdblock|}}}{{{multiplayer|}}}{{{singleplayer|}}} || None }}
}}
}}
}}{{#switch: {{lc:{{{oplevel|}}}}} | op|operator|admin|administratormp|multiplayer|host = [[Category:Pages with deprecated template input|Command]] }}
}}<includeonly></includeonly><noinclude>
{{#if: {{{cmdblock|}}} | [[Category:Pages with deprecated template input|Command]] }}</includeonly><noinclude>
{{documentation}}
{{documentation}}[[Category:Templates with deprecated input]]
[[Category:Infobox templates]]
</noinclude>
</noinclude>