module.exports.player = (player, serv) => {
  player.commands.add({
    base: 'teleport',
    aliases: ['tp'],
    info: 'to teleport a player',
    usage: '/teleport [target player] <destination player or x> [x] [y]',
    parse(str) {
      return str.match(/^(((\w* )?\d* \d* \d*)|(\w* \w*))$/) ? str.split(' ') : false;
    },
    action(args) {
      if(args.length === 2 && args[0] !== args[1]) {
        let player_from;
        let player_to;

        if(!(player_from = serv.getPlayer(args[0])) || !(player_to = serv.getPlayer(args[1])))
          return false;

        player_from._client.write('position', {
          x: player_to.position.x/32,
          y: player_to.position.x/32,
          z: player_to.position.x/32,
          yaw: player_to.yaw,
          pitch: player_to.pitch,
          flags: 0x00
        });
      } else if(args.length === 3) {
        player._client.write('position', {
          x: args[0],
          y: args[1],
          z: args[2],
          yaw: player.yaw,
          pitch: player.pitch,
          flags: 0x00
        });
      } else if(args.length === 4) {
        let player_from;

        if(!(player_from = serv.getPlayer(args[0])))
          return false;

        player_from._client.write('position', {
          x: args[1],
          y: args[2],
          z: args[3],
          yaw: player_from.yaw,
          pitch: player_from.pitch,
          flags: 0x00
        });
      }
    }
  });
};

@@ -588,49 +588,28 @@
 rom.
-_client.write('position', %7B%0A          x: 
+position = new Vec3(
 play
@@ -628,29 +628,16 @@
 on.x/32,
-%0A          y:
  player_
@@ -652,26 +652,13 @@
 ion.
-x
+y
 /32,
-%0A          z:
  pla
@@ -677,36 +677,30 @@
 ion.
-x/32,%0A 
+z/32);%0A
        
-  yaw:
  player_
 to.y
@@ -699,228 +699,126 @@
 yer_
-to.yaw,%0A          pitch: player_to.pitch,%0A          flags: 0x00%0A        %7D);%0A      %7D else if(args.length === 3) %7B%0A        player._client.write('position', %7B%0A          x: args%5B0%5D,%0A          y: args%5B1%5D,%0A          z:
+from.sendPosition();%0A      %7D else if(args.length === 3) %7B%0A        player.position = new Vec3(args%5B0%5D, args%5B1%5D,
  args%5B2%5D
 ,%0A  
@@ -805,33 +805,34 @@
 args%5B1%5D, args%5B2%5D
-,
+);
 %0A          yaw: 
@@ -828,89 +828,28 @@
     
-  yaw: player.yaw,%0A          pitch: player.pitch,%0A          flags: 0x00%0A        %7D
+player.sendPosition(
 );%0A 
@@ -1012,100 +1012,53 @@
 rom.
-_client.write('position', %7B%0A          x: args%5B1%5D,%0A          y: args%5B2%5D,%0A          z:
+position = new Vec3(args%5B1%5D, args%5B2%5D,
  args%5B3%5D
 ,%0A  
@@ -1053,25 +1053,26 @@
  args%5B3%5D
-,
+);
 %0A       
    yaw: 
@@ -1067,15 +1067,8 @@
     
-   yaw:
  pla
@@ -1080,80 +1080,21 @@
 rom.
-yaw,%0A          pitch: player_from.pitch,%0A          flags: 0x00%0A        %7D
+sendPosition(
 );%0A 

Fix a very bad bug.