The Twilight Forest

The Twilight Forest

143M Downloads

Message "[twilightforest]: Mod was keeping bauble items in reserve for player %s but they logged out! Items are being dropped." on player disconnect

fraenkelc opened this issue ยท 2 comments

commented

Forge version: forge-14.23.4.2703
Twilight Forest version: twilightforest-1.12.2-3.7.424-universal.jar

Steps to reproduce:

  1. player disconnects from server

What I expected to happen:
I only expect log messages relating to dropped baubles if there are actually dropped baubles

What happened instead:
Log messages appear on every disconnect

The logging guard in

if (keepInventory == null)
TwilightForestMod.LOGGER.warn("Mod was keeping bauble items in reserve for player %s but they logged out! Items are being dropped.", player.getName());
ItemStack[] baubles = playerKeepsMapBaubles.remove(player.getUniqueID());
if (baubles != null)
for (ItemStack itemStack : baubles)
if (!itemStack.isEmpty())
player.dropItem(itemStack, true, false);
looks wrong, especially when compared to the one a few lines above:
InventoryPlayer keepInventory = playerKeepsMap.remove(player.getUniqueID());
if (keepInventory != null) {
TwilightForestMod.LOGGER.warn("Mod was keeping inventory items in reserve for player %s but they logged out! Items are being dropped.", player.getName());
// set player to the player logging out
keepInventory.player = player;
keepInventory.dropAllItems();
}

commented

I am seeing this as well. Is this not an issue? Warnings should be warnings when they are warnings right? False warnings are always good to tamper.

commented

False warnings have been resolved in the latest version, 3.8.654. If you are seeing that message as of this update, you might be experiencing a real problem