Skip to content

Commit 75d84cd

Browse files
Update block_actions.js (PrismarineJS#1402)
* Update block_actions.js * Update block_actions.js * fix lint Co-authored-by: Romain Beaumont <[email protected]>
1 parent fe3fc9d commit 75d84cd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/plugins/block_actions.js

+3
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ function inject (bot, { version }) {
5353
bot._client.on('block_action', (packet) => {
5454
const pt = new Vec3(packet.location.x, packet.location.y, packet.location.z)
5555
const block = bot.blockAt(pt)
56+
57+
if (block === null) { return }
58+
5659
const blockName = blocks[packet.blockId].name
5760

5861
if (blockName === 'noteblock') { // Pre 1.13

0 commit comments

Comments
 (0)