mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 03:56:41 +00:00
Synchronizing on accessing a lock is pointless.
This commit is contained in:
@ -1099,7 +1099,7 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
|
||||
try {
|
||||
if (relighter != null && !(relighter instanceof NullRelighter)) {
|
||||
// Only relight once!
|
||||
if (!relighter.getLock().tryLock()) {
|
||||
if (Settings.IMP.LIGHTING.DELAY_PACKET_SENDING && !relighter.getLock().tryLock()) {
|
||||
relighter.getLock().lock();
|
||||
relighter.getLock().unlock();
|
||||
} else {
|
||||
@ -1109,6 +1109,9 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
|
||||
relighter.fixSkyLighting();
|
||||
relighter.fixBlockLighting();
|
||||
}
|
||||
if (Settings.IMP.LIGHTING.DELAY_PACKET_SENDING) {
|
||||
relighter.getLock().unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
|
Reference in New Issue
Block a user