Repository navigation
First Join Rewards
English | 简体中文
Gives items and equipment and runs commands when a new player joins a world for the first time. The settings are in config/kineticcore/player.toml and can also be edited in F6.
Both conditions must hold:
- The player does not have the "received" mark;
- The player has played this world for no more than 1 minute.
So testing in an old world you have already played in gives nothing; create a new world to test.
- Wait
delay_ticks(20 ticks by default). - If
clear_inventory = true, clear the 9 hotbar slots (inventory and equipment are kept). - Put
itemsinto their slots, putarmorinto its slots, then runcommands. - The "received" mark is set only once everything was granted.
If an item in the config is wrong and fails to parse, nothing is cleared, granted or marked this time, and the log shows [FirstJoin] 物品解析失败 (item parse failed). After fixing the config, the player still gets the rewards when rejoining within the first minute of play.
[first_join]
enable = true
clear_inventory = true
delay_ticks = 20
items = ["[0] 1x minecraft:iron_sword", "[1] 32x minecraft:bread", "[2] 16x minecraft:apple"]
commands = ["say Welcome @s!"]
[first_join.armor]
helmet = "1x minecraft:leather_helmet[enchantments={\"minecraft:protection\":2}]"
offhand = "1x minecraft:shield"- An
itemsentry is[slot] countx itemID; slots 0–8 are the hotbar. Without a slot, items fill slots in order. - Item data is written differently on each Minecraft version, see Item Text Syntax. The armor above uses the 26.1.2 syntax.
-
@sand@playerincommandsare replaced with the player's name; commands need no/.
An operator puts the items and equipment to hand out into their own inventory and equipment slots and runs /kt setfirstjoin. The current inventory, equipment and offhand are written to the config in the correct syntax for that version.