add first patch

This commit is contained in:
2026-07-31 10:34:32 +09:00
parent 03aac2e45e
commit b1cbc6c78d
6390 changed files with 547430 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
console.info("[SOCIETY] handleDebt.js loaded");
CommonAddedEvents.playerRespawn((e) => {
const { player, server } = e;
if (global.enableDeathDebt) {
if (!player.stages.has("first_death")) {
player.stages.add("first_death");
let noteTitle = global.translatableWithFallback("society.hospital_receipt.first_death.title", "Hospital Note").getString();
let noteAuthor = global.translatableWithFallback("society.hospital_receipt.author", "Sunlit Valley Hospital").getString();
let noteText = Text.translatable("society.hospital_receipt.first_death").toJson();
player.give(
global.getNotePaperItem(noteAuthor, noteText, noteTitle)
);
} else {
global.handleFee(server, player, "death");
if (!player.stages.has("first_aid_guide") && Math.random() <= 0.01)
player.give("society:first_aid_guide");
}
player.potionEffects.add("minecraft:slowness", 1200, 0, false, true);
}
});