Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
234 commits
Select commit Hold shift + click to select a range
0a04cc2
Add temporary source export workflow
remdui Aug 2, 2026
8927963
Run temporary source export for pull requests
remdui Aug 2, 2026
2434451
Trigger Graveyard implementation workspace
remdui Aug 2, 2026
47e7772
Add temporary patch application workflow
remdui Aug 2, 2026
e1b0d57
Decode compressed implementation patches
remdui Aug 2, 2026
66f95f8
Apply Graveyard implementation patch
remdui Aug 2, 2026
a43826b
Apply pending Graveyard patches from PR workflow
remdui Aug 2, 2026
84b4f24
Apply chunked Graveyard implementation patches
remdui Aug 2, 2026
89c10c1
Upload Graveyard patch chunk 00
remdui Aug 2, 2026
46b1419
Upload Graveyard patch chunk 01
remdui Aug 2, 2026
6bfe58b
Upload Graveyard patch chunk 02
remdui Aug 2, 2026
0be3e98
Upload Graveyard patch chunk 03
remdui Aug 2, 2026
7be86dd
Upload Graveyard patch chunk 04
remdui Aug 2, 2026
385ef85
Upload Graveyard patch chunk 05
remdui Aug 2, 2026
77f96af
Upload Graveyard patch chunk 06
remdui Aug 2, 2026
1067e7d
Upload Graveyard patch chunk 07
remdui Aug 2, 2026
b4ef90a
Log Graveyard patch integrity before application
remdui Aug 2, 2026
46b480e
Upload corrected Graveyard patch chunk 00
remdui Aug 2, 2026
27958df
Use verified Graveyard patch chunks
remdui Aug 2, 2026
8669a4e
Implement Graveyard death recovery
github-actions[bot] Aug 2, 2026
4d2fb39
Queue Graveyard compile fixes
remdui Aug 2, 2026
35a113a
Support iterative Graveyard update patches
remdui Aug 2, 2026
62aa6b1
Fix Graveyard implementation
github-actions[bot] Aug 2, 2026
b314f32
Add Graveyard hardening, tests, and documentation
remdui Aug 2, 2026
83ee746
Fix Graveyard implementation
github-actions[bot] Aug 2, 2026
9260845
Fix Graveyard purge and corrupt payload handling
remdui Aug 2, 2026
44b623b
Fix Graveyard implementation
github-actions[bot] Aug 2, 2026
63a6349
Apply final Graveyard crash-safety hardening
remdui Aug 2, 2026
467e2ce
Harden temporary Graveyard patch decoding
remdui Aug 2, 2026
50fa7dc
Remove invalid Graveyard update patch payload
remdui Aug 2, 2026
f9eaf27
Support verified chunked Graveyard update patches
remdui Aug 2, 2026
32b0919
Upload verified Graveyard hardening chunk 00
remdui Aug 2, 2026
eba9d97
Upload verified Graveyard hardening chunk 01
remdui Aug 2, 2026
8819608
Upload verified Graveyard hardening chunk 02
remdui Aug 2, 2026
7bf2b71
Apply verified Graveyard hardening patch
remdui Aug 2, 2026
33eee13
Cancel queued Graveyard patch application
remdui Aug 2, 2026
49d3fac
Apply final Graveyard hardening patch
remdui Aug 2, 2026
b66eb3d
Prepare reviewed Graveyard patch
remdui Aug 2, 2026
cbd5378
Upload reviewed Graveyard patch 1/8
remdui Aug 2, 2026
9578d5f
Upload reviewed Graveyard patch 2/8
remdui Aug 2, 2026
ef7c76f
Upload reviewed Graveyard patch 3/8
remdui Aug 2, 2026
f3846b3
Upload reviewed Graveyard patch 4/8
remdui Aug 2, 2026
7944338
Upload reviewed Graveyard patch 5/8
remdui Aug 2, 2026
c9322f2
Upload reviewed Graveyard patch 6/8
remdui Aug 2, 2026
1fcb2e1
Upload reviewed Graveyard patch 7/8
remdui Aug 2, 2026
e06b16c
Upload reviewed Graveyard patch 8/8
remdui Aug 2, 2026
bfbeef6
Verify reviewed Graveyard patch integrity
remdui Aug 2, 2026
e24c0c0
Apply reviewed Graveyard hardening
remdui Aug 2, 2026
dcfb1dc
Review and harden Graveyard for production
github-actions[bot] Aug 2, 2026
e156a77
Upload Graveyard test fixture fix
remdui Aug 2, 2026
fc9fb77
Apply Graveyard test fixture fix
remdui Aug 2, 2026
f5d901a
Review and harden Graveyard for production
github-actions[bot] Aug 2, 2026
82623fc
Remove Graveyard implementation workspace files
remdui Aug 3, 2026
f860817
Remove Graveyard implementation workspace files
remdui Aug 3, 2026
db77704
Remove Graveyard implementation workspace files
remdui Aug 3, 2026
f826778
Fix Graveyard test warnings under Java 25
remdui Aug 3, 2026
62bf0bc
Fix Graveyard test warnings under Java 25
remdui Aug 3, 2026
87cd22f
Harden Graveyard journal numeric parsing
remdui Aug 3, 2026
3e5e969
Test malformed Graveyard journal numeric fields
remdui Aug 3, 2026
9a1ff3c
Stage final Graveyard merge patch
remdui Aug 3, 2026
504f4a8
Queue final Graveyard merge patch
remdui Aug 3, 2026
61bcb7f
Stabilize Graveyard item-stack test doubles
remdui Aug 3, 2026
b82dbd3
Remove remaining Graveyard patch transport files
remdui Aug 3, 2026
1f4feac
Remove remaining Graveyard patch transport files
remdui Aug 3, 2026
fec6f27
Refresh final Graveyard merge patch
remdui Aug 3, 2026
fc24789
Refresh final Graveyard patch checksum
remdui Aug 3, 2026
002c23c
Split final Graveyard patch 1/5
remdui Aug 3, 2026
4d6681d
Split final Graveyard patch 2/5
remdui Aug 3, 2026
17378f6
Split final Graveyard patch 3/5
remdui Aug 3, 2026
ad23f26
Split final Graveyard patch 4/5
remdui Aug 3, 2026
780374e
Split final Graveyard patch 5/5
remdui Aug 3, 2026
25edfbc
Decouple Graveyard payload tests from the Paper registry
remdui Aug 3, 2026
6667421
Use a registry-independent Graveyard item codec in tests
remdui Aug 3, 2026
a21a713
Use the injectable Graveyard item codec in claim tests
remdui Aug 3, 2026
3207af8
Use the injectable Graveyard item codec in payload tests
remdui Aug 3, 2026
bb81223
Refresh Graveyard final patch 1/4
remdui Aug 3, 2026
9639c2c
Refresh Graveyard final patch 2/4
remdui Aug 3, 2026
acec58b
Refresh Graveyard final patch 3/4
remdui Aug 3, 2026
5eae340
Refresh Graveyard final patch 4/4
remdui Aug 3, 2026
dd0344d
Remove obsolete Graveyard patch chunk
remdui Aug 3, 2026
6ad3950
Finalize Graveyard patch checksum
remdui Aug 3, 2026
45ddc4d
Review and harden Graveyard for production
github-actions[bot] Aug 3, 2026
d5e65d7
Avoid deprecated Mockito lenient mock settings
remdui Aug 3, 2026
249f48c
Stage Graveyard retention hardening
remdui Aug 3, 2026
7504596
Stage final Graveyard journal hardening
remdui Aug 3, 2026
4ab2069
Queue final Graveyard journal hardening
remdui Aug 3, 2026
987de7b
Stage verified Graveyard retention patch
remdui Aug 3, 2026
94a14f8
Review and harden Graveyard for production
github-actions[bot] Aug 3, 2026
028bc72
Apply Graveyard retention hardening
remdui Aug 3, 2026
1bee299
Remove temporary Graveyard retention patch
remdui Aug 3, 2026
e739b7f
Remove temporary Graveyard retention marker
remdui Aug 3, 2026
d6ecb45
Remove temporary Graveyard retention workflow
remdui Aug 3, 2026
0179cbf
Fix registry-free grave drop validation
remdui Aug 3, 2026
2357746
Fix registry-free grave inventory validation
remdui Aug 3, 2026
11fa89d
Fix registry-free grave payload validation
remdui Aug 3, 2026
efea0ec
Add temporary source export workflow
remdui Aug 2, 2026
e8407bd
Run temporary source export for pull requests
remdui Aug 2, 2026
a36b84d
Trigger Graveyard implementation workspace
remdui Aug 2, 2026
0b8f449
Add temporary patch application workflow
remdui Aug 2, 2026
b1f4c71
Decode compressed implementation patches
remdui Aug 2, 2026
7803059
Apply Graveyard implementation patch
remdui Aug 2, 2026
1526e68
Apply pending Graveyard patches from PR workflow
remdui Aug 2, 2026
e4947ed
Apply chunked Graveyard implementation patches
remdui Aug 2, 2026
f1b3bf4
Upload Graveyard patch chunk 00
remdui Aug 2, 2026
b404b4b
Upload Graveyard patch chunk 01
remdui Aug 2, 2026
55231c7
Upload Graveyard patch chunk 02
remdui Aug 2, 2026
647c605
Upload Graveyard patch chunk 03
remdui Aug 2, 2026
1ed8950
Upload Graveyard patch chunk 04
remdui Aug 2, 2026
c292de8
Upload Graveyard patch chunk 05
remdui Aug 2, 2026
0957d0c
Upload Graveyard patch chunk 06
remdui Aug 2, 2026
dd0d83c
Upload Graveyard patch chunk 07
remdui Aug 2, 2026
084e802
Log Graveyard patch integrity before application
remdui Aug 2, 2026
be13526
Upload corrected Graveyard patch chunk 00
remdui Aug 2, 2026
b6e0ea4
Use verified Graveyard patch chunks
remdui Aug 2, 2026
02c5605
Implement Graveyard death recovery
github-actions[bot] Aug 2, 2026
0b5c954
Queue Graveyard compile fixes
remdui Aug 2, 2026
1366fb5
Support iterative Graveyard update patches
remdui Aug 2, 2026
a8ffced
Fix Graveyard implementation
github-actions[bot] Aug 2, 2026
0d1b161
Add Graveyard hardening, tests, and documentation
remdui Aug 2, 2026
560c155
Fix Graveyard implementation
github-actions[bot] Aug 2, 2026
e100117
Fix Graveyard purge and corrupt payload handling
remdui Aug 2, 2026
7f82f36
Fix Graveyard implementation
github-actions[bot] Aug 2, 2026
8d7bc26
Apply final Graveyard crash-safety hardening
remdui Aug 2, 2026
93ce318
Harden temporary Graveyard patch decoding
remdui Aug 2, 2026
d1a2a1a
Remove invalid Graveyard update patch payload
remdui Aug 2, 2026
1c2e9e9
Support verified chunked Graveyard update patches
remdui Aug 2, 2026
f739a93
Upload verified Graveyard hardening chunk 00
remdui Aug 2, 2026
b754cc4
Upload verified Graveyard hardening chunk 01
remdui Aug 2, 2026
37a2d39
Upload verified Graveyard hardening chunk 02
remdui Aug 2, 2026
c1eb6fe
Apply verified Graveyard hardening patch
remdui Aug 2, 2026
c99cc94
Cancel queued Graveyard patch application
remdui Aug 2, 2026
5d8c082
Apply final Graveyard hardening patch
remdui Aug 2, 2026
8e0c182
Prepare reviewed Graveyard patch
remdui Aug 2, 2026
9ad51cc
Upload reviewed Graveyard patch 1/8
remdui Aug 2, 2026
c430d4d
Upload reviewed Graveyard patch 2/8
remdui Aug 2, 2026
53ba8ea
Upload reviewed Graveyard patch 3/8
remdui Aug 2, 2026
e95140d
Upload reviewed Graveyard patch 4/8
remdui Aug 2, 2026
bb5deb2
Upload reviewed Graveyard patch 5/8
remdui Aug 2, 2026
4f4c723
Upload reviewed Graveyard patch 6/8
remdui Aug 2, 2026
5b03bc9
Upload reviewed Graveyard patch 7/8
remdui Aug 2, 2026
c16bb6e
Upload reviewed Graveyard patch 8/8
remdui Aug 2, 2026
e712864
Verify reviewed Graveyard patch integrity
remdui Aug 2, 2026
f8e0b0a
Apply reviewed Graveyard hardening
remdui Aug 2, 2026
58703b6
Review and harden Graveyard for production
github-actions[bot] Aug 2, 2026
d54c555
Upload Graveyard test fixture fix
remdui Aug 2, 2026
971fb1a
Apply Graveyard test fixture fix
remdui Aug 2, 2026
3dc1835
Review and harden Graveyard for production
github-actions[bot] Aug 2, 2026
3108be7
Remove Graveyard implementation workspace files
remdui Aug 3, 2026
ca77857
Remove Graveyard implementation workspace files
remdui Aug 3, 2026
c01aa8a
Remove Graveyard implementation workspace files
remdui Aug 3, 2026
cdec2a5
Fix Graveyard test warnings under Java 25
remdui Aug 3, 2026
c081106
Fix Graveyard test warnings under Java 25
remdui Aug 3, 2026
2467a2d
Harden Graveyard journal numeric parsing
remdui Aug 3, 2026
b057c67
Test malformed Graveyard journal numeric fields
remdui Aug 3, 2026
13fa23b
Stage final Graveyard merge patch
remdui Aug 3, 2026
43f756b
Queue final Graveyard merge patch
remdui Aug 3, 2026
6482a33
Stabilize Graveyard item-stack test doubles
remdui Aug 3, 2026
f5813af
Remove remaining Graveyard patch transport files
remdui Aug 3, 2026
f770d07
Remove remaining Graveyard patch transport files
remdui Aug 3, 2026
a2376fc
Refresh final Graveyard merge patch
remdui Aug 3, 2026
8dd8a6e
Refresh final Graveyard patch checksum
remdui Aug 3, 2026
7fe1c5d
Split final Graveyard patch 1/5
remdui Aug 3, 2026
5fbe7d8
Split final Graveyard patch 2/5
remdui Aug 3, 2026
a943fb1
Split final Graveyard patch 3/5
remdui Aug 3, 2026
0920611
Split final Graveyard patch 4/5
remdui Aug 3, 2026
bbc3495
Split final Graveyard patch 5/5
remdui Aug 3, 2026
f5c0fbe
Decouple Graveyard payload tests from the Paper registry
remdui Aug 3, 2026
30c3cd1
Use a registry-independent Graveyard item codec in tests
remdui Aug 3, 2026
b7e9227
Use the injectable Graveyard item codec in claim tests
remdui Aug 3, 2026
98a9728
Use the injectable Graveyard item codec in payload tests
remdui Aug 3, 2026
04b2f81
Refresh Graveyard final patch 1/4
remdui Aug 3, 2026
2896d8c
Refresh Graveyard final patch 2/4
remdui Aug 3, 2026
64e5245
Refresh Graveyard final patch 3/4
remdui Aug 3, 2026
048a712
Refresh Graveyard final patch 4/4
remdui Aug 3, 2026
0517de9
Remove obsolete Graveyard patch chunk
remdui Aug 3, 2026
5c2c831
Finalize Graveyard patch checksum
remdui Aug 3, 2026
d64d25b
Review and harden Graveyard for production
github-actions[bot] Aug 3, 2026
aa4361f
Avoid deprecated Mockito lenient mock settings
remdui Aug 3, 2026
e931ed2
Stage Graveyard retention hardening
remdui Aug 3, 2026
8c8f548
Stage final Graveyard journal hardening
remdui Aug 3, 2026
60ad62c
Queue final Graveyard journal hardening
remdui Aug 3, 2026
07bacd4
Stage verified Graveyard retention patch
remdui Aug 3, 2026
fffd7bb
Review and harden Graveyard for production
github-actions[bot] Aug 3, 2026
5965587
Apply Graveyard retention hardening
remdui Aug 3, 2026
d6d6ba9
Remove temporary Graveyard retention patch
remdui Aug 3, 2026
fcf6fff
Remove temporary Graveyard retention marker
remdui Aug 3, 2026
7471496
Remove temporary Graveyard retention workflow
remdui Aug 3, 2026
f713c67
Fix registry-free grave drop validation
remdui Aug 3, 2026
a9bc525
Fix registry-free grave inventory validation
remdui Aug 3, 2026
0ea3a0f
Fix registry-free grave payload validation
remdui Aug 3, 2026
9745642
Add temporary Graveyard debug workspace
remdui Aug 3, 2026
ae3e341
Merge branch 'agent/graveyard-feature' of github.com:HauntedMC/Server…
remdui Aug 3, 2026
5443f3b
Stage Graveyard runtime fixes
remdui Aug 3, 2026
4ead6e9
Merge branch 'agent/graveyard-feature' of github.com:HauntedMC/Server…
remdui Aug 3, 2026
e2f2256
Stage Graveyard final patch 1/5
remdui Aug 3, 2026
7e0d591
Stage Graveyard final patch 2/5
remdui Aug 3, 2026
2a2c174
Merge branch 'agent/graveyard-feature' of github.com:HauntedMC/Server…
remdui Aug 3, 2026
7a1e4a6
Bump version to v3.1.8 for release
remdui Aug 3, 2026
215cbde
Stage Graveyard runtime fixes 1/7
remdui Aug 3, 2026
8c7168f
Stage Graveyard runtime fixes 2/7
remdui Aug 3, 2026
714a913
Stage Graveyard runtime fixes 3/7
remdui Aug 3, 2026
9cdc1f3
Stage Graveyard runtime fixes 4/7
remdui Aug 3, 2026
6ab7181
Stage Graveyard runtime fixes 5/7
remdui Aug 3, 2026
be5133d
Stage Graveyard runtime fixes 6/7
remdui Aug 3, 2026
e606fdb
Stage Graveyard runtime fixes 7/7
remdui Aug 3, 2026
4234098
Apply Graveyard runtime corrections
remdui Aug 3, 2026
006da3e
Apply Graveyard fixes without self-patching workflow
remdui Aug 3, 2026
f25e446
Fix Graveyard rendering, identifiers, and lifecycle
github-actions[bot] Aug 3, 2026
6dbcdc9
Stage Graveyard import correction
remdui Aug 3, 2026
6bfbf3f
Apply Graveyard import correction
remdui Aug 3, 2026
68842e3
Fix Graveyard status import
github-actions[bot] Aug 3, 2026
9488dce
Test Graveyard public API contracts
remdui Aug 3, 2026
c4d2051
Stage missing Graveyard source and tests
remdui Aug 3, 2026
c6a72e5
Apply missing Graveyard source and tests
remdui Aug 3, 2026
fe5525e
Correct Graveyard missing-files patch
remdui Aug 3, 2026
bf14a26
Apply corrected Graveyard missing source patch
remdui Aug 3, 2026
3bba692
Validate and apply corrected Graveyard patch
remdui Aug 3, 2026
a2da196
Add readable Graveyard identifiers
remdui Aug 3, 2026
d765f95
Test readable Graveyard identifiers
remdui Aug 3, 2026
95bbfd6
Test typed Graveyard packet send boundary
remdui Aug 3, 2026
c9f511e
Test Graveyard table prefixes
remdui Aug 3, 2026
1791117
Test Graveyard command state visibility
remdui Aug 3, 2026
c52cd24
Finalize Graveyard source cleanup
remdui Aug 3, 2026
8e3dffd
Complete Graveyard runtime fix coverage
github-actions[bot] Aug 3, 2026
cd6f328
Synchronize Graveyard with current main
remdui Aug 3, 2026
fa77078
Merge remote-tracking branch 'origin/main' into agent/graveyard-feature
github-actions[bot] Aug 3, 2026
80a0210
Remove Graveyard branch sync workflow
github-actions[bot] Aug 3, 2026
79b8461
Handle all virtual grave interaction actions
remdui Aug 4, 2026
72504b3
Test virtual grave click actions
remdui Aug 4, 2026
7159b34
Stage Graveyard interaction hardening
remdui Aug 4, 2026
cfaf2f7
Trigger Graveyard interaction hardening
remdui Aug 4, 2026
7077c2a
Use PR trigger for interaction hardening
remdui Aug 4, 2026
d4e8fca
Remove temporary interaction workflow
remdui Aug 4, 2026
80b9513
Document virtual grave click handling
remdui Aug 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/features/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ This directory documents all **58** feature modules currently present in ServerF
- [DurabilityAlert](durabilityalert.md) — Warns players when equipped or used items cross configured durability thresholds.
- [VillagerOptimizer](villageroptimizer.md) — Reduces villager processing cost by applying configurable optimization rules without changing intended gameplay more than necessary.
- [WorldEditVisualizer](worldeditvisualizer.md) — Visualizes WorldEdit selections for authorized builders with temporary particles or display markers.
- [Graveyard](graveyard.md) — Stores death contents durably and renders claimable packet-only graves with active-server-time expiry and crash recovery.

## Moderation and administration

Expand Down
254 changes: 254 additions & 0 deletions docs/features/graveyard.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</modules>

<properties>
<revision>3.1.7</revision>
<revision>3.1.8</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<project.build.outputTimestamp>2026-07-26T00:00:00Z</project.build.outputTimestamp>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package nl.hauntedmc.serverfeatures.api.graveyard;

/**
* Why a grave claim was initiated.
*/
public enum ClaimReason {
PHYSICAL_INTERACTION,
REMOTE_UNREACHABLE,
STAFF_DELIVERY,
PENDING_DELIVERY,
ADMIN_RECOVERY
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package nl.hauntedmc.serverfeatures.api.graveyard;

/**
* Terminal result reported by a Graveyard claim request.
*/
public enum GraveClaimOutcome {
CLAIMED,
PARTIAL,
DELIVERY_QUEUED,
RECOVERY_PENDING,
NOTHING_FIT,
NOT_FOUND,
NOT_OWNER,
NOT_CLAIMABLE,
WRONG_INVENTORY_SCOPE,
BUSY,
FAILED
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package nl.hauntedmc.serverfeatures.api.graveyard;

import java.util.UUID;

/**
* Immutable result of one grave claim attempt.
*/
public record GraveClaimResult(
UUID graveId,
GraveClaimOutcome outcome,
int transferredEntries,
int remainingEntries,
int transferredExperience,
String message
) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package nl.hauntedmc.serverfeatures.api.graveyard;

import java.util.UUID;

/**
* Read-only grave metadata exposed to other features and plugins.
*/
public record GraveSnapshot(
UUID graveId,
String shortId,
UUID ownerUuid,
String ownerName,
String serverId,
String inventoryScope,
UUID worldUuid,
String worldKey,
double x,
double y,
double z,
GraveStatus status,
boolean remoteOnly,
long remainingActiveMillis,
int itemEntryCount,
int remainingExperience
) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package nl.hauntedmc.serverfeatures.api.graveyard;

/**
* Durable lifecycle state of a Graveyard grave.
*/
public enum GraveStatus {
ACTIVE,
PARTIAL,
ORPHANED_WORLD,
DELIVERY_PENDING,
CLAIMED,
EXPIRED,
CORRUPT,
ADMIN_RECOVERED,
PURGED;

public boolean isVisible() {
return this == ACTIVE || this == PARTIAL;
}

public boolean isPlayerClaimable() {
return this == ACTIVE || this == PARTIAL || this == ORPHANED_WORLD;
}

public boolean hasRecoverablePayload() {
return this != CLAIMED && this != ADMIN_RECOVERED && this != PURGED;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package nl.hauntedmc.serverfeatures.api.graveyard;

import java.util.List;
import java.util.Optional;
import java.util.UUID;
import java.util.concurrent.CompletionStage;

/**
* Public, ownership-safe access to Graveyard metadata and claim requests.
*/
public interface GraveyardService {
Optional<GraveSnapshot> find(UUID graveId);

Optional<GraveSnapshot> findByShortId(String shortId);

List<GraveSnapshot> findActiveByOwner(UUID ownerUuid);

CompletionStage<GraveClaimResult> requestClaim(
UUID graveId,
UUID ownerUuid,
ClaimReason reason
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
package nl.hauntedmc.serverfeatures.api.graveyard;

import org.junit.jupiter.api.Test;

import java.util.UUID;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.Assertions.assertTrue;

class GraveyardApiTest {

@Test
void enumContractsExposeEverySupportedValue() {
assertEquals(5, ClaimReason.values().length);
assertSame(ClaimReason.PHYSICAL_INTERACTION, ClaimReason.valueOf("PHYSICAL_INTERACTION"));

assertEquals(11, GraveClaimOutcome.values().length);
assertSame(GraveClaimOutcome.RECOVERY_PENDING, GraveClaimOutcome.valueOf("RECOVERY_PENDING"));

assertEquals(9, GraveStatus.values().length);
assertSame(GraveStatus.DELIVERY_PENDING, GraveStatus.valueOf("DELIVERY_PENDING"));
}

@Test
void statusCapabilitiesMatchTheLifecycleContract() {
assertTrue(GraveStatus.ACTIVE.isVisible());
assertTrue(GraveStatus.PARTIAL.isVisible());
assertFalse(GraveStatus.EXPIRED.isVisible());

assertTrue(GraveStatus.ACTIVE.isPlayerClaimable());
assertTrue(GraveStatus.PARTIAL.isPlayerClaimable());
assertTrue(GraveStatus.ORPHANED_WORLD.isPlayerClaimable());
assertFalse(GraveStatus.DELIVERY_PENDING.isPlayerClaimable());

assertTrue(GraveStatus.CORRUPT.hasRecoverablePayload());
assertFalse(GraveStatus.CLAIMED.hasRecoverablePayload());
assertFalse(GraveStatus.ADMIN_RECOVERED.hasRecoverablePayload());
assertFalse(GraveStatus.PURGED.hasRecoverablePayload());
}

@Test
void immutableResultAndSnapshotPreserveTheirValues() {
UUID graveId = UUID.randomUUID();
UUID ownerId = UUID.randomUUID();
UUID worldId = UUID.randomUUID();
GraveClaimResult result = new GraveClaimResult(
graveId,
GraveClaimOutcome.PARTIAL,
3,
2,
17,
"partial"
);
GraveSnapshot snapshot = new GraveSnapshot(
graveId,
"remymine-world-20260804-002600-000",
ownerId,
"remymine",
"demo",
"demo",
worldId,
"minecraft:world",
10.5,
64.0,
-20.5,
GraveStatus.PARTIAL,
false,
60_000L,
2,
17
);

assertEquals(graveId, result.graveId());
assertEquals(GraveClaimOutcome.PARTIAL, result.outcome());
assertEquals(3, result.transferredEntries());
assertEquals(2, result.remainingEntries());
assertEquals(17, result.transferredExperience());
assertEquals("partial", result.message());

assertEquals(graveId, snapshot.graveId());
assertEquals("remymine-world-20260804-002600-000", snapshot.shortId());
assertEquals(ownerId, snapshot.ownerUuid());
assertEquals("remymine", snapshot.ownerName());
assertEquals("demo", snapshot.serverId());
assertEquals("demo", snapshot.inventoryScope());
assertEquals(worldId, snapshot.worldUuid());
assertEquals("minecraft:world", snapshot.worldKey());
assertEquals(10.5, snapshot.x());
assertEquals(64.0, snapshot.y());
assertEquals(-20.5, snapshot.z());
assertEquals(GraveStatus.PARTIAL, snapshot.status());
assertFalse(snapshot.remoteOnly());
assertEquals(60_000L, snapshot.remainingActiveMillis());
assertEquals(2, snapshot.itemEntryCount());
assertEquals(17, snapshot.remainingExperience());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import nl.hauntedmc.serverfeatures.framework.listener.ScoreboardListener;
import nl.hauntedmc.serverfeatures.framework.loader.FeatureLoadManager;
import nl.hauntedmc.serverfeatures.framework.localization.LocalizationHandler;
import nl.hauntedmc.serverfeatures.framework.time.ServerActiveClock;
import org.bukkit.Bukkit;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
Expand All @@ -32,6 +33,7 @@ public class ServerFeatures extends JavaPlugin {
private ConfigService configService;
private FeatureLifecycleFactory featureLifecycleFactory;
private FeatureScopeFactory featureScopeFactory;
private ServerActiveClock serverActiveClock;

// Keep if other parts of your framework still use dispatcher (features registering their own brig nodes).
private BrigadierDispatcher brigadierDispatcher;
Expand All @@ -53,6 +55,8 @@ public void onEnable() {
localizationHandler,
featureLifecycleFactory
);
serverActiveClock = new ServerActiveClock(this);
serverActiveClock.start();
featureLoadManager = FeatureLoadManager.create(this);

// Optional: if your feature system still needs direct dispatcher access elsewhere
Expand Down Expand Up @@ -92,6 +96,10 @@ public void onDisable() {
((PaperActionBarAPI) ActionBars.service()).shutdown();
ActionBars.shutdown();

if (serverActiveClock != null) {
serverActiveClock.close();
}

getLogger().info("ServerFeatures is shutting down...");
}

Expand Down Expand Up @@ -131,6 +139,10 @@ public BrigadierDispatcher getBrigadierDispatcher() {
return brigadierDispatcher;
}

public ServerActiveClock getServerActiveClock() {
return serverActiveClock;
}

public Optional<DataRegistryApi> getDataRegistry() {
return Optional.ofNullable(Bukkit.getPluginManager().getPlugin("DataRegistry"))
.filter(DataRegistryApiProvider.class::isInstance)
Expand Down
Loading