Module:Command/Syntax: Difference between revisions

From Modded Wiki
Jump to navigation Jump to search
update to 1.13+
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
return {
return {
command = {{command={'advancement','attribute','ban','ban-ip','banlist','bossbar','clear','clone','data','datapack','defaultgamemode','deop',
command = {{command={'advancement','attribute','ban','ban-ip','banlist','bossbar','clear','clone','data','datapack','debug','perf','defaultgamemode','deop',
'difficulty','effect','enchant','experience','xp','fill','forceload','function','gamemode','gamerule','give','help','kick','kill','help','list','locate','locatebiome',
'difficulty','effect','enchant','experience','xp','fill','forceload','function','gamemode','gamerule','give',
'loot','me','msg','tell','w','op','pardon','pardon-ip','particle','playsound','publish','recipe','reload','save-all','save-off','save-on','say','schedule','scorboard', 'seed',
'help','kick','kill','list','locate','locatebiome','loot','me','msg','tell','w','op','pardon','pardon-ip',
'setblock','setidletimeout','setworldspawn','spawnpoint','spectate','spreadplayers','stop','stopsound','summon','tag','team','tm','teammsg','teleport','tp',
'particle','playsound','publish','recipe','reload','save-all','save-off','save-on','item','say','schedule','scoreboard', 'seed',
'tellraw','time','title','trigger','whether','whitelist','worldboard','execute'
'setblock','setidletimeout','setworldspawn','spawnpoint','spectate','spreadplayers','stop','stopsound','summon','tag','team','tm','teammsg',
'teleport','tp','tellraw','time','title','trigger','whether','whitelist','worldboard','execute'
}}},
}}},
commandexecute = {{exe={'align','anchored','as','at','facing','in','positioned','rotated','if','unless','store','run'}}},
commandexecute = {{execute={'align','anchored','as','at','facing','in','positioned','rotated','if','unless','store','run'}}},
exealign = {'<axes>', redirect='commandexecute'},
executealign = {'<axes>', redirect='commandexecute'},
exeanchored = {'<anchor>', redirect='commandexecute'},
executeanchored = {'<anchor>', redirect='commandexecute'},
exeas = {'<targets>', redirect='commandexecute'},
executeas = {'<targets>', redirect='commandexecute'},
exeat = {'<targets>', redirect='commandexecute'},
executeat = {'<targets>', redirect='commandexecute'},
exefacing = { {exefac = {"<''x''>",'entity'}},redirect='commandexecute'},
executefacing = { {executesub = {"<''x''>",'entity'}},redirect='commandexecute'},
exefacentity = {'<targets>','<anchor>'},
executesubentity = {'<targets>','<anchor>'},
["exefac<''x''>"] = {"<''y''>","<''z''>"},
["executesub<''x''>"] = {"<''y''>","<''z''>"},
exein = {'<dimension>', redirect='commandexecute'},
executein = {'<dimension>', redirect='commandexecute'},
exepositionef = { {exefac = {"<''x''>",'as'}},redirect='commandexecute'},
executepositioned = { {executesub = {"<''x''>",'as'}},redirect='commandexecute'},
exefacas = {'<targets>'},
executesubas = {'<targets>'},
exerotated = { {exefac = {"<''yaw''>",'as'}},redirect='commandexecute'},
executerotated = { {executesub = {"<''yaw''>",'as'}},redirect='commandexecute'},
["exefac<''yaw''>"] = {"<''pitch''>"},
["executesub<''yaw''>"] = {"<''pitch''>"},
exestore = {'(result|success)',{exestr = {'block','bossbar','entity','score','storage'}},redirect='commandexecute'},
executestore = {'(result|success)',{executestore = {'block','bossbar','entity','score','storage'}},redirect='commandexecute'},
exestrblock={"<''x''>","<''y''>","<''z''>",'<path>','<type>','<scale>' },
executestoreblock={"<''x''>","<''y''>","<''z''>",'<path>','<type>','<scale>' },
exestrbossbar={'<id>','(max|value)'},
executestorebossbar={'<id>','(max|value)'},
exestrentity={"<target>",'<path>','<type>','<scale>' },
executestoreentity={"<target>",'<path>','<type>','<scale>' },
exestrscore={'<targets>','<objective>'},
executestorescore={'<targets>','<objective>'},
exestrstorage={"<target>",'<path>','<type>','<scale>' },
executestorestorage={"<target>",'<path>','<type>','<scale>' },
exeif = {{exeif={'block','blocks','data','entity','predicate','score'}},redirect='commandexecute'},
executeif = {{executeif={'block','blocks','data','entity','predicate','score'}},redirect='commandexecute'},
exeunless = {{exeif={'block','blocks','data','entity','predicate','score'}},redirect='commandexecute'},
executeunless = {{executeif={'block','blocks','data','entity','predicate','score'}},redirect='commandexecute'},
exeifblock = {"<''x''>","<''y''>","<''z''>",'<block>'},
executeifblock = {"<''x''>","<''y''>","<''z''>",'<block>'},
exeifblocks = {"<''x1''>","<''y1''>","<''z1''>","<''x2''>","<''y2''>","<''z2''>","<''x3''>","<''y3''>","<''z3''>", '(all|masked)'},
executeifblocks = {"<''x1''>","<''y1''>","<''z1''>","<''x2''>","<''y2''>","<''z2''>","<''x3''>","<''y3''>","<''z3''>", '(all|masked)'},
exeifdata = {{exeifdata = {'block','entity','storage'}},'<path>'},
executeifdata = {{executeifdata = {'block','entity','storage'}},'<path>'},
exeifdatablock={"<''x''>","<''y''>","<''z''>"},
executeifdatablock={"<''x''>","<''y''>","<''z''>"},
exeifdataentity={'<source>'},
executeifdataentity={'<source>'},
exeifdatastorage={'<source>'},
executeifdatastorage={'<source>'},
exeifentity = {'<entities>'},
executeifentity = {'<entities>'},
exeifpredicate = {'<predicate>'},
executeifpredicate = {'<predicate>'},
exeifscore = {'<target>','<targetObjective>',{exeifscore={'matches','(<|<=|=|>|>=)'}}},
executeifscore = {'<target>','<targetObjective>',{executeifscore={'matches','(<|<=|=|>|>=)'}}},
['exeifscore(<|<=|=|>|>=)']={'<source>','<sourceObjective>'},
['executeifscore(<|<=|=|>|>=)']={'<source>','<sourceObjective>'},
exeifscorematches = {'<range>'},
executeifscorematches = {'<range>'},
exerun = {redirect='command'},
executerun = {redirect='command'},
commandhelp = {'[<command>]'},
commandhelp = {'[<command>]'},
commandadvancement = { '(grant|revoke)', '<targets>', {adv= { 'everything', 'from', 'through', 'until', 'only' }} },
commandadvancement = { '(grant|revoke)', '<targets>', {advancement= { 'everything', 'from', 'through', 'until', 'only' }} },
advfrom = {'<advancement>'},
advancementfrom = {'<advancement>'},
advthrough = {'<advancement>'},
advancementthrough = {'<advancement>'},
advuntil = {'<advancement>'},
advancementuntil = {'<advancement>'},
advonly = {'<advancement>', '[<criterion>]'},
advancementonly = {'<advancement>', '[<criterion>]'},
commandattribute = {'<target>', '<attribute>', {attr={'get', 'base', 'modifier'}}},
commandattribute = {'<target>', '<attribute>', {attribute={'get', 'base', 'modifier'}}},
attrget = {'[<scale>]'},
attributeget = {'[<scale>]'},
attrbase = {{attrbase = {'get','set'}}},
attributebase = {{attributebase = {'get','set'}}},
attrbaseget = {'[<scale>]'},
attributebaseget = {'[<scale>]'},
attrbaseset = {'<value>'},
attributebaseset = {'<value>'},
attrmodifier = {{attrmod = {'add','remove','value'}}},
attributemodifier = {{attributemodifier = {'add','remove','value'}}},
attrmodadd = {'<uuid>','<name>','<value>','(add|multiply|multiply_base)'},
attributemodifieradd = {'<uuid>','<name>','<value>','(add|multiply|multiply_base)'},
attrmodremove = {'<uuid>'},
attributemodifierremove = {'<uuid>'},
attrmodvalue = {'get','<uuid>','[<scale>]'},
attributemodifiervalue = {'get','<uuid>','[<scale>]'},
['commandban-ip'] = {"<target>", "[<reason>]"},
['commandban-ip'] = {"<target>", "[<reason>]"},
commandkick = { "<target>", "[<reason>]" },
commandkick = { "<target>", "[<reason>]" },
commandban = { "<targets>", "[<reason>]" },
commandban = { "<targets>", "[<reason>]" },
commandbanlist = { "[ips|players]" },
commandbanlist = { "[ips|players]" },
commandbossbar = {{boss={'add','get','list','remove','set'}}},
commandbossbar = {{bossbar={'add','get','list','remove','set'}}},
bossadd = {'<id>','<name>'},
bossbaradd = {'<id>','<name>'},
bossget = {'<id>','(max|players|value|visible)'},
bossbarget = {'<id>','(max|players|value|visible)'},
bossremove = {'<id>'},
bossbarremove = {'<id>'},
bossset = {'<id>',{bossset={'color','max','name','players','style','value','visible'}}},
bossbarset = {'<id>',{bossbarset={'color','max','name','players','style','value','visible'}}},
bosssetcolor = {'(blue|green|pink|purple|red|white|yellow)'},
bossbarsetcolor = {'(blue|green|pink|purple|red|white|yellow)'},
bosssetmax = {'<max>'},
bossbarsetmax = {'<max>'},
bosssetname = {'<name>'},
bossbarsetname = {'<name>'},
bosssetplayers = {'[<targets>]'},
bossbarsetplayers = {'[<targets>]'},
bosssetstyle = {'(notched_6|notched_10|notched_12|notched_20|progress)'},
bossbarsetstyle = {'(notched_6|notched_10|notched_12|notched_20|progress)'},
bosssetvalue = {'<value>'},
bossbarsetvalue = {'<value>'},
bosssetvisible = {'<visible>'},
bossbarsetvisible = {'<visible>'},
commandclear = { "[<targets>]", "[<item>]", "[<maxCount>]" },
commandclear = { "[<targets>]", "[<item>]", "[<maxCount>]" },
commandclone = { "<''x1''>", "<''y1''>", "<''z1''>", "<''x2''>", "<''y2''>", "<''z2''>", "<''x3''>", "<''y3''>", "<''z3''>", {clone={ 'replace','masked','filtered' }}, '[force|move|normal]' },
commandclone = { "<''x1''>", "<''y1''>", "<''z1''>", "<''x2''>", "<''y2''>", "<''z2''>", "<''x3''>", "<''y3''>", "<''z3''>", {clone={ 'replace','masked','filtered' }}, '[force|move|normal]' },
Line 78: Line 79:
datamerge = {{data={'block','entity','storage'}},'<nbt>'},
datamerge = {{data={'block','entity','storage'}},'<nbt>'},
dataremove = {{data={'block','entity','storage'}},'<path>'},
dataremove = {{data={'block','entity','storage'}},'<path>'},
datamodify = {{data={'block','entity','storage'}},'<targetPath>',{datamod={'append','insert','merge','prepend','set'}},{datasrc={'from','value'}}},
datamodify = {{data={'block','entity','storage'}},'<targetPath>',{datamodify={'append','insert','merge','prepend','set'}},{datasrc={'from','value'}}},
datamodinsert = {'<index>'},
datamodifyinsert = {'<index>'},
datasrcfrom = {{data={'block','entity','storage'}},'[<sourcePath>]'},
datasrcfrom = {{data={'block','entity','storage'}},'[<sourcePath>]'},
datasrcvalue = {'<value>'},
datasrcvalue = {'<value>'},
Line 85: Line 86:
dataentity = {'<entity>'},
dataentity = {'<entity>'},
datastorage = {'<storage>'},
datastorage = {'<storage>'},
commanddatapack = {{dp={'disable','enable','list'}}},
commanddatapack = {{datapack={'disable','enable','list'}}},
dpdisable = {'<name>'},
datapackdisable = {'<name>'},
dpenable = {'<name>',{dpen={'first','last','before','after'}}},
datapackenable = {'<name>',{datapackenable={'first','last','before','after'}}},
dplist = {'[available|enabled]'},
datapacklist = {'[available|enabled]'},
dpenbefore = {'<existing>'},
datapackenablebefore = {'<existing>'},
dpenafter = {'<existing>'},
datapackenableafter = {'<existing>'},
commanddebug = { "(start|stop|report)" },
commanddebug = { {debug={'start','stop','function'}} },
debugfunction = {'<name>'},
commandperf = { '(start|stop)' },
commanddefaultgamemode = { '(survival|creative|adventure|spectator)' },
commanddefaultgamemode = { '(survival|creative|adventure|spectator)' },
commanddeop = {"<targets>"},
commanddeop = {"<targets>"},
Line 109: Line 112:
commandfill = { "<''x1''>", "<''y1''>", "<''z1''>", "<''x2''>", "<''y2''>", "<''z2''>", "<block>",{ fill = { 'destroy','hollow','keep','outline','replace'} }},
commandfill = { "<''x1''>", "<''y1''>", "<''z1''>", "<''x2''>", "<''y2''>", "<''z2''>", "<block>",{ fill = { 'destroy','hollow','keep','outline','replace'} }},
fillreplace = { '[<filter>]' },
fillreplace = { '[<filter>]' },
commandforceload = {{ fc = {'add','remove','query'} }},
commandforceload = {{ forceload = {'add','remove','query'} }},
fcadd = {"<''x1''>","<''z1''>","[<''x2''>]","[<''z2''>]"},
forceloadadd = {"<''x1''>","<''z1''>","[<''x2''>]","[<''z2''>]"},
fcremove = {{fcrmv = {'all',"<''x1''>"}}},
forceloadremove = {{forceloadremove = {'all',"<''x1''>"}}},
["fcrmv<''x1''>"] = {"<''z1''>","[<''x2''>]","[<''z2''>]"},
["forceloadremove<''x1''>"] = {"<''z1''>","[<''x2''>]","[<''z2''>]"},
fcquery = {"[<''x''>]","[<''z''>]"},
forceloadquery = {"[<''x''>]","[<''z''>]"},
commandfunction = { "<name>" },
commandfunction = { "<name>" },
commandgamemode = { '(adventure|creative|spectator|survival)','[<target>]' },
commandgamemode = { '(adventure|creative|spectator|survival)','[<target>]' },
Line 122: Line 125:
commandlocate = {"<''StructureType''>"},
commandlocate = {"<''StructureType''>"},
commandlocatebiome = {"<''biome ID''>"},
commandlocatebiome = {"<''biome ID''>"},
commandloot = {{loottar = {'spawn','replace','insert','give'}}, {lootsrc = {'fish','loot','kill','mine'}}},
commandloot = {{loottarget = {'spawn','replace','insert','give'}}, {lootsrc = {'fish','loot','kill','mine'}}},
loottarspawn = {"<''x''>","<''y''>","<''z''>"},
loottargetspawn = {"<''x''>","<''y''>","<''z''>"},
loottarreplace = {{loottar = {'entity','block'}}, '<slot>','[<count>]'},
loottargetreplace = {{loottarget = {'entity','block'}}, '<slot>','[<count>]'},
loottarentity = {'<entities>'},
loottargetentity = {'<entities>'},
loottarblock = {"<''x''>","<''y''>","<''z''>"},
loottargetblock = {"<''x''>","<''y''>","<''z''>"},
loottarinsert = {"<''x''>","<''y''>","<''z''>"},
loottargetinsert = {"<''x''>","<''y''>","<''z''>"},
loottargive = {'<players>'},
loottargetgive = {'<players>'},
lootsrcfish = {'<loot_table>',"<''x''>","<''y''>","<''z''>",'[<tool>|mainhand|offhand]'},
lootsrcfish = {'<loot_table>',"<''x''>","<''y''>","<''z''>",'[<tool>|mainhand|offhand]'},
lootsrcloot = {'<loot_table>'},
lootsrcloot = {'<loot_table>'},
Line 137: Line 140:
commandtell = { redirect = 'commandmsg' },
commandtell = { redirect = 'commandmsg' },
commandw = { redirect = 'commandmsg' },
commandw = { redirect = 'commandmsg' },
commandparticle = { {prtcl={'dust','block','falling_dust','item','<name>'}}, "[<''x''>]", "[<''y''>]", "[<''z''>]", "[<''xd''>]", "[<''yd''>]", "[<''zd''>]", "<speed>", "<count>", '[force|normal]', '[<viewers>]' },
commandparticle = { {particle={'dust','dust_color_transition','block','falling_dust','item','vibration','<name>'}}, "[<''x''>]", "[<''y''>]", "[<''z''>]", "[<''xd''>]", "[<''yd''>]", "[<''zd''>]", "<speed>", "<count>", '[force|normal]', '[<viewers>]' },
prtcldust = {"<''r''>","<''g''>","<''b''>","<''size''>"},
particledust = {"<''r''>","<''g''>","<''b''>","<''size''>"},
prtclblock = {"<''block''>"},
particledust_color_transition = {"<''r1''>","<''g1''>","<''b1''>","<''size''>","<''r2''>","<''g2''>","<''b2''>"},
prtclfalling_dust = {"<''block''>"},
particleblock = {"<''block''>"},
prtclitem = {"<''item''>"},
particlefalling_dust = {"<''block''>"},
particleitem = {"<''item''>"},
particlevibration = {"<''x1''>","<''y1''>","<''z1''>","<''x2''>","<''y2''>","<''z2''>","<''duration''>"},
commandplaysound = { "<sound>", "<''source''>", "<targets>", "[<''x''>]", "[<''y''>]", "[<''z''>]", "[<volume>]", "[<pitch>]", "[<minVolume>]" },
commandplaysound = { "<sound>", "<''source''>", "<targets>", "[<''x''>]", "[<''y''>]", "[<''z''>]", "[<volume>]", "[<pitch>]", "[<minVolume>]" },
commandpublish = {'[<port>]'},
commandpublish = {'[<port>]'},
commandrecipe = {'(give|take)', '<targets>', {{'*','<recipe>'}}},
commandrecipe = {'(give|take)', '<targets>', {{'*','<recipe>'}}},
['commandsave-all'] = {'[flush]'},
['commandsave-all'] = {'[flush]'},
--replaceitem = { "[block|entity]", "[<''x''> <''y''> <''z''>|<''selector''>]", "<''slot''>", "<''item''>", { "<''amount''>", "<''data''>", "<''dataTag''>" } },
--commandreplaceitem = { "[block|entity]", "[<''x''> <''y''> <''z''>|<''selector''>]", "<''slot''>", "<''item''>", { "<''amount''>", "<''data''>", "<''dataTag''>" } },
commanditem = { {item={'modify','replace'}} },
    itemmodify = { {itemtarget={'block','entity'}}, '<slot>', '<modifier>'},
    itemreplace = { {itemtarget={'block','entity'}}, '<slot>', {itemreplace={'with','from'}} },
        itemreplacewith = {'<item>', '[<count>]'},
        itemreplacefrom = {{itemsource={'block','entity'}}, '<sourceSlot>', '[<modifier>]'},
    itemtargetblock = { '<pos>' },
    itemtargetentity = { '<targets>' },
    itemsourceblock = { '<sourcePos>' },
    itemsourceentity = { '<sourceTarget>' },
commandsay = { "<message>" },
commandsay = { "<message>" },
commandschedule = { {sch={'function','clear'}} },
commandschedule = { {schedule={'function','clear'}} },
     schfunction = { "<function>", "<time>", "[append|replace]"},
     schedulefunction = { '<function>', '<time>', '[append|replace]'},
     schclear = { '<function>' },
     scheduleclear = { '<function>' },
     commandscoreboard = {{scb={'objectives','players'}}},
     commandscoreboard = {{scoreboard={'objectives','players'}}},
     scbobjectives = {{scbo={'add','list','modify','remove','setdisplay'}}},
     scoreboardobjectives = {{scoreboardobjectives={'add','list','modify','remove','setdisplay'}}},
     scboadd = { '<objective>','<criterion>','[<displayName>]'},
     scoreboardobjectivesadd = { '<objective>','<criterion>','[<displayName>]'},
     scbomodify = {'<objective>',{scbom={'displayname','rendertype'}}},
     scoreboardobjectivesmodify = {'<objective>',{scoreboardobjectivesmodify={'displayname','rendertype'}}},
     scbomdisplayname = {'<displayName>'},
     scoreboardobjectivesmodifydisplayname = {'<displayName>'},
     scbomrendertype = {'(hearts|integer)'},
     scoreboardobjectivesmodifyrendertype = {'(hearts|integer)'},
     scboremove = {'<objective>'},
     scoreboardobjectivesremove = {'<objective>'},
     scbosetdisplay = {'<slot>','[<objective>]'},
     scoreboardobjectivessetdisplay = {'<slot>','[<objective>]'},
     scbplayers = {{scbp={'add','enable','get','list','operation','remove','reset','set'}}},
     scoreboardplayers = {{scoreboardplayers={'add','enable','get','list','operation','remove','reset','set'}}},
     scbpadd = {'<targets>', '<objective>', '<score>'},
     scoreboardplayersadd = {'<targets>', '<objective>', '<score>'},
     scbpenable = {'<targets>','<objective>'},
     scoreboardplayersenable = {'<targets>','<objective>'},
     scbpget = {'<target>', '<objective>'},
     scoreboardplayersget = {'<target>', '<objective>'},
     scbplist = {'[<target>]'},
     scoreboardplayerslist = {'[<target>]'},
     scbpoperation = {'<targets>', '<targetObjective>', '<operation>', '<source>', '<sourceObjective>'},
     scoreboardplayersoperation = {'<targets>', '<targetObjective>', '<operation>', '<source>', '<sourceObjective>'},
     scbpremove = {'<targets>', '<objective>', '<score>'},
     scoreboardplayersremove = {'<targets>', '<objective>', '<score>'},
     scbpreset = { '<targets>', '[<objective>]'},
     scoreboardplayersreset = { '<targets>', '[<objective>]'},
     scbpset = { '<targets>', '<objective>', '<score>'},
     scoreboardplayersset = { '<targets>', '<objective>', '<score>'},
commandsetblock = { "<''x''>", "<''y''>", "<''z''>", "<block>", '[destroy|keep|replace]' },
commandsetblock = { "<''x''>", "<''y''>", "<''z''>", "<block>", '[destroy|keep|replace]' },
commandsetidletimeout = { "<minutes>" },
commandsetidletimeout = { "<minutes>" },
Line 173: Line 187:
commandspawnpoint = { "[<targets>]", "[<''x''>]", "[<''y''>]", "[<''z''>]", '[<angle>]' },
commandspawnpoint = { "[<targets>]", "[<''x''>]", "[<''y''>]", "[<''z''>]", '[<angle>]' },
commandspectate = {'<target>', '[<player>]'},
commandspectate = {'<target>', '[<player>]'},
commandspreadplayers = { "<''x''>", "<''z''>", "<spreadDistance>", "<maxRange>", {sp={'under','<respectTeams>'}}, '<targets>'},
commandspreadplayers = { "<''x''>", "<''z''>", "<spreadDistance>", "<maxRange>", {spreadplayers={'under','<respectTeams>'}}, '<targets>'},
spunder = {'<maxHeight>','<respectTeams>'},
spreadplayersunder = {'<maxHeight>','<respectTeams>'},
commandstopsound = {"<targets>", "[<''source''>]", "<sound>"},
commandstopsound = {"<targets>", "[<''source''>]", "<sound>"},
commandsummon = { "<entity>", "[<''x''>]", "[<''y''>]", "[<''z''>]", "[<nbt>]" },
commandsummon = { "<entity>", "[<''x''>]", "[<''y''>]", "[<''z''>]", "[<nbt>]" },
commandtag = {'targets',{tag = {'add','list','remove'}}},
commandtag = {'<targets>',{tag = {'add','list','remove'}}},
tagadd = {'<name>'},
tagadd = {'<name>'},
tagremove = {'<name>'},
tagremove = {'<name>'},
Line 210: Line 224:
commandtrigger = { "<objective>", "[add|set]", "[<value>]" },
commandtrigger = { "<objective>", "[add|set]", "[<value>]" },
commandweather = { "[clear|rain|thunder]", "[<duration>]" },
commandweather = { "[clear|rain|thunder]", "[<duration>]" },
commandwhitelist = { {whtlst = {'add','list','off','on','reload','remove'} }},
commandwhitelist = { {whitelist = {'add','list','off','on','reload','remove'} }},
whtlstadd = {'<targets>'},
whitelistadd = {'<targets>'},
whtlstremove = {'<targets>'},
whitelistremove = {'<targets>'},
commandworldborder = { {wb = {'add','center','damage','get','set','warning',''}}},
commandworldborder = { {worldborder = {'add','center','damage','get','set','warning',''}}},
wbadd = {'<distance>','[<time>]'},
worldborderadd = {'<distance>','[<time>]'},
wbcenter = {"<''x''>", "<''z''>"},
worldbordercenter = {"<''x''>", "<''z''>"},
wbdamage = {{wbd = {'amount','buffer'}}},
worldborderdamage = {{worldborderdamage = {'amount','buffer'}}},
wbdamount = {'<damagePerBlock>'},
worldborderdamage = {'<damagePerBlock>'},
wbdbuffer = {'<distance>'},
worldborderdamage = {'<distance>'},
wbset = {'<distance>','[<time>]'},
worldborderset = {'<distance>','[<time>]'},
wbwarning = {{wbw={'distance','time'}}},
worldborderwarning = {{worldborderwarning={'distance','time'}}},
wbwdistance = { '<distance>' },
worldborderwarningdistance = { '<distance>' },
wbwtime = { '<time>' }
worldborderwarningtime = { '<time>' }
}
}

Latest revision as of 09:32, 16 July 2021

Documentation for this module may be created at Module:Command/Syntax/doc

return {
	command = {{command={'advancement','attribute','ban','ban-ip','banlist','bossbar','clear','clone','data','datapack','debug','perf','defaultgamemode','deop',
						'difficulty','effect','enchant','experience','xp','fill','forceload','function','gamemode','gamerule','give',
						'help','kick','kill','list','locate','locatebiome','loot','me','msg','tell','w','op','pardon','pardon-ip',
						'particle','playsound','publish','recipe','reload','save-all','save-off','save-on','item','say','schedule','scoreboard', 'seed',
						'setblock','setidletimeout','setworldspawn','spawnpoint','spectate','spreadplayers','stop','stopsound','summon','tag','team','tm','teammsg',
						'teleport','tp','tellraw','time','title','trigger','whether','whitelist','worldboard','execute'
						
	}}},
	commandexecute = {{execute={'align','anchored','as','at','facing','in','positioned','rotated','if','unless','store','run'}}},
		executealign = {'<axes>', redirect='commandexecute'},
		executeanchored = {'<anchor>', redirect='commandexecute'},
		executeas = {'<targets>', redirect='commandexecute'},
		executeat = {'<targets>', redirect='commandexecute'},
		executefacing = { {executesub = {"<''x''>",'entity'}},redirect='commandexecute'},
			executesubentity = {'<targets>','<anchor>'},
			["executesub<''x''>"] = {"<''y''>","<''z''>"},
		executein = {'<dimension>', redirect='commandexecute'},
		executepositioned = { {executesub = {"<''x''>",'as'}},redirect='commandexecute'},
			executesubas = {'<targets>'},
		executerotated = { {executesub = {"<''yaw''>",'as'}},redirect='commandexecute'},
			["executesub<''yaw''>"] = {"<''pitch''>"},
		executestore = {'(result|success)',{executestore = {'block','bossbar','entity','score','storage'}},redirect='commandexecute'},
			executestoreblock={"<''x''>","<''y''>","<''z''>",'<path>','<type>','<scale>' },
			executestorebossbar={'<id>','(max|value)'},
			executestoreentity={"<target>",'<path>','<type>','<scale>' },
			executestorescore={'<targets>','<objective>'},
			executestorestorage={"<target>",'<path>','<type>','<scale>' },
		executeif = {{executeif={'block','blocks','data','entity','predicate','score'}},redirect='commandexecute'},
		executeunless = {{executeif={'block','blocks','data','entity','predicate','score'}},redirect='commandexecute'},
			executeifblock = {"<''x''>","<''y''>","<''z''>",'<block>'},
			executeifblocks = {"<''x1''>","<''y1''>","<''z1''>","<''x2''>","<''y2''>","<''z2''>","<''x3''>","<''y3''>","<''z3''>", '(all|masked)'},
			executeifdata = {{executeifdata = {'block','entity','storage'}},'<path>'},
				executeifdatablock={"<''x''>","<''y''>","<''z''>"},
				executeifdataentity={'<source>'},
				executeifdatastorage={'<source>'},
			executeifentity = {'<entities>'},
			executeifpredicate = {'<predicate>'},
			executeifscore = {'<target>','<targetObjective>',{executeifscore={'matches','(<|<=|=|>|>=)'}}},
				['executeifscore(<|<=|=|>|>=)']={'<source>','<sourceObjective>'},
				executeifscorematches = {'<range>'},
		executerun = {redirect='command'},
	commandhelp = {'[<command>]'},
	commandadvancement = { '(grant|revoke)', '<targets>', {advancement= { 'everything', 'from', 'through', 'until', 'only' }} },
		advancementfrom = {'<advancement>'},
		advancementthrough = {'<advancement>'},
		advancementuntil = {'<advancement>'},
		advancementonly = {'<advancement>', '[<criterion>]'},
	commandattribute = {'<target>', '<attribute>', {attribute={'get', 'base', 'modifier'}}},
		attributeget = {'[<scale>]'},
		attributebase = {{attributebase = {'get','set'}}},
			attributebaseget = {'[<scale>]'},
			attributebaseset = {'<value>'},
		attributemodifier = {{attributemodifier = {'add','remove','value'}}},
			attributemodifieradd = {'<uuid>','<name>','<value>','(add|multiply|multiply_base)'},
			attributemodifierremove = {'<uuid>'},
			attributemodifiervalue = {'get','<uuid>','[<scale>]'},
	['commandban-ip'] = {"<target>", "[<reason>]"},
	commandkick = { "<target>", "[<reason>]" },
	commandban = { "<targets>", "[<reason>]" },
	commandbanlist = { "[ips|players]" },
	commandbossbar = {{bossbar={'add','get','list','remove','set'}}},
		bossbaradd = {'<id>','<name>'},
		bossbarget = {'<id>','(max|players|value|visible)'},
		bossbarremove = {'<id>'},
		bossbarset = {'<id>',{bossbarset={'color','max','name','players','style','value','visible'}}},
			bossbarsetcolor = {'(blue|green|pink|purple|red|white|yellow)'},
			bossbarsetmax = {'<max>'},
			bossbarsetname = {'<name>'},
			bossbarsetplayers = {'[<targets>]'},
			bossbarsetstyle = {'(notched_6|notched_10|notched_12|notched_20|progress)'},
			bossbarsetvalue = {'<value>'},
			bossbarsetvisible = {'<visible>'},
	commandclear = { "[<targets>]", "[<item>]", "[<maxCount>]" },
	commandclone = { "<''x1''>", "<''y1''>", "<''z1''>", "<''x2''>", "<''y2''>", "<''z2''>", "<''x3''>", "<''y3''>", "<''z3''>", {clone={ 'replace','masked','filtered' }}, '[force|move|normal]' },
		clonefiltered = {'<filter>'},
	commanddata = {{data={'get','merge','modify','remove'}}},
		dataget = {{data={'block','entity','storage'}},'[<path>]','[<scale>]'},
		datamerge = {{data={'block','entity','storage'}},'<nbt>'},
		dataremove = {{data={'block','entity','storage'}},'<path>'},
		datamodify = {{data={'block','entity','storage'}},'<targetPath>',{datamodify={'append','insert','merge','prepend','set'}},{datasrc={'from','value'}}},
			datamodifyinsert = {'<index>'},
		datasrcfrom = {{data={'block','entity','storage'}},'[<sourcePath>]'},
		datasrcvalue = {'<value>'},
		datablock = {"<''x''>","<''y''>","<''z''>"},
		dataentity = {'<entity>'},
		datastorage = {'<storage>'},
	commanddatapack = {{datapack={'disable','enable','list'}}},
		datapackdisable = {'<name>'},
		datapackenable = {'<name>',{datapackenable={'first','last','before','after'}}},
		datapacklist = {'[available|enabled]'},
		datapackenablebefore = {'<existing>'},
		datapackenableafter = {'<existing>'},
	commanddebug = { {debug={'start','stop','function'}} },
		debugfunction = {'<name>'},
	commandperf = { '(start|stop)' },
	commanddefaultgamemode = { '(survival|creative|adventure|spectator)' },
	commanddeop = {"<targets>"},
	commandop = {"<targets>"},
	commandpardon = { "<targets>" },
	['commandpardon-ip'] = { "<target>" },
	commanddifficulty = { '[easy|hard|normal|peaceful]' },
	commandeffect = { {effect={'clear','give'}} },
		effectclear = {'[<targets>]','[<effect>]'},
		effectgive = { '<targets>','<effect>','[<seconds>]','[<amplifier>]','[<hideParticles>]' },
	commandenchant = { "<targets>", "<enchantment>", "[<level>]" },
	commandexperience = { {xp = {'add','set','query'}} },
		commandxp = { redirect='commandexperience' },
		xpadd = {'<targets>','<amount>','[levels|points]'},
		xpset = {'<targets>','<amount>','[levels|points]'},
		xpquery = {'<targets>','(levels|points)'},
	commandfill = { "<''x1''>", "<''y1''>", "<''z1''>", "<''x2''>", "<''y2''>", "<''z2''>", "<block>",{ fill = { 'destroy','hollow','keep','outline','replace'} }},
		fillreplace = { '[<filter>]' },
	commandforceload = {{ forceload = {'add','remove','query'} }},
		forceloadadd = {"<''x1''>","<''z1''>","[<''x2''>]","[<''z2''>]"},
		forceloadremove = {{forceloadremove = {'all',"<''x1''>"}}},
			["forceloadremove<''x1''>"] = {"<''z1''>","[<''x2''>]","[<''z2''>]"},
		forceloadquery = {"[<''x''>]","[<''z''>]"},
	commandfunction = { "<name>" },
	commandgamemode = { '(adventure|creative|spectator|survival)','[<target>]' },
	commandgamerule = { "<''rule name''>", "[<value>]" },
	commandgive = { "<target>", "<item>", "[<count>]" },
	commandkill = { "[<targets>]" },
	commandlist = {'[uuid]'},
	commandlocate = {"<''StructureType''>"},
	commandlocatebiome = {"<''biome ID''>"},
	commandloot = {{loottarget = {'spawn','replace','insert','give'}}, {lootsrc = {'fish','loot','kill','mine'}}},
		loottargetspawn = {"<''x''>","<''y''>","<''z''>"},
		loottargetreplace = {{loottarget = {'entity','block'}}, '<slot>','[<count>]'},
		loottargetentity = {'<entities>'},
		loottargetblock = {"<''x''>","<''y''>","<''z''>"},
		loottargetinsert = {"<''x''>","<''y''>","<''z''>"},
		loottargetgive = {'<players>'},
		lootsrcfish = {'<loot_table>',"<''x''>","<''y''>","<''z''>",'[<tool>|mainhand|offhand]'},
		lootsrcloot = {'<loot_table>'},
		lootsrckill = {'<target>'},
		lootsrcmine = {"<''x''>","<''y''>","<''z''>",'[<tool>|mainhand|offhand]'},
	commandme = { "<action>" },
	commandmsg = { "<targets>", "<message>" },
		commandtell = { redirect = 'commandmsg' },
		commandw = { redirect = 'commandmsg' },
	commandparticle = { {particle={'dust','dust_color_transition','block','falling_dust','item','vibration','<name>'}}, "[<''x''>]", "[<''y''>]", "[<''z''>]", "[<''xd''>]", "[<''yd''>]", "[<''zd''>]", "<speed>", "<count>", '[force|normal]', '[<viewers>]' },
		particledust = {"<''r''>","<''g''>","<''b''>","<''size''>"},
		particledust_color_transition = {"<''r1''>","<''g1''>","<''b1''>","<''size''>","<''r2''>","<''g2''>","<''b2''>"},
		particleblock = {"<''block''>"},
		particlefalling_dust = {"<''block''>"},
		particleitem = {"<''item''>"},
		particlevibration = {"<''x1''>","<''y1''>","<''z1''>","<''x2''>","<''y2''>","<''z2''>","<''duration''>"},
	commandplaysound = { "<sound>", "<''source''>", "<targets>", "[<''x''>]", "[<''y''>]", "[<''z''>]", "[<volume>]", "[<pitch>]", "[<minVolume>]" },
	commandpublish = {'[<port>]'},
	commandrecipe = {'(give|take)', '<targets>', {{'*','<recipe>'}}},
	['commandsave-all'] = {'[flush]'},
	--commandreplaceitem = { "[block|entity]", "[<''x''> <''y''> <''z''>|<''selector''>]", "<''slot''>", "<''item''>", { "<''amount''>", "<''data''>", "<''dataTag''>" } },
	commanditem = { {item={'modify','replace'}} },
    	itemmodify = { {itemtarget={'block','entity'}}, '<slot>', '<modifier>'},
    	itemreplace = { {itemtarget={'block','entity'}}, '<slot>', {itemreplace={'with','from'}} },
    	    itemreplacewith = {'<item>', '[<count>]'},
    	    itemreplacefrom = {{itemsource={'block','entity'}}, '<sourceSlot>', '[<modifier>]'},
    	itemtargetblock = { '<pos>' },
    	itemtargetentity = { '<targets>' },
    	itemsourceblock = { '<sourcePos>' },
    	itemsourceentity = { '<sourceTarget>' },
	commandsay = { "<message>" },
	commandschedule = { {schedule={'function','clear'}} },
    	schedulefunction = { '<function>', '<time>', '[append|replace]'},
    	scheduleclear = { '<function>' },
    commandscoreboard = {{scoreboard={'objectives','players'}}},
    	scoreboardobjectives = {{scoreboardobjectives={'add','list','modify','remove','setdisplay'}}},
    		scoreboardobjectivesadd = { '<objective>','<criterion>','[<displayName>]'},
    		scoreboardobjectivesmodify = {'<objective>',{scoreboardobjectivesmodify={'displayname','rendertype'}}},
    			scoreboardobjectivesmodifydisplayname = {'<displayName>'},
    			scoreboardobjectivesmodifyrendertype = {'(hearts|integer)'},
    		scoreboardobjectivesremove = {'<objective>'},
    		scoreboardobjectivessetdisplay = {'<slot>','[<objective>]'},
    	scoreboardplayers = {{scoreboardplayers={'add','enable','get','list','operation','remove','reset','set'}}},
    		scoreboardplayersadd = {'<targets>', '<objective>', '<score>'},
    		scoreboardplayersenable = {'<targets>','<objective>'},
    		scoreboardplayersget = {'<target>', '<objective>'},
    		scoreboardplayerslist = {'[<target>]'},
    		scoreboardplayersoperation = {'<targets>', '<targetObjective>', '<operation>', '<source>', '<sourceObjective>'},
    		scoreboardplayersremove = {'<targets>', '<objective>', '<score>'},
    		scoreboardplayersreset = { '<targets>', '[<objective>]'},
    		scoreboardplayersset = { '<targets>', '<objective>', '<score>'},
	commandsetblock = { "<''x''>", "<''y''>", "<''z''>", "<block>", '[destroy|keep|replace]' },
	commandsetidletimeout = { "<minutes>" },
	commandsetworldspawn = { "<''x''>", "<''y''>", "<''z''>", '<angle>' },
	commandspawnpoint = { "[<targets>]", "[<''x''>]", "[<''y''>]", "[<''z''>]", '[<angle>]' },
	commandspectate = {'<target>', '[<player>]'},
	commandspreadplayers = { "<''x''>", "<''z''>", "<spreadDistance>", "<maxRange>", {spreadplayers={'under','<respectTeams>'}}, '<targets>'},
		spreadplayersunder = {'<maxHeight>','<respectTeams>'},
	commandstopsound = {"<targets>", "[<''source''>]", "<sound>"},
	commandsummon = { "<entity>", "[<''x''>]", "[<''y''>]", "[<''z''>]", "[<nbt>]" },
	commandtag = {'<targets>',{tag = {'add','list','remove'}}},
		tagadd = {'<name>'},
		tagremove = {'<name>'},
	commandteam = {{team = {'add','empty','join','leave','list','modify','remove'}}},
		teamadd = {'<team>','[<displayName>]'},
		teamempty = {'<team>'},
		teamjoin = {'<team>','[<members>]'},
		teamleave = {'<members>'},
		teamlist = {'[<team>]'},
		teammodify = {'<team>','<option>','<value>'},
		teamremove = {'<team>'},
	commandteammsg = {'<message>'},
		commandtm = {redirect = 'commandteammsg'},
	commandtellraw = { "<targets>", "<message>" },
	commandtime = {{ time = { 'add','query','set' } }},
		timeadd = {'<time>'},
		timequery = {'(daytime|gametime|day)'},
		timeset = {"(<''TimeSpec''>|<time>)"},
	commandtitle = { "<targets>", {title = { 'clear','reset','title','subtitle','actionbar','times'}}},
		titletitle = {'<title>'},
		titlesubtitle = {'<title>'},
		titleactionbar = {'<title>'},
		titletimes = {'<fadeIn>','<stay>','<fadeOut>'},
	commandteleport = {{tp2={'<targets>','<destination>',"<''x''>"}}},
		['tp2<targets>'] = {{tp = {"<''x''>",'<destination>'}}},
		["tp<''x''>"] = {"<''y''>","<''z''>",{tp={'facing',"<''yRot''>"}}},
		tpfacing = {{tp2 = {'entity',"<''x''>"}}},
		tp2entity = {'<facingEntity>','[<facingAnchor>]'},
		["tp2<''x''>"] = {"<''y''>","<''z''>"},
		["tp<''yRot''>"] = {"<''xRot''>"},
		commandtp = {redirect='commandteleport'},
	commandtrigger = { "<objective>", "[add|set]", "[<value>]" },
	commandweather = { "[clear|rain|thunder]", "[<duration>]" },
	commandwhitelist = { {whitelist = {'add','list','off','on','reload','remove'} }},
		whitelistadd = {'<targets>'},
		whitelistremove = {'<targets>'},
	commandworldborder = { {worldborder = {'add','center','damage','get','set','warning',''}}},
		worldborderadd = {'<distance>','[<time>]'},
		worldbordercenter = {"<''x''>", "<''z''>"},
		worldborderdamage = {{worldborderdamage = {'amount','buffer'}}},
			worldborderdamage = {'<damagePerBlock>'},
			worldborderdamage = {'<distance>'},
		worldborderset = {'<distance>','[<time>]'},
		worldborderwarning = {{worldborderwarning={'distance','time'}}},
			worldborderwarningdistance = { '<distance>' },
			worldborderwarningtime = { '<time>' }
}