Module:Command/Syntax

From Box of Rocks WIKI
< Module:Command
Revision as of 15:09, 13 May 2021 by BoxWiki (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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','defaultgamemode','deop',
						'difficulty','effect','enchant','experience','xp','fill','forceload','function','gamemode','gamerule','give','help','kick','kill','help','list','locate','locatebiome',
						'loot','me','msg','tell','w','op','pardon','pardon-ip','particle','playsound','publish','recipe','reload','save-all','save-off','save-on','say','schedule','scorboard', '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 = {{exe={'align','anchored','as','at','facing','in','positioned','rotated','if','unless','store','run'}}},
		exealign = {'<axes>', redirect='commandexecute'},
		exeanchored = {'<anchor>', redirect='commandexecute'},
		exeas = {'<targets>', redirect='commandexecute'},
		exeat = {'<targets>', redirect='commandexecute'},
		exefacing = { {exefac = {"<''x''>",'entity'}},redirect='commandexecute'},
			exefacentity = {'<targets>','<anchor>'},
			["exefac<''x''>"] = {"<''y''>","<''z''>"},
		exein = {'<dimension>', redirect='commandexecute'},
		exepositionef = { {exefac = {"<''x''>",'as'}},redirect='commandexecute'},
			exefacas = {'<targets>'},
		exerotated = { {exefac = {"<''yaw''>",'as'}},redirect='commandexecute'},
			["exefac<''yaw''>"] = {"<''pitch''>"},
		exestore = {'(result|success)',{exestr = {'block','bossbar','entity','score','storage'}},redirect='commandexecute'},
			exestrblock={"<''x''>","<''y''>","<''z''>",'<path>','<type>','<scale>' },
			exestrbossbar={'<id>','(max|value)'},
			exestrentity={"<target>",'<path>','<type>','<scale>' },
			exestrscore={'<targets>','<objective>'},
			exestrstorage={"<target>",'<path>','<type>','<scale>' },
		exeif = {{exeif={'block','blocks','data','entity','predicate','score'}},redirect='commandexecute'},
		exeunless = {{exeif={'block','blocks','data','entity','predicate','score'}},redirect='commandexecute'},
			exeifblock = {"<''x''>","<''y''>","<''z''>",'<block>'},
			exeifblocks = {"<''x1''>","<''y1''>","<''z1''>","<''x2''>","<''y2''>","<''z2''>","<''x3''>","<''y3''>","<''z3''>", '(all|masked)'},
			exeifdata = {{exeifdata = {'block','entity','storage'}},'<path>'},
				exeifdatablock={"<''x''>","<''y''>","<''z''>"},
				exeifdataentity={'<source>'},
				exeifdatastorage={'<source>'},
			exeifentity = {'<entities>'},
			exeifpredicate = {'<predicate>'},
			exeifscore = {'<target>','<targetObjective>',{exeifscore={'matches','(<|<=|=|>|>=)'}}},
				['exeifscore(<|<=|=|>|>=)']={'<source>','<sourceObjective>'},
				exeifscorematches = {'<range>'},
		exerun = {redirect='command'},
	commandhelp = {'[<command>]'},
	commandadvancement = { '(grant|revoke)', '<targets>', {adv= { 'everything', 'from', 'through', 'until', 'only' }} },
		advfrom = {'<advancement>'},
		advthrough = {'<advancement>'},
		advuntil = {'<advancement>'},
		advonly = {'<advancement>', '[<criterion>]'},
	commandattribute = {'<target>', '<attribute>', {attr={'get', 'base', 'modifier'}}},
		attrget = {'[<scale>]'},
		attrbase = {{attrbase = {'get','set'}}},
			attrbaseget = {'[<scale>]'},
			attrbaseset = {'<value>'},
		attrmodifier = {{attrmod = {'add','remove','value'}}},
			attrmodadd = {'<uuid>','<name>','<value>','(add|multiply|multiply_base)'},
			attrmodremove = {'<uuid>'},
			attrmodvalue = {'get','<uuid>','[<scale>]'},
	['commandban-ip'] = {"<target>", "[<reason>]"},
	commandkick = { "<target>", "[<reason>]" },
	commandban = { "<targets>", "[<reason>]" },
	commandbanlist = { "[ips|players]" },
	commandbossbar = {{boss={'add','get','list','remove','set'}}},
		bossadd = {'<id>','<name>'},
		bossget = {'<id>','(max|players|value|visible)'},
		bossremove = {'<id>'},
		bossset = {'<id>',{bossset={'color','max','name','players','style','value','visible'}}},
			bosssetcolor = {'(blue|green|pink|purple|red|white|yellow)'},
			bosssetmax = {'<max>'},
			bosssetname = {'<name>'},
			bosssetplayers = {'[<targets>]'},
			bosssetstyle = {'(notched_6|notched_10|notched_12|notched_20|progress)'},
			bosssetvalue = {'<value>'},
			bosssetvisible = {'<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>',{datamod={'append','insert','merge','prepend','set'}},{datasrc={'from','value'}}},
			datamodinsert = {'<index>'},
		datasrcfrom = {{data={'block','entity','storage'}},'[<sourcePath>]'},
		datasrcvalue = {'<value>'},
		datablock = {"<''x''>","<''y''>","<''z''>"},
		dataentity = {'<entity>'},
		datastorage = {'<storage>'},
	commanddatapack = {{dp={'disable','enable','list'}}},
		dpdisable = {'<name>'},
		dpenable = {'<name>',{dpen={'first','last','before','after'}}},
		dplist = {'[available|enabled]'},
		dpenbefore = {'<existing>'},
		dpenafter = {'<existing>'},
	commanddebug = { "(start|stop|report)" },
	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 = {{ fc = {'add','remove','query'} }},
		fcadd = {"<''x1''>","<''z1''>","[<''x2''>]","[<''z2''>]"},
		fcremove = {{fcrmv = {'all',"<''x1''>"}}},
			["fcrmv<''x1''>"] = {"<''z1''>","[<''x2''>]","[<''z2''>]"},
		fcquery = {"[<''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 = {{loottar = {'spawn','replace','insert','give'}}, {lootsrc = {'fish','loot','kill','mine'}}},
		loottarspawn = {"<''x''>","<''y''>","<''z''>"},
		loottarreplace = {{loottar = {'entity','block'}}, '<slot>','[<count>]'},
		loottarentity = {'<entities>'},
		loottarblock = {"<''x''>","<''y''>","<''z''>"},
		loottarinsert = {"<''x''>","<''y''>","<''z''>"},
		loottargive = {'<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 = { {prtcl={'dust','block','falling_dust','item','<name>'}}, "[<''x''>]", "[<''y''>]", "[<''z''>]", "[<''xd''>]", "[<''yd''>]", "[<''zd''>]", "<speed>", "<count>", '[force|normal]', '[<viewers>]' },
		prtcldust = {"<''r''>","<''g''>","<''b''>","<''size''>"},
		prtclblock = {"<''block''>"},
		prtclfalling_dust = {"<''block''>"},
		prtclitem = {"<''item''>"},
	commandplaysound = { "<sound>", "<''source''>", "<targets>", "[<''x''>]", "[<''y''>]", "[<''z''>]", "[<volume>]", "[<pitch>]", "[<minVolume>]" },
	commandpublish = {'[<port>]'},
	commandrecipe = {'(give|take)', '<targets>', {{'*','<recipe>'}}},
	['commandsave-all'] = {'[flush]'},
	--replaceitem = { "[block|entity]", "[<''x''> <''y''> <''z''>|<''selector''>]", "<''slot''>", "<''item''>", { "<''amount''>", "<''data''>", "<''dataTag''>" } },
	commandsay = { "<message>" },
	commandschedule = { {sch={'function','clear'}} },
    	schfunction = { "<function>", "<time>", "[append|replace]"},
    	schclear = { '<function>' },
    commandscoreboard = {{scb={'objectives','players'}}},
    	scbobjectives = {{scbo={'add','list','modify','remove','setdisplay'}}},
    		scboadd = { '<objective>','<criterion>','[<displayName>]'},
    		scbomodify = {'<objective>',{scbom={'displayname','rendertype'}}},
    			scbomdisplayname = {'<displayName>'},
    			scbomrendertype = {'(hearts|integer)'},
    		scboremove = {'<objective>'},
    		scbosetdisplay = {'<slot>','[<objective>]'},
    	scbplayers = {{scbp={'add','enable','get','list','operation','remove','reset','set'}}},
    		scbpadd = {'<targets>', '<objective>', '<score>'},
    		scbpenable = {'<targets>','<objective>'},
    		scbpget = {'<target>', '<objective>'},
    		scbplist = {'[<target>]'},
    		scbpoperation = {'<targets>', '<targetObjective>', '<operation>', '<source>', '<sourceObjective>'},
    		scbpremove = {'<targets>', '<objective>', '<score>'},
    		scbpreset = { '<targets>', '[<objective>]'},
    		scbpset = { '<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>", {sp={'under','<respectTeams>'}}, '<targets>'},
		spunder = {'<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 = { {whtlst = {'add','list','off','on','reload','remove'} }},
		whtlstadd = {'<targets>'},
		whtlstremove = {'<targets>'},
	commandworldborder = { {wb = {'add','center','damage','get','set','warning',''}}},
		wbadd = {'<distance>','[<time>]'},
		wbcenter = {"<''x''>", "<''z''>"},
		wbdamage = {{wbd = {'amount','buffer'}}},
			wbdamount = {'<damagePerBlock>'},
			wbdbuffer = {'<distance>'},
		wbset = {'<distance>','[<time>]'},
		wbwarning = {{wbw={'distance','time'}}},
			wbwdistance = { '<distance>' },
			wbwtime = { '<time>' }
}