r4g3baby / SimpleScore

A simple animated scoreboard plugin for your minecraft server.
https://www.spigotmc.org/resources/simplescore.23243/
MIT License
68 stars 34 forks source link

Citizens support #34

Closed rudde0 closed 2 years ago

rudde0 commented 2 years ago

I think SimpleScore creates scoreboard too for citizens NPCs. Just try to spam few NPCs and check console.

Thanks.

r4g3baby commented 2 years ago

Hey, could you please elaborate. How is this an issue, is there any sort of error in the console because of this behaviour?

rudde0 commented 2 years ago

There are placeholder API access warnings. Warnings are coming from SimpleScore plugin. SimpleScore should check for metadata "NPC" of players. If player has metadata such as this tag, plugin must skip the player.

r4g3baby commented 2 years ago

I'll look into it. I've never used Citizens before but that is somewhat strange behaviour because it would mean that Citizens is adding actual player objects to the server player registry. Are you aware of some Citizens documentation for this behaviour so I don't have to waste time searching for it? It would be of great help.

rudde0 commented 2 years ago

https://wiki.citizensnpcs.co/API

This variable will create exception for the player NPCs: boolean isCitizensNPC = entity.hasMetadata("NPC");

r4g3baby commented 2 years ago

Thanks, I've added this to a development version, would you be willing to test it if I send you a compiled version of the plugin?

rudde0 commented 2 years ago

Sure

r4g3baby commented 2 years ago

Here it goes, please let me know if this fixes it.

https://wormhole.app/v0ZYM#uWJWqGfW72j4UzKq7R4zrg

rudde0 commented 2 years ago

This dev version fixed the issue. Thanks a lot. <3

r4g3baby commented 2 years ago

No problem, thanks for taking the time to suggest and help test it!