Yes, I mixed with getAllPlayersArray() which returns a copy into an array of L2PcI.
Also L2TIntObjectHashMap should be thread safe...
--Edit:
I knew I wasn't that wrong.
With L2World.getInstance().getAllPlayers() you get a map, to get an (iterable) array you need to use getAllPlayersArray(), which isn't a collection.
In Freya and older High Five versions L2World.getInstance().getAllPlayers() returned a collection...
Be careful depends on the core you try to run the script, obviously the script in first post is for Freya.