       # TODO: disable/re-enable voxel-walk in 1st/3rd person?
     else if ev.keyCode == 'T'.charCodeAt(0)
       game.plugins.toggle 'oculus'
-    else if '0'.charCodeAt(0) <= ev.keyCode <= '9'.charCodeAt(0)
-      slot = ev.keyCode - '0'.charCodeAt(0)
-      if slot == 0
-        slot = 10
-      console.log 'switching to slot #{slot}'
-
-      game.currentMaterial = slot
-
     else if ev.keyCode == 'O'.charCodeAt(0)
       home(avatar)
     else if ev.keyCode == 'C'.charCodeAt(0)

      jumpSpeed: 0.001
    }

  toolbar = createToolbar {el: '#tools'}
  toolbar.on 'select', (material) ->
    game.currentMaterial = +material


  console.log 'initializing plugins'
  plugins = createPlugins game, {require: require}

    droppedPile = new ItemPile(blockName, 1) # TODO: custom drops

    excess = playerInventory.give droppedPile

    content = []
    for slot, i in playerInventory.array
      if slot?
        # TODO: configurable item textures (for now only uses block top)
        blockTextures = registry.getBlockProps(slot.item).texture
        itemTexture = if typeof blockTextures == 'string' then blockTextures else blockTextures[0]

        content.push {icon: game.materials.texturePath + itemTexture + '.png', label:''+slot.count, id:i}
      else
        content.push {}

    toolbar.updateContent content

    if excess > 0
      # if didn't fit in inventory, un-mine the block since they can't carry it
      # TODO: handle partial fits, prevent dupes (canFit before giving?) -- needed once have custom drops
      game.setBlock target.voxel, target.value
      # TOOD: some kind of notification


  gui = new datgui.GUI()
