fix(ignis): retain Echo recovery warnings during shutdown
Report failed reward saves independently of the tick callback with owner and receipt identifiers. Verify the approved lightweight consumption, inert-copy and failure/retry contract using native inventories and real persistence. Keep cross-save hard-crash recovery an explicit operator limitation; add no autosave-length restrictions or transaction protocol.
This commit is contained in:
1 parent
5bfcf36f04
commit
3f721e928a
4 files changed
+337
-8
No files matched your search
@@ -60,13 +60,19 @@ public final class EchoGameplay implements Listener {
|
||||
UUID owner = player.getUniqueId(), receipt = UUID.randomUUID();
|
||||
long generation = states.snapshot().players().getOrDefault(owner, PlayerState.empty()).track(Track.VOID).generation();
|
||||
states.update(state -> state.players().getOrDefault(owner, PlayerState.empty()).track(Track.VOID).generation() == generation
|
||||
? EchoRewards.award(state, owner, receipt) : state).whenComplete((state, error) -> onServer(() -> {
|
||||
? EchoRewards.award(state, owner, receipt) : state).whenComplete((state, error) -> {
|
||||
// Report independently of the tick callback: disable can prevent its delivery.
|
||||
if (error != null) {
|
||||
plugin.getLogger().warning("Echo reward save failed; administrator recovery is required.");
|
||||
Player online = plugin.getServer().getPlayer(owner);
|
||||
if (online != null) online.sendMessage("Your void reward could not be saved. Please contact an administrator.");
|
||||
} else retryDeliveries();
|
||||
}));
|
||||
plugin.getLogger().warning("Echo reward save failed for " + owner + " (receipt " + receipt
|
||||
+ "); administrator recovery is required.");
|
||||
}
|
||||
onServer(() -> {
|
||||
if (error != null) {
|
||||
Player online = plugin.getServer().getPlayer(owner);
|
||||
if (online != null) online.sendMessage("Your void reward could not be saved. Please contact an administrator.");
|
||||
} else retryDeliveries();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user