mirror of
https://github.com/WiIIiam278/HuskSync.git
synced 2025-12-26 01:59:20 +00:00
Tweak logic for determining if a player is dead, fix issues with <1HP players being detected dead
This commit is contained in:
@@ -321,6 +321,7 @@ public abstract class OnlineUser extends User {
|
||||
if (!isOffline()) {
|
||||
if (settings.getSynchronizationFeature(Settings.SynchronizationFeature.INVENTORIES)) {
|
||||
if (isDead() && settings.saveDeadPlayerInventories) {
|
||||
logger.debug("Player " + username + " is dead, so their inventory will be set to empty.");
|
||||
add(CompletableFuture.runAsync(() -> builder.setInventory(ItemData.empty())));
|
||||
} else {
|
||||
add(getInventory().thenAccept(builder::setInventory));
|
||||
|
||||
Reference in New Issue
Block a user