EMI Loot

EMI Loot

5M Downloads

Sending packets to unsupported clients

Linguardium opened this issue ยท 1 comments

commented

public void registerServer(){
ServerPlayConnectionEvents.JOIN.register((handler, sender, server) ->{
if (!hasPostProcessed()){
EMILoot.LOGGER.warn("Post-processing not completed for some reason, completing now...");
for (PostProcessor process: PostProcessor.values()){
postProcess(process);
}
EMILoot.LOGGER.warn("Post-processing complete!");
}
if (EMILoot.config.parseChestLoot)
chestSenders.forEach((id,chestSender) -> chestSender.send(handler.player));
if (EMILoot.config.parseBlockLoot)
blockSenders.forEach((id,blockSender) -> blockSender.send(handler.player));
if (EMILoot.config.parseMobLoot)
mobSenders.forEach((id,mobSender) -> mobSender.send(handler.player));
if (EMILoot.config.parseGameplayLoot)
gameplaySenders.forEach((id,gameplaySender) -> gameplaySender.send(handler.player));
if (EMILoot.config.parseArchaeologyLoot)
archaeologySenders.forEach((id, archaeologySender) -> archaeologySender.send(handler.player));
});
}

Best to run a canSend here before sending so that you dont end up sending data to clients that dont support your mod

commented

fixed, forgot to close