
//priority: 0
PlayerEvents.loggedIn(event => {
  if (!event.player.stages.has('starting_items')) {
      // Add the stage
    event.player.stages.add('starting_items')
      // Give some items to player
    event.player.give(Item.of('minecraft:stone_pickaxe', '{Damage:0}').enchant('minecraft:efficiency', 2).enchant('minecraft:unbreaking', 2).enchant('minecraft:fortune', 1).enchant('minecraft:aqua_affinity', 1))  
	  event.player.give(Item.of('minecraft:leather_helmet', '{Damage:0}').enchant('minecraft:respiration', 2).enchant('minecraft:unbreaking', 2).enchant('minecraft:projectile_protection', 2).enchant('minecraft:aqua_affinity', 1))
    event.player.give(Item.of('minecraft:leather_chestplate', '{Damage:0}').enchant('minecraft:thorns', 1).enchant('minecraft:unbreaking', 2).enchant('minecraft:blast_protection', 2).enchant('minecraft:protection', 2))
    event.player.give(Item.of('minecraft:leather_leggings', '{Damage:0}').enchant('minecraft:projectile_protection', 2).enchant('minecraft:unbreaking', 2))
    event.player.give(Item.of('minecraft:leather_boots', '{Damage:0}').enchant('minecraft:depth_strider', 2).enchant('minecraft:unbreaking', 2).enchant('minecraft:blast_protection', 2).enchant('minecraft:protection', 2).enchant('minecraft:feather_falling', 2))
    event.player.give('ftbquests:book')
    event.player.give('jackseconomy:basic_wallet')
    event.player.give('jackseconomy:ten_dollar_bill')
    event.player.give('tiab:time_in_a_bottle')
 
    }
  event.player.tell( [
    Text.of({"translate": "nwtc.chat.first_start_message"}),
    ]);
  event.server.runCommandSilent(`tellraw ${event.player.name.string} {"color":"dark_gray","text":"-|-|-|- ","extra":[{"color":"green","bold":"true","translate":"nwtc.chat.first_start_message.1"},{"color":"dark_gray","text":" -|-|-|-"}]}`)
  event.player.tell( [
      Text.of("   "),
      Text.of(event.player.name.string).red()
      ]);
  event.server.runCommandSilent(`tellraw ${event.player.name.string} {"color":"#D1FFFD","italic":"false","translate":"nwtc.chat.first_start_message.2","extra":[{"text":" "},{"color":"yellow","italic":"true","underlined":"true","translate":"nwtc.chat.first_start_message.3","clickEvent":{"action":"open_url","value":"https://space.bilibili.com/43268470/channel/seriesdetail?sid=3830593"}},{"text":" "},{"translate":"nwtc.chat.first_start_message.4"}]}`)
  event.server.runCommandSilent(`tellraw ${event.player.name.string} {"color":"green","italic":"false","translate":"nwtc.chat.first_start_message.5","extra":[{"text":" "},{"color":"yellow","italic":"true","underlined":"true","translate":"nwtc.chat.first_start_message.6","clickEvent":{"action":"open_url","value":"https://discord.gg/qvYN3WGFXn"}}]}`)

});


 