#equip an armor on first join
60 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
This server script adds items on first time player joins, checking stages. GameStages mod is not req...
still it doesn't realy works... I want to equip the armors peaces in spesific slots...
try searching the discord, its been done and asked many times before
im working so i cant help with it too much
i've looked for it... but the discord's search system is ... shitty 
I've done some testing, and neather this : js PlayerEvent.loggedIn(event => { if (!event.player.persistentData.contains('hasJoinedBefore')) { event.player.persistentData.putBoolean('hasJoinedBefore', false) event.player.give('128x kubejs:sigma') } })
neather this :
PlayerEvent.loggedIn(event => {
if (!event.player.persistentData.contains('firstjoin')) {
event.player.persistentData.putBoolean('firstjoin', true)
event.player.give('128x kubejs:sigma')
}
})```
works
ooh imma try this thanks (I hadn't saw your msg lol)
did you create a new world, or remove the persistent data for this to work?
oui (yes)
wait, is this a sever event ?
well that's what I did
idk, just wanted to be sure... for no reason
stil that's very weird... whyè doesn't it work
would that be possible that this option would be disactivated by one of the mods that gives a book ?
okay ; I've done some more testing, and it appears to be, the PlayerEvent.loggedIn(event => { that doesn't work
imma try this on a server
indeed, in the logs i've got PlayerEvent isn't defined
MYSELF : BE CURSED
I forgot the "s"


as ou say...
i'm testing, then if it works i'll close the thread
"kitty dead" - from server polar bear
but This, doesn't work
polar bears

oh its the cats server that changed to polar bears for april fools lmao
lmao
haha
mine too
everyone renamed themself fish
it's awfull
okay, now it works ! (what are the other slots' name ?)
htanks you everyone, it works perfect now
Ticket closed!
also if someone needs, there is the final code
PlayerEvents.loggedIn(event => {
if (!event.player.stages.has('starting_items')) {
event.player.stages.add('starting_items')
event.player.give('128x kubejs:sigma')
event.player.setHeadArmorItem('funkube_ressources:civilian_helmet')
event.player.setChestArmorItem('funkube_ressources:civilian_chestplate')
event.player.setLegsArmorItem('funkube_ressources:civilian_leggings')
event.player.setFeetArmorItem('funkube_ressources:civilian_boots')
}
})``` (ofc replace the item names)

