Player Heads
Ever PVP someone or PVE a mob and get no good loot? Feel like you deserve a trophy for your victory? Want a simpler alternative to bigger plugins that implement everything but the kitchen sink? Then PlayerHeads is right for you! You can now lop off enemies heads in battle, and mount it on a pole for all to fear, wear your opponent's face as a mask like camouflage, or just collect all of the mob heads.
Installation
Place PlayerHeads.jar in your plugins folder, on server start the configuration will be generated. Remember to remove any outdated playerheads jars when adding the new one.
If you can't be bothered to read the rest of this page, then just watch this video by Awesome_Soul:
Portuguese (Português) video: http://youtu.be/OqhI_oIGPWo
German (Deutsch) video: http://youtu.be/ijEws5yjo6Y
Try It
Server: aztecmc.org (rare drops are enabled for mob and player-heads)
Website: aztecmc.org
Documentation
Notes
- PlayerHeads is now translatable! Edit "lang.properties" to whatever phrases you desire.
- lang files will change between releases, when updating be sure to delete the old file if you haven't edited it.
- If you've given people the * permission node, they will get 100% drop rates. If you don't want this to happen, deny (or add negative) nodes for the following: playerheads.alwaysbehead and playerheads.alwaysbeheadmob
- If you want to disable head drops in a specific world, use your permission plugin to deny (or add negative) nodes for the following in that world: playerheads.canbehead and playerheads.canbeheadmob
- If you have any problem using "lang_[language]_[country]_[variant].properties" for any reason, just use the file name "lang.properties" to override messages.
- Spawn mob heads with the following names: #creeper #zombie #skeleton #wither #spider #enderman #enderdragon ... (any many more!)
Known issues
- Renamed heads (with an anvil) don't stay renamed after placing, mining, dropping them.
- If for any reason your mob heads loose their name, you can get it back by placing and mining it.
- If you use the BountyHunters plugin and you have enabled head drops for bounties as well as player head drops from PlayerHeads, both will be dropped - for now, you should disable one or the other. Alternative solutions are being looked at.
- If you use JPerms, users with Op or playerheads.* permission will receive playerheads.alwaysbehead[mob] permissions and have 100% droprate since PlayerHeads permissions nodes are ignored. It's recommended to use another permissions plugin if this is a concern (LuckPerms, PermissionsEX, GroupManager).
Dev Builds
Development builds of this project can be acquired at the provided continuous integration servers. These builds have not been approved by the BukkitDev staff. Use them at your own risk.
https://ci.meme.tips/job/PlayerHeads (upstream)/ (selected major changes only)
https://ci.meme.tips/job/PlayerHeads-5.x/ (rapid changes and work-in-progress)
Sourcecode / API documentation
We've included the entire sourcecode via github:
https://github.com/meiskam/PlayerHeads
Third-party plugin-developers can view the PlayerHeads API documentation at the following link: https://crashdemons.github.io/PlayerHeads/
Server Support
Current versions of the plugin have been tested as compatible on the following server environments:
- Spigot/Paper 1.8-1.18.2 (Use PlayerHeads 5.20.2 or lower; READ NOTE)
- Spigot/Paper 1.19-1.20.4
Server environments that are known to be incompatible:
- Glowstone 1.12 (only partial support is available in PlayerHeads 5.20.2 and lower)
Support should exist for any modern bukkit server with access to authlib which is needed to set textures.
Legacy version notes:
- 5.x drops support for older usernamed-based mobheads (3.x), fixing some longstanding issues with spawn commands; uses vanilla and texured heads exclusively (4.x)
- 4.x introduces new, more reliable support for head textures, more configuration options, updated mobs, and more consistent permission behavior and will continue to receive updates in the future - some older configurations may be incompatible (see the changelog and Configuration page). This version automatically upgrades 3.x heads to 4.x when breaking or dropping heads.
- 3.x maintains the original behavior of the plugin with username-based mobheads, but head skins may be less reliable over time and support has been discontinued.
Legacy version documentation: changelog, configuration, permissions.
1.16 released, any plan on adding new mobs heads?
In reply to InsaneGames_:
v5.2.8 (from the Files tab) includes the new heads for Hoglin, Zoglin, Strider, and Piglin.
However it was made before 1.16 released, and support for Zombified Piglins does not work correctly in that version. (that specific head doesnt drop)
I have uploaded v5.2.9 this morning to correct the issue, but it is still pending moderator review which sometimes takes quite a while.
Basic tests with all of the new heads seemed to work correctly on 1.8, 1.12.2, 1.13.2, 1.15.2, 1.16.1 (including mob drops). Since there were no changes to heads other than Zombified Piglin (PigZombie), I would expect everything except that to function on v5.2.8
Keep in mind both of these are Beta versions and could contain issues not seen in 5.2.5.
Hi! Just a quick question, will just one head per killer drop? For example I kill player 1 and player 2 and a creeper, and I have their heads, will I get new heads after a new killing spree? I want to limit the number of heads ingame
In reply to Forge_User_90898450:
A head drop chance roll occurs on each valid kill, and a head will drop if the roll is
abovewithin the droprate defined in your PlayerHeads configuration, but for players it can be further limited somewhat by the deathspam settings (which were added to ease chat spam and player head farming) - however these are not intended to track extremely long periods and will not track death times across server restarts.(Note: if you have playerheads.* permission, you may get 100% droprates. To prevent this, either do not give the star permission, or negate permissions for playerheads.alwaysbehead and playerheads.alwaysbeheadmob)
Preventing collection of 'more than X heads' would need some extensive logging of all dropped heads and is not supported in-house.
If you want to limit heads collected, I would recommend lowering the head droprates (probabilities) [in the configuration file] for the entities your are interested in as the easiest way.
However, if you're able to create a plugin and you prefer to limit head drop numbers rather than droprates, there is a PlayerHeads API. If you listen for HeadDrop events, your plugin has the ability to collect information on drops and cancel them from occuring. If you listen to HeadRoll events, you are able to modify droprates with your own logic.
Thank you for your interest in PlayerHeads.
In reply to crashdemons:
Thanks for the extensive answer, I will talk to one of my devs to look into the api! Great support! :D
I'd like to suggest to add option to disable displaying what kind of head it is when clicking the head or destroying a head. Overall great plugin.
In reply to Forge_User_38631802:
You can deny the playerheads.clickinfo permission for the group(s) you don't want to see the message.
As for how, you have a couple options: permissions.yml is managed by bukkit and will work, but a permissions plugin like LuckPerms etc is generally recommended for most users for easier configuration.
This is mentioned at the end of FAQ entry #3 as well.
Note: if you've given a group playerheads.* it probably gave clickinfo by default.
is there a way to display who killed who on the head instead of only having the chat message pop up?
In reply to Forge_User_93856163:
No - it's possible to implement, but it will break the ability to use heads in trading (vanilla villager summons or Shopkeepers) since those require all item tags to match. I'm not sure that's really worth it.
EDIT: fixed yes/no - yes it's possible to add, no it's not an option currently.
May I please suggest that you organize the comments in the config file so that they're located near (above) the settings which they're explaining? Reading config files is never fun, and having to scroll up and down in a file for the details of the setting only compounds the experience.
Thank you
what is the default drop rate for both players and mobs?
Hey! nice plugin, can you tell me how to go about making players drop their head when they get killed and to not drop mob heads but just wither?
EDIT: I am sorry i just saw mob drop rates donw below in the config, however, I am having another issue, wither skeletons seem to be dropping 100% of the time with looting 5, it even just dropped 2 heads to me, the rate for wither skeletons in my config is 0.0000000001
In reply to lelesape12:
heads drop 100% at any chance if you are Opped or have playerheads.* or playerheads.alwaysbeheadmob permissions.
you would need to deop, and/or deny those permissions specifically (as mentioned in FAQ entry #9) using your permissions plugin or permissions.yml (if you have other permission that included them)
Changing witherskeletonbehavior to vanilla or block (or setting witherskeletondroprate to -1) will also prevent PH from creating drops entirely. The ignore setting rarely allows for duplicate drops, but this is more noticable when you have permissions to always get drops. If you choose vanilla, Minecraft itself will manage the drops at a rate of 2.5%.
PS: Choosing replace disables vanilla drops and only allows PH drops with configurable rates (although you would still need to fix your permissions to prevent 100% drops).
In reply to crashdemons:
You are so right, thank you for helping me out and sorry if i wasted your time, love your plugin!
This plugin is very cool, but he's not doing what I'm looking for (or I haven't found out yet, if so, my bad).
There's 2 things I'd like to be able to do right now:
1) Being able to add selectors to commands
For instance: I wanna use a command block that can give the head of a player without having to change the name of that player in the command block everytime.
It would look something like:
In this exemple, the command would give me the head of every player with a red dye in their inventory.
2) Actually placing the head of the player on the ground (as a block) instead of giving it to the player who made the kill.
For this one no need to add details, I just want the head of the player to be placed on the ground, where the player died, not as an item but as a block.
If these things are already possible with this plugin and I just missed them, please tell me!
And if anyone knows of a plugin already existing that would resolve my issues, please let me now!!
Disregarding these two things that i'm looking for, this plugin is very well made! kudos to dev team!
In reply to Forge_User_97111906:
#1 - Because of changes to Minecraft and Spigot (I think in 1.13), plugin commands no longer support selectors by default. Each plugin would need to implement all of the selectors themself to do this. There are a few plugins that add rough replacement support, but none of them are perfect.
If anyone wants to implement a dirty workaround with full selector support I can imagine being able to send / capture a vanilla tellraw command's resolved selector recipients - but there are some obvious drawbacks to the approach. There may be also an NMS method for resolving selectors, but that introduces version dependence.
Until there's a good answer for this issue, I don't see this being easy to add.
Ref: SPIGOT-4295, manual selection, NMS selection, plugin to add basic support, another plugin.
#2 - This is more feasible, but it is not a feature yet (#59) although some work needs to be done to make sure the profile information (texture, owner) of the head can be set properly on the block in all versions. there also wasn't much development on this feature because it's not requested very often... If I manage to get time I can look at how difficult this is to add, but it may be a while.
In reply to crashdemons:
Thank you for the quick and detailed answer!
It's a real shame they went back on supporting selectors, it was really useful in some cases.
For the second topic, while I'm still searching for another solution, I'll watch your plugin closely for future updates :)
Thanks.
In reply to Forge_User_97111906:
A follow up to Crashdemon's response, for #1 that is indeed a pity (although perhaps one day a developer here on bukkit will write a plugin/library that supports selectors--My vision is something with different .jars for whichever version of mojang's selectors you want, i.e. '@p[r=5]' vs '@p[distance=..5]', or a config option to choose version, or support multiple at once, etc etc... it would be nice as an API, or even just something like "/subselector <selector> <command>", e.g., "/subselector @p[sort=furthest,gamemode=adventure] ph spawn $1")
As for #2, if you don't want to wait for PH to add something so specific, or if you care about details like how the head is placed (eg: WorldGuard areas, head rotation, block-overwriting when player/mob isn't standing in air, etc) that PH doesn't end up providing configuration for, you could try submitting a plugin request at https://bukkit.org/forums/plugin-requests.96/ (developers can hook into the PH api to get the head and then place it as a block)
In reply to evmodder:
For #1, well, ok so now I'll just hope it'll happen someday, it would actually be really helpful for a lot of things :/
For #2, I'll look into that! Thanks for the suggestion!
how do i add it to my server