mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-20 13:30:27 -07:00
fixed penguin spying errors
This commit is contained in:
parent
e8ed23d04f
commit
592be2d79b
1 changed files with 4 additions and 5 deletions
|
|
@ -18,10 +18,9 @@ class PenguinManager{
|
|||
|
||||
fun registerTag(player: Player, location: Location){
|
||||
val ordinal = Penguin.forLocation(location)?.ordinal ?: -1
|
||||
if(tagMapping[ordinal] == null){
|
||||
tagMapping[ordinal] = JSONArray()
|
||||
}
|
||||
tagMapping[ordinal]?.add(player.username.toLowerCase())
|
||||
val list = tagMapping[ordinal] ?: JSONArray()
|
||||
list.add(player.username.toLowerCase())
|
||||
tagMapping[ordinal] = list
|
||||
updateStoreFile()
|
||||
}
|
||||
|
||||
|
|
@ -31,7 +30,7 @@ class PenguinManager{
|
|||
|
||||
private fun updateStoreFile(){
|
||||
val jsonTags = JSONArray()
|
||||
tagMapping.forEach { (ordinal,taggers) ->
|
||||
tagMapping.filter { it.value.isNotEmpty() }.forEach { (ordinal,taggers) ->
|
||||
SystemLogger.logInfo("$ordinal - ${taggers.first()}")
|
||||
val tag = JSONObject()
|
||||
tag["ordinal"] = ordinal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue