style: use KT map function
This commit is contained in:
parent
f9e6ffacc1
commit
fa16d2172f
@ -14,7 +14,7 @@ object ProjectionShellMutex {
|
|||||||
TickEvent.SERVER_POST.register { server ->
|
TickEvent.SERVER_POST.register { server ->
|
||||||
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 (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