#Random Starter Items
5 messages · Page 1 of 1 (latest)
I would just make a loottable and use a command to give it to player
^
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'
)
}
})