Allow user-code create server.Player

This commit is contained in:
Tnze
2022-03-10 14:13:26 +08:00
parent 7d197ebba4
commit 442993d3b1
3 changed files with 33 additions and 26 deletions

View File

@ -17,7 +17,7 @@ import (
type PlayerList struct {
maxPlayer int
players map[uuid.UUID]*Player
// Only the linked-list is protected by this Mutex.
// Only the field players is protected by this Mutex.
// Because others field never change after created.
playersLock sync.Mutex
}