Small Fabric mod to drop player heads upon player death - or get them via a command - that's compatible with Bedrock players joined through Geyser, or other mods changing the skin while in-game; e.g. FabricTailor. Unlike a datapack, this will drop a head that will keep the skin you are currently playing with!
Requires FabricAPI! Because of https://bugs.mojang.com/browse/MC-174496, it is recommended to use a mod like https://modrinth.com/mod/headfix to keep custom head names when breaking the head.
Floodgate for Bedrock support is optional, but necessary if you're using a prefix other than ".".
Current features:
- drops a playerhead upon player death
- will display (and keep displaying) the skin used at the time of death!
- if killed by player: adds "killed by [player]" in the lore of the item - or anything else; fully customizable!
- optional "/getskull" command - you can get heads for Java and Bedrock players. For the latter, it will work as long as they have a skin uploaded to the GeyserAPI (done automatically when they join any Geyser+floodgate server)
- option to disable floodgate prefixes showing in the head names
/getskull bedrock .onebeastofchris <- gets you the Bedrock head of onebeastofchris. You don't have to add the prefix!
/getskull jeb_ <- gets you the Java player's head of jeb_
This command is optional, and is disabled by default in the config file. You can restrict access to it by changing the CommandPermissionLevel. 2 is the default - 0 is everyone, 4 is only OP's.
Config file options
- "ShowLore": whether the heads should show who killed them in the lore. True by default.
- "DropNonPlayerKillHeads": Should this mod drop heads when the player died by a non-player death? True by default.
- "CommandEnabled": Whether /getskull is usable. false by default.
- "CommandPermissionLevel": Which permission level is needed to use the command. 2 by default. Set 0 for everyone, or 4 for only OPs.
- "Debug": Whether debug mode is on. Off by default.
- "IncludeFloodgatePrefixInNames": Should bedrock player names have their prefix included? Applies to head names, heads gotten via /getskull bedrock, and the lore tag.
- Port to 1.21
- Port to 1.20.6
- Port to 1.20.6
- Port to 1.20.6
- Port to 1.20.6
- Port to 1.20.6
- completely changed the way this works: No more caching, since the server has the texture - so we get it from the server!
- compatible with FabricTailor (and other skin changing mods)
- more customization possible in new config
- added option to drop heads of fake players (e.g. NPCs or fake carpet players) when they are killed. With this version, fake players should not drop their heads upon death
- debug mode to make my life easier
- option to disable the inclusion of the Floodgate prefix in the head names
- option to enable a "/getskull" command to get bedrock & java player heads.
- option to change the permission level necessary to use the command
Fixes:
- actually cache the player's skin file; atleast until the server restarts
/getskull:
- an optional command - you can set the permission level in the config, default is 2. 0 would be everyone, 4 is OP's only. Or disable the command entirely!
- /getskull [javaname]: gets you any java players' skull
- /getskull bedrock [bedrockplayer]: gets you a skull from a Bedrock player. Due to how this works, they absolutely NEED to have joined ANY geyser+floodgate server recently. Otherwise, i can't get the skin data from the Geyser API
- autocomplete (java only) for both bedrock, and java players!
- spelling for [bedrockplayers] does not matter - it is not case sensitive. You can, but don't have to include a prefix - you will get the skull with the name you have inputted
NOTE: due to Geyser not translating fabric command suggestion packets properly on Geyser-Standalone, you might get an error similar to
[20:30:14.927 nioEventLoopGroup-4-1/WARN] Downstream packet error! Value 48 has no mapping for key class com.github.steveice10.mc.protocol.data.game.command.CommandParser.
I can't do anything about this - if you do not like it, either filter the logs with a log filter plugin, OR disable the command in the config. This shouldn't affect you if you're running fabric behind Velocity.
- config option: You can now turn off getting heads from deaths that weren't caused by another player. This is turned on by default
- fixed: checking for floodgate mod presence shouldn't produce errors now when floodgate not installed