Artemis-the-gr8 / PlayerStatsExpansion

A PlaceholderAPI expansion for PlayerStats
https://api.extendedclip.com/expansions/playerstatsexpansion/
MIT License
5 stars 2 forks source link

citizens npcs throw error on server start #36

Closed TheDude1134 closed 1 year ago

TheDude1134 commented 1 year ago

! [Sat 00:36:09 WARN PlayerStats] Cannot calculate statistics for player-name: Keymaster! Double-check if the name is spelled correctly (including capital letters), or if any of your config settings exclude them ! [Sat 00:36:09 WARN PlayerStats] Cannot calculate statistics for player-name: Parkour! Double-check if the name is spelled correctly (including capital letters), or if any of your config settings exclude them

These are npc's. Although there are 4 other npc's. that do not cause this error.

Artemis-the-gr8 commented 1 year ago

Interesting, it looks like those NPC's are being registered as players somehow, which results in an error when PlayerStats tries to get a statistic from them. Do you have a hologram or other display with a top or server statistic in it, that loads when the server boots up?

I tried to replicate the issue, but player NPC's I create with Citizens2 don't cause the same error. Which version of Citizens are you using, and could you share the file that contains the NPC settings and save-data?

TheDude1134 commented 1 year ago

I do in fact use holograms that display player stats. The hologram is in spawn. It shows the players stats who is looking at the hologram.

Server Version 1.19.3 Citizens Version 2.0.30 b2890 DecentHologramsVersion 2.7.9

citizensnpcs.zip

Artemis-the-gr8 commented 1 year ago

I tried loading the NPC's from your saves.yml file, but that doesn't result in the same issue for me. I'm still very curious how this happens.

What command are you using to get the stats for the player who is looking at the hologram? Do the errors happen only once at start-up, or do they keep going every 30 seconds or so?
And could it be that the problematic NPC's are looking at the hologram you have in spawn, so that it would try to get statistics for them?

Artemis-the-gr8 commented 1 year ago

Are you still having this issue with version 2.0 of PlayerStats and 2.0.0 of the PlayerStatsExpansion? If so, what happens if you try to add one of the problem-causing NPS's to the exclude-list (with /statexclude add Keymaster)?