SkriptLang / Skript

Skript is a Spigot plugin which allows server admins to customize their server easily, but without the hassle of programming a plugin or asking/paying someone to program a plugin for them.
https://docs.skriptlang.org
GNU General Public License v3.0
1.02k stars 358 forks source link

Name of a placed player head block returns <none> #6826

Open superstorm192 opened 5 days ago

superstorm192 commented 5 days ago

Skript/Server Version

[Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[Skript] Server Version: 1.20.6-130-5d8e53d (MC: 1.20.6)
[Skript] Skript Version: 2.8.7 (skriptlang-github)
[Skript] Installed Skript Addons: 
[Skript]  - skript-gui v1.3 (https://github.com/APickledWalrus/skript-gui)
[Skript]  - SkBee v3.5.5 (https://github.com/ShaneBeee/SkBee)
[Skript] Installed dependencies: 
[Skript]  - Vault v1.7.3-b131
[Skript]  - WorldGuard v7.0.10+d9424b1

Bug Description

Update 1.20.5+ added the ability for player heads to keep their custom name when placed, similar to other block entities. That said, Skript returns <none> when prompted with name of {_player_head}

Expected Behavior

Skript should return the text component associated with string tag "custom_name" of components nbt of {_player_head}

Also I just noticed after some debugging that normally, the custom name is in a 'CustomName' tag instead of 'custom_name' so it's a minecraft discrepancy. Though it should still be logical that the name of a player head be captured by the name of effect

Steps to Reproduce

1: Get a chest, player head, and anvil in Creative mode. 2: Place anvil and rename both the chest and the player head 3: Load the following skript:

on place of chest:
    send "name: %name of block%" to player

on place of player head or player wall-mounted head:
    send "name: %name of block%" to player

4: Place the chest and notice it correctly returns the text component 5: Place the player head (on ground and on wall) and notice it returns <none>

Errors or Screenshots

No response

Other

No response

Agreement