mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-03-28 14:56:24 +01:00
Merge pull request #341 from kolbytn/give-fix
pause item collecting after giving item
This commit is contained in:
commit
96bd1c40cc
1 changed files with 4 additions and 0 deletions
|
@ -150,7 +150,11 @@ export const actionsList = [
|
|||
'num': { type: 'int', description: 'The number of items to give.', domain: [1, Number.MAX_SAFE_INTEGER] }
|
||||
},
|
||||
perform: runAsAction(async (agent, player_name, item_name, num) => {
|
||||
const modes = agent.bot.modes;
|
||||
modes.pause('item_collecting');
|
||||
await skills.giveToPlayer(agent.bot, item_name, player_name, num);
|
||||
await new Promise(resolve => setTimeout(resolve, 3000));
|
||||
modes.unpause('item_collecting');
|
||||
})
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue