feat: drop offline player's mutex lock
This commit is contained in:
parent
30187548bb
commit
27ba95e312
@ -16,7 +16,9 @@ object ProjectionShellMutex {
|
|||||||
val mutex = (server as ProjectionShellMutexAccessor).`quaedam$getProjectionShellMutex`()
|
val mutex = (server as ProjectionShellMutexAccessor).`quaedam$getProjectionShellMutex`()
|
||||||
val currentTime = System.currentTimeMillis()
|
val currentTime = System.currentTimeMillis()
|
||||||
mutex.forEach { (pos, lock) ->
|
mutex.forEach { (pos, lock) ->
|
||||||
if (currentTime - lock.time > 60 * 1000) {
|
if (lock.player !in server.playerList.players) {
|
||||||
|
mutex.remove(pos)
|
||||||
|
} else if (currentTime - lock.time > 60 * 1000) {
|
||||||
mutex.remove(pos)
|
mutex.remove(pos)
|
||||||
ProjectionShell.channel.sendToPlayer(lock.player, ClientboundPSHLockRevokePacket)
|
ProjectionShell.channel.sendToPlayer(lock.player, ClientboundPSHLockRevokePacket)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user