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