Compare commits
	
		
			4 Commits
		
	
	
		
			6b71de0356
			...
			b1dab1968c
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | b1dab1968c | ||
|  | 3219ec6155 | ||
|  | f38ad8c819 | ||
|  | 4b8a39d38c | 
| @@ -193,7 +193,7 @@ function command(username, message) { | ||||
|                     break; | ||||
|  | ||||
|                 case "follow": | ||||
|                     subcommand("go follow " + message_parts.slice(2).join(" ")) | ||||
|                     subcommand("go follow " + message_parts.slice(1).join(" ")) | ||||
|                     break; | ||||
|                 case "come": | ||||
|                     switch (message_parts[1]) { | ||||
| @@ -351,6 +351,8 @@ function command(username, message) { | ||||
|                             break; | ||||
|                     } | ||||
|                     break | ||||
|                 // TODO move look (and maybe find) to informer plugin? | ||||
|                 case "look": | ||||
|                 case "lookat": | ||||
|                     // const coords = v(message_parts.splice(1)) | ||||
|                     switch (message_parts.length) { | ||||
| @@ -369,13 +371,12 @@ function command(username, message) { | ||||
|  | ||||
|                                 case "this": | ||||
|                                     // TODO lookat the block the user is looking at | ||||
|                                     // Currently looks player position | ||||
|                                     if (player) { | ||||
|                                         bot.lookAt((new v.Vec3(0, 1, 0)).add(player.position)) | ||||
|                                         todo() | ||||
|                                         bot.lookAt(player.position) | ||||
|                                     } else { | ||||
|                                         cfg.quiet || bot.chat("can't see you") | ||||
|                                     } | ||||
|                                     break; | ||||
|                                     break | ||||
|                                 default: | ||||
|                                     const aPlayer = bot.players[message_parts[2]] ? bot.players[message_parts[2]].entity : null | ||||
| @@ -395,6 +396,9 @@ function command(username, message) { | ||||
|                             break | ||||
|                     } | ||||
|                     break | ||||
|                 case "info": | ||||
|                     cfg.plugins.informer.command(message_parts.splice(1)) | ||||
|                     break | ||||
|                 case "ride": | ||||
|                 case "mount": | ||||
|                     bot.mount(bot.nearestEntity()) | ||||
|   | ||||
| @@ -5,7 +5,27 @@ let mcData | ||||
| function block() { | ||||
|     const block = bot.blockAtCursor() | ||||
|     console.log(block) | ||||
|     cfg.quiet || bot.chat([block.type, block.name].join(": ")) | ||||
|     let info = [block.type, block.name] | ||||
|     if (block.metadata) info.push(block.metadata) | ||||
|     cfg.quiet || bot.chat(info.join(": ")) | ||||
| } | ||||
|  | ||||
| function command(message_parts) { | ||||
|     switch (message_parts.length) { | ||||
|         case 0: | ||||
|         case 1: | ||||
|             switch (message_parts[0]) { | ||||
|                 case "block": | ||||
|                 default: | ||||
|                     block() | ||||
|                     break; | ||||
|             } | ||||
|  | ||||
|             break; | ||||
|  | ||||
|         default: | ||||
|             break; | ||||
|     } | ||||
| } | ||||
|  | ||||
| const load = (config) => { | ||||
| @@ -19,4 +39,4 @@ const load = (config) => { | ||||
|  | ||||
| const unload = () => {} | ||||
|  | ||||
| module.exports = { load, unload, block } | ||||
| module.exports = { load, unload, command, block } | ||||
		Reference in New Issue
	
	Block a user