Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Players hidden using player.hidePlayer are still visibile in autocomplete for vanilla commands

Open Maxi130 opened this issue 1 year ago • 9 comments

Expected behavior

That the player is not shown as an option for players to select. 2023-04-13_15 40 40

Observed/Actual behavior

The player is seen in autocomplete even when hidden. 2023-04-13_15 32 24 2023-04-13_15 32 44

Steps/models to reproduce

  1. Hide the player using player.hidePlayer
  2. Open the chat and type /minecraft:w (or /w).

Plugin and Datapack List

Plugins:

  • My plugin (not public currently)

Datapacks:

  • None

Paper version

[15:35:11 INFO]: This server is running Paper version git-Paper-510 (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT) (Git: bd35d60) You are running the latest version Previous version: git-Paper-"e574412" (MC: 1.19.3)

Other

According to electronicboy#8869 it should be based of the tab list. (Where the user is hidden) According to phoenix616 (or whoever controls the webhook) it is most likely due to a change in the Minecraft command system.

Maxi130 avatar Apr 13 '23 13:04 Maxi130

If im not wrong is the normal behaviour, the hide is mostly for hide visual the entity (because now is hideEntity)

Doc94 avatar Apr 13 '23 15:04 Doc94

If im not wrong is the normal behaviour, the hide is mostly for hide visual the entity (because now is hideEntity)

It also hides it from the tab list and people in the discord told me it was a bug.

Maxi130 avatar Apr 13 '23 15:04 Maxi130

Accidentally closed it, I'm new to GitHub.

Maxi130 avatar Apr 13 '23 15:04 Maxi130

If im not wrong is the normal behaviour, the hide is mostly for hide visual the entity (because now is hideEntity)

It also hides it from the tab list and people in the discord told me it was a bug.

I also forgot to mention, that it also hides it when autocompleting in chat, without using a command.

Maxi130 avatar Apr 14 '23 19:04 Maxi130

If im not wrong is the normal behaviour, the hide is mostly for hide visual the entity (because now is hideEntity)

I just looked into the code and it uses hideEntity as you said, but shouldn't hidden Entities also be hidden from auto complete (when looking at them, it autocompletes)

The code also specificfly hides the player from the player list. (Sends a PlayerInfoRemovePacket) See unregisterEntity

For me it just looks like a missing detail, that the command auto complete doesn't check the hiddenEntities list.

There would need to be some modification to CommandContext.getArgument.findPlayer()

image

Maxi130 avatar May 15 '23 11:05 Maxi130

You can fix this by turning off fix-target-selector-tag-completion in paper-global.yml until a fix is implemented.

Machine-Maker avatar Jun 01 '23 18:06 Machine-Maker

You can fix this by turning off fix-target-selector-tag-completion in paper-global.yml until a fix is implemented.

Thanks, I will try this tomorrow.

How does this solution work? (I mean the settings change, not the code change) Does this get a non merged pull request?

Maxi130 avatar Jun 01 '23 19:06 Maxi130

How does this solution work?

It disables a fix for a vanilla bug where entity selector type tags don't properly provide suggestions. You can see a better description here.

Machine-Maker avatar Jun 01 '23 19:06 Machine-Maker

How does this solution work?

It disables a fix for a vanilla bug where entity selector type tags don't properly provide suggestions. You can see a better description here.

Ah that makes sense.

Maxi130 avatar Jun 02 '23 04:06 Maxi130

I updated my server to the latest stable version and it doesn't seem to be fixed. [10:29:38 INFO]: This server is running Paper version git-Paper-550 (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT) (Git: 483368e on ver/1.19.4) You are running the latest version Previous version: git-Paper-510 (MC: 1.19.4) Is that normal?

Maxi130 avatar Jun 11 '23 08:06 Maxi130

it was fixed in 1.20

MiniDigger avatar Jun 11 '23 09:06 MiniDigger