From 23094fd152c76a373871126fafc807fefc9ce3e3 Mon Sep 17 00:00:00 2001 From: Romain Beaumont Date: Sat, 28 Nov 2015 01:53:35 +0100 Subject: [PATCH] try/catch acceptClick until everything is implemented --- src/lib/plugins/inventory.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/plugins/inventory.js b/src/lib/plugins/inventory.js index 9969e08..28115ae 100644 --- a/src/lib/plugins/inventory.js +++ b/src/lib/plugins/inventory.js @@ -125,7 +125,12 @@ module.exports.player = function(player) // Let the inventory know of the click. // It's important to let it know of the click later, because it destroys // information we need about the inventory. - player.inventory.acceptClick(clickInfo) + try { + player.inventory.acceptClick(clickInfo) + } + catch(err) { + serv.emit('error',err); + } }) player._client.on("set_creative_slot", ({slot,item} ={}) => {