fix datamap saving

This commit is contained in:
Sen 2025-07-12 12:23:56 +02:00
parent 05e00d389b
commit c126bdd8b0
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
3 changed files with 86 additions and 87 deletions

View file

@ -1578,13 +1578,13 @@ public class Player extends User implements Executor, IPlayer
}
});
this.connection.disableAutoRead();
Futures.getUnchecked(this.server.schedule(new Runnable()
this.server.schedule(new Runnable()
{
public void run()
{
Player.this.connection.checkDisconnected();
}
}));
});
}
public void onDisconnect(String reason)

View file

@ -74,7 +74,8 @@ public class Region {
missing.add(id);
}
}
for(Entry<Character, String> entry : states.entrySet()) {
for(Iterator<Entry<Character, String>> iter = states.entrySet().iterator(); iter.hasNext();) {
Entry<Character, String> entry = iter.next();
char bid = entry.getKey();
String oid = entry.getValue();
State state = BlockRegistry.byName(oid, null);
@ -83,7 +84,9 @@ public class Region {
mapping.put(bid, id);
highest = bid > highest ? bid : highest;
missing.remove(id);
Log.IO.debug((id.equals(oid) ? "Mehrfache" : "Geänderte") + " Block-ID %d = %s -> %s", (int)bid, oid, id);
if(id.equals(oid))
iter.remove();
Log.IO.debug((id.equals(oid) ? "Mehrfache" : "Geänderte") + " Block-ID %d = %s" + (id.equals(oid) ? "" : " -> %s"), (int)bid, oid, id);
}
else {
Log.IO.debug("Entfernte Block-ID %d = %s", (int)bid, oid);