Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Villager behead message format is "<Profession> was beheaded by <Player>" #81

Open
EvModder opened this issue Apr 23, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@EvModder
Copy link

Severity: very minor

Not sure if this is a known behavior or intended feature, but when beheading a villager, PlayerHeads uses the villager's profession name (if it has one) instead of just the generic name "Villager".

This only affects the behead message; the dropped item's name is "Villager Head" as expected.

@EvModder EvModder added the bug Something isn't working label Apr 23, 2021
@crashdemons
Copy link
Owner

crashdemons commented Apr 23, 2021

I think the code just uses the displayname of the mob, so I'm not sure there was really any intention here.
To be fair, I don't think it's "wrong" either way:
Librarian was beheaded vs
Villager was beheaded

both are accurate, but one is just more specific. I think the intention here is to inform of the event rather than describe the head itself.

If you think this needs changing,I have another hypothetical to consider:
you rename a special cat "Bob":
Bob was beheaded

should this only read "cat was beheaded" too?

@EvModder
Copy link
Author

EvModder commented Apr 24, 2021

I assume with the current code (using displayname), Bob was beheaded is what is currently printed?

Perhaps, and maybe this is taking it too far, but an answer to both the original question and your hypothetical would be to use a behead message format with placeholders specified in the config, something like this:
{ENTITY_NAME} was beheaded vs {ENTITY_TYPE} was beheaded
Which would resolve to Bob was beheaded vs Cat was beheaded, allowing people to choose which they prefer. This is fairly common practice among some popular plugins (example) so people will probably know how to use it.

@crashdemons
Copy link
Owner

crashdemons commented Apr 24, 2021

I'll have to see if this possible, unfortunately PH was coded to use positional formatting ({0} {1}) so I'll have to verify it doesn't cause an exception if I supply replacements that don't exist (or add logic if it does).

@crashdemons crashdemons added this to the far-future-version milestone May 6, 2021
@crashdemons crashdemons added enhancement New feature or request and removed bug Something isn't working labels Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants