mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-02 14:38:26 +01:00
Sending chunks should be thread safe
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
3d5ae6fe94
commit
538ef75552
@ -124,7 +124,7 @@ public class DynamicChunk extends Chunk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendChunk(@NotNull Player player) {
|
public synchronized void sendChunk(@NotNull Player player) {
|
||||||
if (!isLoaded()) return;
|
if (!isLoaded()) return;
|
||||||
final PlayerConnection connection = player.getPlayerConnection();
|
final PlayerConnection connection = player.getPlayerConnection();
|
||||||
final long lastChange = getLastChangeTime();
|
final long lastChange = getLastChangeTime();
|
||||||
@ -141,7 +141,7 @@ public class DynamicChunk extends Chunk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendChunk() {
|
public synchronized void sendChunk() {
|
||||||
if (!isLoaded()) return;
|
if (!isLoaded()) return;
|
||||||
if (getViewers().isEmpty()) return;
|
if (getViewers().isEmpty()) return;
|
||||||
final long lastChange = getLastChangeTime();
|
final long lastChange = getLastChangeTime();
|
||||||
|
Loading…
Reference in New Issue
Block a user