Module:Command/Syntax: Difference between revisions

From Modded Wiki
Jump to navigation Jump to search
Created page with "return { ['?'] = 'help', help = { "([<''page''>|<''command''>])" }, ban = 'kick', kick = { "<''player''>", "(<''reason''>)" }, ['ban-ip'] = 'pardon-ip', ['pardon-ip'] = ..."
 
Use sub-tables for optional commands
Line 1: Line 1:
return {
return {
['?'] = 'help',
['?'] = 'help',
help = { "([<''page''>|<''command''>])" },
help = { { "[<''page''>|<''command''>]" } },
ban = 'kick',
ban = 'kick',
kick = { "<''player''>", "(<''reason''>)" },
kick = { "<''player''>", { "<''reason''>" } },
['ban-ip'] = 'pardon-ip',
['ban-ip'] = 'pardon-ip',
['pardon-ip'] = { "<''ip''>" },
['pardon-ip'] = { "<''ip''>" },
banlist = { "([ips])" },
banlist = { { "[ips]" } },
clear = { "(<''player''> <''item''> <''data-value''>)" },
clear = { { "<''player''>", "<''item''>", "<''data-value''>" } },
debug = { "<''operation'':[start|stop]>" },
debug = { "<''operation'':[start|stop]>" },
defaultgamemode = { "<''mode'':" .. '[<abbr title="Adventure">0</abbr>|<abbr title="Creative">1</abbr>|<abbr title="Survival">2</abbr>]>' },
defaultgamemode = { "<''mode'':" .. '[<abbr title="Adventure">0</abbr>|<abbr title="Creative">1</abbr>|<abbr title="Survival">2</abbr>]>' },
Line 14: Line 14:
pardon = { "<''player''>" },
pardon = { "<''player''>" },
difficulty = { "<''difficulty'':" .. '[<abbr title="Peaceful">0</abbr>|<abbr title="Easy">1</abbr>|<abbr title="Normal">2</abbr>|<abbr title="Hard">3</abbr>]>' },
difficulty = { "<''difficulty'':" .. '[<abbr title="Peaceful">0</abbr>|<abbr title="Easy">1</abbr>|<abbr title="Normal">2</abbr>|<abbr title="Hard">3</abbr>]>' },
gamemode = { "<''mode'':" .. '[<abbr title="Adventure">0</abbr>|<abbr title="Creative">1</abbr>|<abbr title="Survival">2</abbr>]>', "(<''player''>)" },
gamemode = { "<''mode'':" .. '[<abbr title="Adventure">0</abbr>|<abbr title="Creative">1</abbr>|<abbr title="Survival">2</abbr>]>', { "<''player''>" } },
gamerule = { "<''rule'':[commandBlockOutput|doFireTick|doMobLoot|doMobSpawning|doTileDrops|keepInventory|mobGriefing]>", "(<''enabled'':[true|false]>)" },
gamerule = { "<''rule'':[commandBlockOutput|doFireTick|doMobLoot|doMobSpawning|doTileDrops|keepInventory|mobGriefing]>", { "<''enabled'':[true|false]>" } },
give = { "<''player''>", "<''data-value''>", "<''amount''>", "(<''damage-value''>)" },
give = { "<''player''>", "<''data-value''>", "<''amount''>", { "<''damage-value''>" } },
me = { "<''action''>" },
me = { "<''action''>" },
say = { "<''message''>" },
say = { "<''message''>" },
spawnpoint = { "(<''player''> (<''x''> <''y''> <''z''>))" },
spawnpoint = { { "<''player''>", { "<''x''>", "<''y''>", "<''z''>" } } },
tell = { "<''player''>", "<''message''>" },
tell = { "<''player''>", "<''message''>" },
tp = { "<''player''>", "[<''destination-player''>|<''x''> <''y''> <''z''>]" },
tp = { "<''player''>", "[<''destination-player''>|<''x''> <''y''> <''z''>]" },

Revision as of 16:29, 17 February 2014

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

return {
	['?'] = 'help',
	help = { { "[<''page''>|<''command''>]" } },
	ban = 'kick',
	kick = { "<''player''>", { "<''reason''>" } },
	['ban-ip'] = 'pardon-ip',
	['pardon-ip'] = { "<''ip''>" },
	banlist = { { "[ips]" } },
	clear = { { "<''player''>", "<''item''>", "<''data-value''>" } },
	debug = { "<''operation'':[start|stop]>" },
	defaultgamemode = { "<''mode'':" .. '[<abbr title="Adventure">0</abbr>|<abbr title="Creative">1</abbr>|<abbr title="Survival">2</abbr>]>' },
	deop = 'pardon',
	op = 'pardon',
	pardon = { "<''player''>" },
	difficulty = { "<''difficulty'':" .. '[<abbr title="Peaceful">0</abbr>|<abbr title="Easy">1</abbr>|<abbr title="Normal">2</abbr>|<abbr title="Hard">3</abbr>]>' },
	gamemode = { "<''mode'':" .. '[<abbr title="Adventure">0</abbr>|<abbr title="Creative">1</abbr>|<abbr title="Survival">2</abbr>]>', { "<''player''>" } },
	gamerule = { "<''rule'':[commandBlockOutput|doFireTick|doMobLoot|doMobSpawning|doTileDrops|keepInventory|mobGriefing]>", { "<''enabled'':[true|false]>" } },
	give = { "<''player''>", "<''data-value''>", "<''amount''>", { "<''damage-value''>" } },
	me = { "<''action''>" },
	say = { "<''message''>" },
	spawnpoint = { { "<''player''>", { "<''x''>", "<''y''>", "<''z''>" } } },
	tell = { "<''player''>", "<''message''>" },
	tp = { "<''player''>", "[<''destination-player''>|<''x''> <''y''> <''z''>]" },
	time = { "<''operation'':[set|add]>", "<''number''>" },
	weather = { "<''option'':[clear|rain|thunder]>", "<''time''>" },
	whitelist = { "<''operation'':[add <''player''>|remove <''player''>|list|on|off|reload]>" },
	xp = { "<''amount''>", "<''player''>" },
}