FastAsyncWorldEdit

FastAsyncWorldEdit

152k Downloads

IllegalArgumentException exception for Quitting NPC's (Given attachment is not part of Permissible object CraftPlayer{name=Dispenser-Block})

TauCubed opened this issue ยท 2 comments

commented

Server Implementation

Paper

Server Version

1.19.2

Describe the bug

When Players with the Metadata NPC leave the game it causes the PermissibleBase to throw IllegalArgumentException

To Reproduce

  1. Set metadata "NPC" to true for your player
  2. Leave the game
  3. Observe result

(I have also tested this with a Regular player entity (myself))

Expected behaviour

For FAWE to handle quit events of NPC players without error.

Screenshots / Videos

No response

Error log (if applicable)

https://paste.gg/p/anonymous/272029b3304047a3ae1ee1f38c0e3d2e

Fawe Debugpaste

https://athion.net/ISPaster/paste/view/b21c2fc395e84377a2d1134fdb8db9a3

Fawe Version

FastAsyncWorldEdit version 2.4.7-SNAPSHOT-282;87f6806

Checklist

Anything else?

I'm not exactly sure why you expect the Player's attachments to contain your new attachment, as nowhere in your code adds the attachment from com.fastasyncworldedit.bukkit.BukkitPermissionAttachmentManager#getOrAddAttachment

My only solution would be to check the caller in the quit event and patch it on my end by removing the NPC meta when passed to WorldEdit. But this seems to be more WE's issue than mine.

Cheers.

commented

I also have a simple test plugin that sets "NPC" to true for the executing player.
TestPlugin.zip

Usage: /testplugin:test

commented

Reasonable, if the entity receives the NPC-Metadata after the join - Not validated, but sounds legit