#How does one empty the players inventory

11 messages · Page 1 of 1 (latest)

prisma belfry
#
// Made by Fluffy Bumblebee
onEvent('player.logged_in', event => {
  if (!event.player.stages.has('starting_items')) {
    event.player.stages.add('starting_items');
    event.player.give('ad_astra:earth_globe');
    event.player.give('anim_guns:pistol_light');
    event.player.give(Item.of('anim_guns:standard_handgun_cartridge', 25));
    event.player.give('minecraft:stone_axe');
  }
})

Above is my current script.

mint onyxBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

upbeat berry
#

im not sure about this but you can try event.player.inventory.clear()

vapid dew
#

or run a command:

execute as ${event.player.username} run clear

prisma belfry
#

thanks people!

#

Is there some sort of plugin for VSC that I can use to be able to use autocorrection

#

asking the chat for simple lines of code becomes a bit annoying

prisma belfry
marble dragonBOT
#

ProbeJS is an addon mod for KubeJS that generates typings files for VSCode, allowing VSCode to offer autocompletions for a ton of things!

Mod by @stiff zephyr

prisma belfry
#

thanks