mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-10 10:01:48 +00:00
remove /spawn and /spawnObject, fix #175
This commit is contained in:
parent
a17f47c9e9
commit
bccfc5d10c
1 changed files with 0 additions and 38 deletions
|
|
@ -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 <entity_id>',
|
||||
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 <entity_id>',
|
||||
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',
|
||||
|
|
|
|||
Loading…
Reference in a new issue