#Random Starter Items

5 messages · Page 1 of 1 (latest)

bitter vesselBOT
#

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

proper vault
#

I would just make a loottable and use a command to give it to player

hollow pilot
#

^

#

I might make a list and select a random index.

#
colorsList = [
    'white',
    'light_gray',
    'gray',
    'black',
    'brown',
    'red',
    'orange',
    'yellow',
    'lime',
    'green',
    'cyan',
    'light_blue',
    'blue',
    'purple',
    'magenta',
    'pink'
]

Utils.random.setSeed( Date.now().valueOf() )

PlayerEvents.loggedIn(event => {
    if (!event.player.stages.has('starting_items')) {
      event.player.stages.add('starting_items')
      event.player.give(Item.of(minecraft:iron_sword'))
      event.player.give('16x minecraft:bread')
      event.player.give('3x minecraft:' + 
        colorsList(Utils.random.nextInt( colorsList.length - 1 )) +
        '_wool'
      )
    }
})