From bccfc5d10c3ee2ebfa5d7073a73fe9b550376bcd Mon Sep 17 00:00:00 2001 From: Romain Beaumont Date: Mon, 14 Mar 2016 15:46:31 +0100 Subject: [PATCH] remove /spawn and /spawnObject, fix #175 --- src/lib/plugins/spawn.js | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/src/lib/plugins/spawn.js b/src/lib/plugins/spawn.js index 8c1f794..6350c7b 100644 --- a/src/lib/plugins/spawn.js +++ b/src/lib/plugins/spawn.js @@ -74,44 +74,6 @@ module.exports.server=function(serv,options) { module.exports.player=function(player,serv){ - player.commands.add({ - base: 'spawn', - info: 'Spawn a mob', - usage: '/spawn ', - op: true, - parse(str) { - const results=str.match(/(\d+)/); - if (!results) return false; - return { - id: parseInt(results[1]) - } - }, - action({id}) { - serv.spawnMob(id, player.world, player.position.scaled(1/32), { - velocity: Vec3((Math.random() - 0.5) * 10, Math.random()*10 + 10, (Math.random() - 0.5) * 10) - }); - } - }); - - player.commands.add({ - base: 'spawnObject', - info: 'Spawn an object', - usage: '/spawnObject ', - op: true, - parse(str) { - const results=str.match(/(\d+)/); - if (!results) return false; - return { - id: parseInt(results[1]) - } - }, - action({id}) { - serv.spawnObject(id, player.world, player.position.scaled(1/32), { - velocity: Vec3((Math.random() - 0.5) * 10, Math.random()*10 + 10, (Math.random() - 0.5) * 10) - }); - } - }); - player.commands.add({ base: 'summon', info: 'Summon an entity',