Reinitailized repository

This commit is contained in:
Malasaur 2026-02-08 21:40:15 +01:00
commit b4fb99fc02
No known key found for this signature in database
2864 changed files with 697863 additions and 0 deletions

View file

@ -0,0 +1,23 @@
// Makes Tickets of Eternal Keeping not consumed on death.
const tickets = {};
EntityEvents.death((event) => {
const player = event.player;
if (event.entity.isPlayer()) {
tickets[player.uuid] = null;
player.inventory.allItems.forEach((item) => {
if (item.nbt && item.nbt.EternalKeep) tickets[player.uuid] = item.copy();
});
}
});
PlayerEvents.respawned((event) => {
const player = event.player;
const ticket = tickets[player.uuid];
if (ticket != null) player.give(Item.of(ticket, 1));
tickets[player.uuid] = null;
});