/*
 * Since 1.8 the players skin can have a second layer over their whole skin.
 *
 * This example will toggle that layer every half second, making your skin 'blick'
 * (If your bots skin has a second layer)
 */
const mineflayer = require('mineflayer')

if (process.argv.length < 4 || process.argv.length > 6) {
  console.log('Usage : node jumper.js <host> <port> [<name>] [<password>]')
  process.exit(1)
}

const bot = mineflayer.createBot({
  host: process.argv[2],
  port: parseInt(process.argv[3]),
  username: process.argv[4] ? process.argv[4] : 'skin_blinker',
  password: process.argv[5]
})

var show = true

function toggleSkin () {
  show = !show
  bot.setSettings({
    skinParts: {
      showJacket: show,
      showHat: show,
      showRightPants: show,
      showLeftPants: show,
      showLeftSleeve: show,
      showRightSleeve: show
    }
  })
}

bot.on('spawn', () => {
  setInterval(() => {
    toggleSkin()
  }, 500)
})

@@ -597,11 +597,11 @@
 %7D)%0A%0A
-var
+let
  sho
@@ -899,20 +899,8 @@
 val(
-() =%3E %7B%0A    
 togg
@@ -909,14 +909,8 @@
 Skin
-()%0A  %7D
 , 50

Improve skin_blinker example