Skip to content

Commit d581ea7

Browse files
authored
Fix typos (#3381)
* fix: Address typos * docs: Fix document typos * docs: Fix another typos --------- Co-authored-by: data-miner00 <data-miner00@users.noreply.github.com>
1 parent 315cdfc commit d581ea7

10 files changed

Lines changed: 24 additions & 24 deletions

File tree

docs/api.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ Default true, whether or not you receive color codes in chats from the server.
974974

975975
#### bot.settings.viewDistance
976976

977-
Can be a string listed below or a postive number.
977+
Can be a string listed below or a positive number.
978978
Choices:
979979
* `far` (default)
980980
* `normal`
@@ -1035,7 +1035,7 @@ saturation of 5.0. Eating food increases the saturation as well as the food bar.
10351035

10361036
#### bot.oxygenLevel
10371037

1038-
Number in the range [0, 20] respresenting the number of water-icons known as oxygen level.
1038+
Number in the range [0, 20] representing the number of water-icons known as oxygen level.
10391039

10401040
#### bot.physics
10411041

@@ -1554,7 +1554,7 @@ Fires when a particle is created
15541554

15551555
#### bot.blockAt(point, extraInfos=true)
15561556

1557-
Returns the block at `point` or `null` if that point is not loaded. If `extraInfos` set to true, also returns informations about signs, paintings and block entities (slower).
1557+
Returns the block at `point` or `null` if that point is not loaded. If `extraInfos` set to true, also returns information about signs, paintings and block entities (slower).
15581558
See `Block`.
15591559

15601560
#### bot.waitForChunksToLoad()
@@ -1596,8 +1596,8 @@ Finds the closest blocks from the given point.
15961596
- `point` - The start position of the search (center). Default is the bot position.
15971597
- `matching` - A function that returns true if the given block is a match. Also supports this value being a block id or array of block ids.
15981598
- `useExtraInfo` - To preserve backward compatibility can result in two behavior depending on the type
1599-
- **boolean** - Provide your `matching` function more data - noticeably slower aproach
1600-
- **function** - Creates two stage maching, if block passes `matching` function it is passed further to `useExtraInfo` with additional info
1599+
- **boolean** - Provide your `matching` function more data - noticeably slower approach
1600+
- **function** - Creates two stage matching, if block passes `matching` function it is passed further to `useExtraInfo` with additional info
16011601
- `maxDistance` - The furthest distance for the search, defaults to 16.
16021602
- `count` - Number of blocks to find before returning the search. Default to 1. Can return less if not enough blocks are found exploring the whole area.
16031603

@@ -1627,15 +1627,15 @@ with `metadata`.
16271627

16281628
#### bot.recipesAll(itemType, metadata, craftingTable)
16291629

1630-
The same as bot.recipesFor except that it does not check wether the bot has enough materials for the recipe.
1630+
The same as bot.recipesFor except that it does not check whether the bot has enough materials for the recipe.
16311631

16321632
#### bot.nearestEntity(match = (entity) => { return true })
16331633

16341634
Return the nearest entity to the bot, matching the function (default to all entities). Return null if no entity is found.
16351635

16361636
Example:
16371637
```js
1638-
const cow = bot.nearestEntity(entity => entity.name.toLowerCase() === 'cow') // we use .toLowercase() because in 1.8 cow was capitalized, for newer versions that can be ommitted
1638+
const cow = bot.nearestEntity(entity => entity.name.toLowerCase() === 'cow') // we use .toLowercase() because in 1.8 cow was capitalized, for newer versions that can be omitted
16391639
```
16401640

16411641
### Methods
@@ -1657,7 +1657,7 @@ Requests chat completion from the server.
16571657
* `str` - String to complete.
16581658
* `assumeCommand` - Field sent to server, defaults to false.
16591659
* `sendBlockInSight` - Field sent to server, defaults to true. Set this option to false if you want more performance.
1660-
* `timeout` - Timeout in milliseconds, after which the function will return an ampty array, defaults to 5000.
1660+
* `timeout` - Timeout in milliseconds, after which the function will return an empty array, defaults to 5000.
16611661

16621662
#### bot.chat(message)
16631663

@@ -1683,22 +1683,22 @@ Adds a regex pattern to the bot's chat matching. Useful for bukkit servers where
16831683
make an event that is called every time the pattern is matched to a message,
16841684
the event will be called `"chat:name"`, with name being the name passed
16851685
* `name` - the name used to listen for the event
1686-
* `pattern` - regular expression to match to messages recieved
1686+
* `pattern` - regular expression to match to messages received
16871687
* `chatPatternOptions` - object
16881688
* `repeat` - defaults to true, whether to listen for this event after the first match
16891689
* `parse` - instead of returning the actual message that was matched, return the capture groups from the regex
1690-
* `deprecated` - (**unstable**) used by bot.chatAddPattern to keep compatability, likely to be removed
1690+
* `deprecated` - (**unstable**) used by bot.chatAddPattern to keep compatibility, likely to be removed
16911691

16921692
returns a number which can be used with bot.removeChatPattern() to only delete this pattern
16931693

16941694
- :eyes: cf. [examples/chat_parsing](https://github.com/PrismarineJS/mineflayer/blob/master/examples/chat_parsing.js#L17-L36)
16951695

16961696
#### bot.addChatPatternSet(name, patterns, chatPatternOptions)
16971697

1698-
make an event that is called every time all patterns havee been matched to messages,
1698+
make an event that is called every time all patterns have been matched to messages,
16991699
the event will be called `"chat:name"`, with name being the name passed
17001700
* `name` - the name used to listen for the event
1701-
* `patterns` - array of regular expression to match to messages recieved
1701+
* `patterns` - array of regular expression to match to messages received
17021702
* `chatPatternOptions` - object
17031703
* `repeat` - defaults to true, whether to listen for this event after the first match
17041704
* `parse` - instead of returning the actual message that was matched, return the capture groups from the regex

docs/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ The function could also be called when an error occurs.
453453

454454
Below is an example of a bot that will craft oak logs into oak planks and then into sticks.
455455

456-
Incorect approach ❌:
456+
Incorrect approach ❌:
457457

458458
```js
459459
function craft (bot) {

examples/advanced/chest_confirm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Menual Chest Confirm
1+
# Manual Chest Confirm
22

33
This code snippet will tell the bot not to wait for chest confirmations that some spigot plugins will not send
44

examples/chatterbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* may flood the chat, feel free to check them out for other purposes though.
1111
*
1212
* This bot also replies to some specific chat messages so you can ask him
13-
* a few informations while you are in game.
13+
* a few information while you are in game.
1414
*/
1515
const mineflayer = require('mineflayer')
1616
const { Vec3 } = require('vec3')

examples/looker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* This script will automaticly look at the closest entity.
2+
* This script will automatically look at the closest entity.
33
* It checks for a near entity every tick.
44
*/
55
const mineflayer = require('mineflayer')

examples/perfectShotBow.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ bot.on('spawn', function () {
3030

3131
// Auto attack every 1,2 secs with bow
3232
// With crossbow attack when crossbow is charget (enchant 3 = 0.5s)
33-
// ['snowball', 'ender_pearl', 'egg', 'splash_potion'] auto attack every 0,1 sec, no recomended use autoAttack for these items, instead use "bot.hawkEye.oneShot(target, weapon)"
33+
// ['snowball', 'ender_pearl', 'egg', 'splash_potion'] auto attack every 0,1 sec, no recommended use autoAttack for these items, instead use "bot.hawkEye.oneShot(target, weapon)"
3434

3535
bot.hawkEye.autoAttack(target, weapon)
3636
// If you force stop attack use:

examples/python/chatterbox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# may flood the chat, feel free to check them out for other purposes though.
1111
#
1212
# This bot also replies to some specific chat messages so you can ask him
13-
# a few informations while you are in game.
13+
# a few information while you are in game.
1414
# ===========================================================================
1515
import sys, re
1616
from javascript import require, On, Once, console

lib/plugins/chat.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ function inject (bot, options) {
196196
bot.tabComplete = tabComplete
197197

198198
function addDefaultPatterns () {
199-
// 1.19 changes the chat format to move <sender> prefix from message contents to a seperate field.
199+
// 1.19 changes the chat format to move <sender> prefix from message contents to a separate field.
200200
// TODO: new chat lister to handle this
201201
if (!defaultChatPatterns) return
202202
bot.addChatPattern('whisper', new RegExp(`^${USERNAME_REGEX} whispers(?: to you)?:? (.*)$`), { deprecated: true })

test/externalTests/placeEntity.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = (version) => {
1616
addTest('place crystal', async (bot) => {
1717
if (!bot.registry.itemsByName.end_crystal) return // unsupported
1818
await bot.test.setBlock({ z: 1, relative: true, blockName: 'obsidian' })
19-
await bot.test.awaitItemRecieved(`/give ${bot.username} end_crystal`)
19+
await bot.test.awaitItemReceived(`/give ${bot.username} end_crystal`)
2020
const crystal = await bot.placeEntity(bot.blockAt(bot.entity.position.offset(0, 0, 1)), new Vec3(0, 1, 0))
2121
assert(crystal !== null)
2222
let name = 'EnderCrystal'
@@ -45,7 +45,7 @@ module.exports = (version) => {
4545
}
4646

4747
await placeBlocksForTest('water')
48-
await bot.test.awaitItemRecieved(`/give ${bot.username} ${bot.registry.oak_boat ? 'oak_boat' : 'boat'}`)
48+
await bot.test.awaitItemReceived(`/give ${bot.username} ${bot.registry.oak_boat ? 'oak_boat' : 'boat'}`)
4949
const boat = await bot.placeEntity(bot.blockAt(bot.entity.position.offset(0, -1, -2)), new Vec3(0, -1, 0))
5050
assert(boat !== null)
5151
const name = bot.supportFeature('entityNameUpperCaseNoUnderscore') ? 'Boat' : 'boat'
@@ -69,7 +69,7 @@ module.exports = (version) => {
6969
} else {
7070
command = '/give @p zombie_spawn_egg 1' // >1.12
7171
}
72-
await bot.test.awaitItemRecieved(command)
72+
await bot.test.awaitItemReceived(command)
7373
const zombie = await bot.placeEntity(bot.blockAt(bot.entity.position.offset(0, 0, 1)), new Vec3(0, 1, 0))
7474
assert(zombie !== null)
7575
const name = bot.supportFeature('entityNameUpperCaseNoUnderscore') ? 'Zombie' : 'zombie'
@@ -80,7 +80,7 @@ module.exports = (version) => {
8080
})
8181

8282
addTest('place armor stand', async (bot) => {
83-
await bot.test.awaitItemRecieved(`/give ${bot.username} armor_stand`)
83+
await bot.test.awaitItemReceived(`/give ${bot.username} armor_stand`)
8484
const armorStand = await bot.placeEntity(bot.blockAt(bot.entity.position.offset(0, 0, 1)), new Vec3(0, 1, 0))
8585
assert(armorStand !== null)
8686
let name

test/externalTests/plugins/testCommon.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function inject (bot) {
2828
return new Promise((resolve) => { setTimeout(resolve, ms) })
2929
}
3030

31-
bot.test.awaitItemRecieved = async (command) => {
31+
bot.test.awaitItemReceived = async (command) => {
3232
const p = once(bot.inventory, 'updateSlot')
3333
bot.chat(command)
3434
await p // await getting the item

0 commit comments

Comments
 (0)