Merge pull request #116 from mlus-asuka/1.20.1-dev

clear curios before restore?
This commit is contained in:
mlus 2025-09-10 16:11:02 +08:00 committed by GitHub
commit 7754186d12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -56,6 +56,7 @@ public class ModsSupport {
// Restore each saved item.
handlerOpt.ifPresent(handler -> {
handler.getCurios().clear();
for (Map.Entry<String, String> entry : storedMap.entrySet()) {
String compositeKey = entry.getKey(); // Expected format: "slotType:index"
String[] parts = compositeKey.split(":");

View File

@ -32,7 +32,7 @@ public class ChatSyncClient {
while ((serverMessage = in.readLine()) != null) {
PlayerSync.LOGGER.info("Received message from chat server: " + serverMessage);
Component textComponents = Component.nullToEmpty(serverMessage);
if(playerList!=null){
if(playerList != null){
playerList.broadcastSystemMessage(textComponents,false);
}
}