From 1c8b82f4623197f49f1623caca74a937cacdbee3 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Wed, 5 Apr 2023 18:35:56 -0400 Subject: [PATCH] Update web links --- docs/FAQ.md | 2 +- docs/es/FAQ_ES.md | 2 +- docs/fr/FAQ_FR.md | 2 +- docs/ru/FAQ_RU.md | 2 +- docs/tutorial.md | 8 ++++---- docs/zh/FAQ.md | 2 +- docs/zh/tutorial.md | 10 +++++----- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/FAQ.md b/docs/FAQ.md index 5d13721d5..0117fcbad 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -22,7 +22,7 @@ client.on('end', () => {}) Spigot servers, in particular some plugins, use custom chat formats, you need to parse it with a custom regex / parser. Read and adapt [chat_parsing.js](https://github.com/PrismarineJS/mineflayer/blob/master/examples/chat_parsing.js) to make it work for your particular -chat plugin. Also read http://mineflayer.prismarine.js.org/#/tutorial?id=custom-chat +chat plugin. Also read http://prismarinejs.github.io/mineflayer/#/tutorial?id=custom-chat ### How can I collect info from an custom plugin in chat ? diff --git a/docs/es/FAQ_ES.md b/docs/es/FAQ_ES.md index 8b651f13c..b4b353451 100644 --- a/docs/es/FAQ_ES.md +++ b/docs/es/FAQ_ES.md @@ -15,7 +15,7 @@ client.on('end', () => {}) ## Mi evento de chat no se emite en un servidor personalizado, cómo lo resuelvo? Los servidores spigot, en particular algunos plugins, usan formatos personalizados de chat, tienes que analizarlos con un regex personalizado. -Lee y modifica [chat_parsing.js](https://github.com/PrismarineJS/mineflayer/blob/master/examples/chat_parsing.js) para que funcione con tu plugin de chat particular. Lee también http://mineflayer.prismarine.js.org/#/tutorial?id=custom-chat +Lee y modifica [chat_parsing.js](https://github.com/PrismarineJS/mineflayer/blob/master/examples/chat_parsing.js) para que funcione con tu plugin de chat particular. Lee también http://prismarinejs.github.io/mineflayer/#/tutorial?id=custom-chat ### Como puedo recolectar información de un plugin de chat personalizado? diff --git a/docs/fr/FAQ_FR.md b/docs/fr/FAQ_FR.md index baf2982ba..14d993017 100644 --- a/docs/fr/FAQ_FR.md +++ b/docs/fr/FAQ_FR.md @@ -23,7 +23,7 @@ client.on('end', () => {}) Les serveurs Spigot, en particulier certains plugins, utilisent des formats de chat personnalisés, vous devez les analyser avec une expression rationnelle / un analyseur syntaxique personnalisé. Lisez et adaptez [chat_parsing.js](https://github.com/PrismarineJS/mineflayer/blob/master/examples/chat_parsing.js) pour qu'il fonctionne pour vos besoins particuliers. -plugin de chat. A lire également +plugin de chat. A lire également ### Comment puis-je collecter les informations d'un plugin personnalisé dans le chat ? diff --git a/docs/ru/FAQ_RU.md b/docs/ru/FAQ_RU.md index 133301a81..dae0818f0 100644 --- a/docs/ru/FAQ_RU.md +++ b/docs/ru/FAQ_RU.md @@ -14,7 +14,7 @@ client.on('end', () => {}) Сервера Spigot, в частности некоторые плагины, используют разные форматы чата, вам необходимо проанализировать его с помощью регулярного выражения/парсера. Посмотрите и измените скрипт [chatAddPattern.js](https://github.com/PrismarineJS/mineflayer/blob/master/examples/chatAddPattern.js), чтобы он работал для вашего плагина чата, -также прочтите http://mineflayer.prismarine.js.org/#/tutorial?id=custom-chat. +также прочтите http://prismarinejs.github.io/mineflayer/#/tutorial?id=custom-chat. ### Как я могу отправлять команды серверу? diff --git a/docs/tutorial.md b/docs/tutorial.md index 59d906f4b..849941831 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -417,7 +417,7 @@ bot.once('spawn', () => { ### Listening for an event -The bot object has many useful [events](http://mineflayer.prismarine.js.org/#/api?id=events). +The bot object has many useful [events](http://prismarinejs.github.io/mineflayer/#/api?id=events). You can listen for an event by using either `bot.on()` method or `bot.once()` method of the bot object, which takes the name of an event and a function. To remove specific listener you can use `bot.removeListener()` method. @@ -428,7 +428,7 @@ To remove specific listener you can use `bot.removeListener()` method. - `bot.removeListener(eventName, listener)` Removes the specified `listener` for the event named `eventName`. In order to use this you either need to define your function with `function myNamedFunc() {}` or put your function in a variable with `const myNamedFunc = () => {}`. You can then use `myNamedFunc` in the listener argument. -Not only bot object, [`Chest`](http://mineflayer.prismarine.js.org/#/api?id=mineflayerchest), [`Furnace`](http://mineflayer.prismarine.js.org/#/api?id=mineflayerfurnace), [`Dispenser`](http://mineflayer.prismarine.js.org/#/api?id=mineflayerdispenser), [`EnchantmentTable`](http://mineflayer.prismarine.js.org/#/api?id=mineflayerenchantmenttable), [`Villager`](http://mineflayer.prismarine.js.org/#/api?id=mineflayervillager) object also have their own events! +Not only bot object, [`Chest`](http://prismarinejs.github.io/mineflayer/#/api?id=mineflayerchest), [`Furnace`](http://prismarinejs.github.io/mineflayer/#/api?id=mineflayerfurnace), [`Dispenser`](http://prismarinejs.github.io/mineflayer/#/api?id=mineflayerdispenser), [`EnchantmentTable`](http://prismarinejs.github.io/mineflayer/#/api?id=mineflayerenchantmenttable), [`Villager`](http://prismarinejs.github.io/mineflayer/#/api?id=mineflayervillager) object also have their own events! ### Promises A [promise](https://nodejs.dev/learn/understanding-javascript-promises) is a function that you can use the `await` variable to wait on until it's job is complete. (you can omit the await to not wait for results) @@ -557,8 +557,8 @@ In general, you'll want to use `for of` instead of `for in` so make sure you don ### Creating an event from chat -You can create your own event from chat using [`bot.chatAddPattern()`](http://mineflayer.prismarine.js.org/#/api?id=botchataddpatternpattern-chattype-description) method. Useful for Bukkit servers where the chat format changes a lot. -[`bot.chatAddPattern()`](http://mineflayer.prismarine.js.org/#/api?id=botchataddpatternpattern-chattype-description) method takes three arguments : +You can create your own event from chat using [`bot.chatAddPattern()`](http://prismarinejs.github.io/mineflayer/#/api?id=botchataddpatternpattern-chattype-description) method. Useful for Bukkit servers where the chat format changes a lot. +[`bot.chatAddPattern()`](http://prismarinejs.github.io/mineflayer/#/api?id=botchataddpatternpattern-chattype-description) method takes three arguments : - `pattern` - regular expression (regex) to match chat - `chatType` - the event the bot emits when the pattern matches. e.g. "chat" or "whisper" diff --git a/docs/zh/FAQ.md b/docs/zh/FAQ.md index da2f1ef92..3fb48bb38 100644 --- a/docs/zh/FAQ.md +++ b/docs/zh/FAQ.md @@ -15,7 +15,7 @@ client.on('end', () => {}) ### 我无法在自定义服务器上获取聊天事件,如何解决? Spigot 服务器, 特别是一些插件, 使用的是自定义聊天格式,您需要使用自定义正则表达式/解析器对其进行解析。 -阅读并改编[chat_parsing.js](https://github.com/PrismarineJS/mineflayer/blob/master/examples/chat_parsing.js)使其适用于您的特定聊天插件. 或者阅读 http://mineflayer.prismarine.js.org/#/tutorial?id=custom-chat +阅读并改编[chat_parsing.js](https://github.com/PrismarineJS/mineflayer/blob/master/examples/chat_parsing.js)使其适用于您的特定聊天插件. 或者阅读 http://prismarinejs.github.io/mineflayer/#/tutorial?id=custom-chat ### 如何用自定义插件在聊天中收集信息 ? diff --git a/docs/zh/tutorial.md b/docs/zh/tutorial.md index 60f73bec4..15a871f0e 100644 --- a/docs/zh/tutorial.md +++ b/docs/zh/tutorial.md @@ -417,7 +417,7 @@ bot.once('spawn', () => { ### Listening for an event -The bot object has many useful [events](http://mineflayer.prismarine.js.org/#/api?id=events). +The bot object has many useful [events](http://prismarinejs.github.io/mineflayer/#/api?id=events). You can listen for an event by using either `bot.on()` method or `bot.once()` method of the bot object, which takes the name of an event and a function. To remove specific listener you can use `bot.removeListener()` method. @@ -428,7 +428,7 @@ To remove specific listener you can use `bot.removeListener()` method. - `bot.removeListener(eventName, listener)` Removes the specified `listener` for the event named `eventName`. In order to use this you either need to define your function with `function myNamedFunc() {}` or put your function in a variable with `const myNamedFunc = () => {}`. You can then use `myNamedFunc` in the listener argument. -Not only bot object, [`Chest`](http://mineflayer.prismarine.js.org/#/api?id=mineflayerchest), [`Furnace`](http://mineflayer.prismarine.js.org/#/api?id=mineflayerfurnace), [`Dispenser`](http://mineflayer.prismarine.js.org/#/api?id=mineflayerdispenser), [`EnchantmentTable`](http://mineflayer.prismarine.js.org/#/api?id=mineflayerenchantmenttable), [`Villager`](http://mineflayer.prismarine.js.org/#/api?id=mineflayervillager) object also have their own events! +Not only bot object, [`Chest`](http://prismarinejs.github.io/mineflayer/#/api?id=mineflayerchest), [`Furnace`](http://prismarinejs.github.io/mineflayer/#/api?id=mineflayerfurnace), [`Dispenser`](http://prismarinejs.github.io/mineflayer/#/api?id=mineflayerdispenser), [`EnchantmentTable`](http://prismarinejs.github.io/mineflayer/#/api?id=mineflayerenchantmenttable), [`Villager`](http://prismarinejs.github.io/mineflayer/#/api?id=mineflayervillager) object also have their own events! ### Callbacks A [callback](https://en.wikipedia.org/wiki/Callback_(computer_programming)) is a function that you can give to another function, that is expected to be *called back*, generally when that function ends. @@ -491,7 +491,7 @@ The reason the incorrect approach is wrong is because when `bot.craft()` is call By the time the code reaches the second `bot.craft()`, the first probably hasn't finished yet, which means the wanted resource is not available yet. Using callbacks can fix this because they will only be called after the `bot.craft()` is finished. -More on the [bot.craft()](https://mineflayer.prismarine.js.org/#/api?id=botcraftrecipe-count-craftingtable-callback) method. +More on the [bot.craft()](https://prismarinejs.github.io/mineflayer/#/api?id=botcraftrecipe-count-craftingtable-callback) method. ## 高级 @@ -608,8 +608,8 @@ In general, you'll want to use `for of` instead of `for in` so make sure you don ### 从聊天中创建事件 -You can create your own event from chat using [`bot.chatAddPattern()`](http://mineflayer.prismarine.js.org/#/api?id=botchataddpatternpattern-chattype-description) method. Useful for Bukkit servers where the chat format changes a lot. -[`bot.chatAddPattern()`](http://mineflayer.prismarine.js.org/#/api?id=botchataddpatternpattern-chattype-description) method takes three arguments : +You can create your own event from chat using [`bot.chatAddPattern()`](http://prismarinejs.github.io/mineflayer/#/api?id=botchataddpatternpattern-chattype-description) method. Useful for Bukkit servers where the chat format changes a lot. +[`bot.chatAddPattern()`](http://prismarinejs.github.io/mineflayer/#/api?id=botchataddpatternpattern-chattype-description) method takes three arguments : - `pattern` - regular expression (regex) to match chat - `chatType` - the event the bot emits when the pattern matches. e.g. "chat" or "whisper"