Hello, so I’ve created this beautiful HUMAN
, but it spawned with the text “0 Health” displayed over it’s precious head. Is there a way to remove this shenanigans, thanks!
I’m guessing it is a mod or plugin doing that? I don’t think sponge does that.
Actually, no. I have no mods installed on my server. I used the following code to spawn the little guy:
EntitySpawner.spawnNPC(player.getLocation(), EntityTypes.HUMAN, player.getUniqueId(), "Escobar");
public static void spawnNPC(Location<World> location, EntityType x, UUID UUID, String displayName) {
final Entity entity = location.getExtent().createEntity(x, location.getPosition());
entity.offer(Keys.DISPLAY_NAME, Text.of(displayName));
entity.offer(Keys.SKIN_UNIQUE_ID, UUID);
entity.offer(Keys.AI_ENABLED, true);
location.getExtent().spawnEntity(entity, Cause.source(EntitySpawnCause.builder().entity(entity).type(SpawnTypes.PLUGIN).build()).build());
}
It appears that you somehow have a scoreboard objective set into the BELOW_NAME
display slot (probably of criterion HEALTH
). I would run /scoreboard objectives list
to see if this is the case.
After executing the command /scoreboard objectives list
, I received the message: - healthname: displays as 'Health' and is type 'dummy'
. I’m not proficient with Scoreboards, so I’m not exactly sure what this means.
I’m pretty sure I know what’s going on, you probably have this plugin installed which shows the health of all Humans not just players it seems.
I should have mentioned that I don’t have any other plugins installed.
You may have had it installed at one point but since uninstalling it doesn’t remove the scoreboard, it still stayed. Removing the scoreboard should prevent the health tag from appearing afterwards.
I just set up my new test server yesterday, and I didn’t install the mentioned plugin. The only thing that was transferred over was the test world. Either way, I don’t see how an absent plugin could have an effect on my server, but I’m open to further troubleshooting suggestions.
Try loading a brand new test server without adding your own world - scoreboards can be attached to worlds depending on the version.
This seems to have worked! Is there a way to detach the scoreboard from the previous world?
As far as I know, you could either delete the scoreboard in game with commands, or try to find the scoreboard data files in the world files, but the in game method might be easier. Make sure the world is saved before stopping the test server, otherwise it won’t change the data file.