#How to sort arrays of players name that have a specific tag

1 messages · Page 1 of 1 (latest)

glossy epoch
#

I want to make a un-ban system that will require a banned player to have a "Ban" tag. (it's not actually using tags, but using dynamic property. but, just pretend that it's using tags.)

Then, a Un-Ban Modal form will have a dropdown that have a list of player name with a "Ban" tag. How would I make that?

icy tartan
#
let players = world
  .getAllPlayers()
  .filter(p => p.hasTag('ban') )
#

@glossy epoch

glossy epoch
#

oh yeah i know this solution would appear

#

turns out not using .map() though

glossy epoch
#

there seems to have a problem

#

how to get the player name AFTER the predicate?

icy tartan
#

@glossy epoch

midnight shoal
#

🤓