#.getParticipants()[].displayName Error

1 messages · Page 1 of 1 (latest)

storm cairn
#
.getParticipants((result) => {
  const name = result.displayName;
});
lost forum
#

it's array with objects

#
world.scoreboard.getObjective().getPartipicants().filter(filter => filter.displayName == "test")[0].getScore(world.scoreboard.getObjective());
idle gazelle
#

how would i get the offline's player names tho

lost forum
#

it's already made

#

lol

idle gazelle
#

it shows commands.scoreboard.players.offlinePlayerName

idle gazelle
#

i just did

#

const moneyParticipants = moneySb.getParticipants()

#

moneyParticipants[1].displayName

#

[1] is jsut to test

lost forum
#

use [0]

idle gazelle
#

that displays me

#

i wanted to check otehr players too

#

so the offline ones

#

im just testing but it doesnt work with offline names

lost forum
#

hmm weird