镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Citizens NPC head not dropping #1352

Open

Description

@novrom1982

CraftBook Version

craftbook-bukkit-5.0.0-SNAPSHOT-dist

Platform Version

paper-1.21.4-227

Confirmations

  • I am using the most recent Minecraft release.
  • I am using a version of WorldEdit compatible with my Minecraft version.
  • I am using a version of CraftBook compatible with my Minecraft version.
  • I am using the latest or recommended version of my platform software.
  • I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
  • I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)

Bug Description

I have combat NPC of the Citizens plugin on my server. Players fight with them and when they kill them, the head should drop from the NPC, but it doesn't drop and there is an error in the console https://pastebin.com/VZq2BFTQ

Expected Behavior

The NPC head should fall out

Reproduction Steps

  1. Killing NPCs
  2. The head didn't fall out
  3. Error in console

Anything Else?

No response

Activity

  1. added
    status:pendingPending acceptance or closure.
    type:bugIncorrect behavior, not working as intended
    on May 4, 2025
  2. me4502 commented on May 4, 2025

    @me4502
    Member

    This looks like the error is within Paper, when grabbing data about the player (name, skin, etc), because the NPC plugin has put invalid data on the player. This information is 100% necessary for HeadDrops to work, so this would either need to be fixed within the NPC plugin or Paper.

    Either the NPC plugin needs to stop giving invalid data that causes Paper to error, or Paper needs to be more lenient about the data it allows. My bet is Paper would pass it off to the NPC plugin to not provide invalid data.

    There's nothing CraftBook can do here, as it inherently needs that data to function. This issue is entirely outside of CraftBook.

  3. novrom1982 commented on May 4, 2025

    @novrom1982
    Author

    Could this be because NPC nicknames use color codes?

  4. me4502 commented on May 4, 2025

    @me4502
    Member

    Possibly yes, the invalid part of the data is the player's name

  5. novrom1982 commented on May 4, 2025

    @novrom1982
    Author

    I have 13 NPCs with the same nicknames and the difference is in the colors of the nicknames. Maybe it is possible to make support for colored nicknames of heads in Craftbook?

  6. me4502 commented on May 4, 2025

    @me4502
    Member

    As I said, this error isn't within CraftBook, it's within Paper. The function being called is the one that gives the plugin access to the player texture data, which is required to put a player texture on the head. It's Paper that would need to support it, or the NPC plugin would need to strip the colour when providing that data to Paper's API.

    As-is, getting the player texture of a player with a nickname with invalid characters causes an error within Paper. All CraftBook could theoretically do is silence the error. Nothing other than Paper or the NPC plugin fixing the underlying issue would allow CraftBook to get the required texture data.

  7. added
    status:platform-issueAn issue with the platform (eg Spigot), that we cannot workaround
    on May 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:pendingPending acceptance or closure.status:platform-issueAn issue with the platform (eg Spigot), that we cannot workaroundtype:bugIncorrect behavior, not working as intended

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions