This server is running CraftBukkit version 4090-Spigot-b754dcc-38b1f49 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT)
Yes
Hi,
First of all, sorry if not opened in the correct project (might be build tools as this is more related to Craftbukkit itself).
I'm trying to achieve the following : alter the NBT data of a goat horn to set the key tag "instrument" to an empty value.
On Craftbukkit and Spigot : The client will just disconnect
"Internal Exception: io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: Input string must not be empty or null"
or
Internal Exception: io.netty.handler.codec.EncoderException: java.lang.NullPointerException: Cannot invoke "org.bukkit.NamespacedKey.getNamespace()" because "key" is null
On PaperMC, which fork Spigot, we aren't kicked from the server, but the whole key "instrument" got removed from the NBT tags.
On Vanilla server and Fabric, this behavior is working just fine.
Why I need this ?
==> The need of an empty string value allow to have a goat horn that didn't emit any sound/music.
Doing so, a plugin like Audio Player (Fabric) can play of specific audio file through Simple Voice Chat.
I'm also willing to add the "player head" sound ability for Spigot/PaperMC, but didn't looked at it yet on how it work for Fabric.
On my research, the error seems to be triggered by the class "NamespacedKey" / "org.bukkit.NamespacedKey.getNamespace()", and could also be related to this specific one too : "CraftMetaMusicInstrument.java".
Here are some commands to reproduce the error :
This command will work (instrument tag have a value, lowercase) :
PS : On Craftbukkit server, the command will always work (you get the horn), but as soon as you open the player inventory or run the below command (with the goat horn in your main hand), you'll be disconnected :
This bug still exists in the current version of 1.21.4. Custom instruments that are defined in the item NBT instead of a datapack also kick the player, but work fine in vanilla server software.
Watermelon_Sir
added a comment - This bug still exists in the current version of 1.21.4. Custom instruments that are defined in the item NBT instead of a datapack also kick the player, but work fine in vanilla server software.
Marvin Rieple
added a comment - In vanilla you can use a custom instrument with a custom sound effect which is not present for an empty sound.
This will however not work on spigot since spigot expects instruments to be registered to the server.
Example command:
/give @p minecraft:goat_horn[minecraft:instrument={sound_event:{sound_id: "not:present" },use_duration:100,range:10}]
Yeah, I found the correct command (by the way, you can shorten it from >minecraft:instrument="minecraft:feel_goat_horn"< to >minecraft:instrument=feel_goat_horn<
I wasn't able to reply due to Cloudflare 502 bad gateway until now :'D
Anyways, what I was trying to say is yes, we need to find another way to achieve that (if even possible, which is unsure. Don't know if a plugin can stop the horn playing).
Also, in 1.20.4 on Vanilla and Fabric, this data wasn't wipped, this was Bukkit specific really
As such, we can cancel this ticket as this is not relevant anymore (unless you have some clues on how to achieve that :'D )
Athar42
added a comment - Yeah, I found the correct command (by the way, you can shorten it from >minecraft:instrument="minecraft:feel_goat_horn"< to >minecraft:instrument=feel_goat_horn<
I wasn't able to reply due to Cloudflare 502 bad gateway until now :'D
Anyways, what I was trying to say is yes, we need to find another way to achieve that (if even possible, which is unsure. Don't know if a plugin can stop the horn playing).
Also, in 1.20.4 on Vanilla and Fabric, this data wasn't wipped, this was Bukkit specific really
As such, we can cancel this ticket as this is not relevant anymore (unless you have some clues on how to achieve that :'D )
So yeah, you will need a different approach for 1.20.5/6.
Furthermore, even if this was fixed for 1.20.4, it would just be fixed to not disconnect - the custom data would be wiped.
md_5
added a comment - The correct command is
/give @p minecraft:goat_horn[minecraft:instrument= "minecraft:feel_goat_horn" ]
Something like
/give @p minecraft:goat_horn[minecraft:instrument= "minecraft:test" ]
fails.
So yeah, you will need a different approach for 1.20.5/6.
Furthermore, even if this was fixed for 1.20.4, it would just be fixed to not disconnect - the custom data would be wiped.
So yeah, did a quick test, and indeed, they seems to check what values you put in there now.
So even if this was changed, that would only apply for 1.20.4 (and yeah, I didn't find, yet, how to give myself a correct horn with a specific sound, even while looking at a correct one )
Athar42
added a comment - - edited So yeah, did a quick test, and indeed, they seems to check what values you put in there now.
So even if this was changed, that would only apply for 1.20.4 (and yeah, I didn't find, yet, how to give myself a correct horn with a specific sound, even while looking at a correct one )
1.20.6 (hotfix) just got released, I'm gonna try on it (but, I think I'll have to change the way the command is wrote, as this is more "component" based than NBT tag)
Athar42
added a comment - 1.20.6 (hotfix) just got released, I'm gonna try on it (but, I think I'll have to change the way the command is wrote, as this is more "component" based than NBT tag)
Suggest you try 1.20.5 — I'm not sure Vanilla allows this/ invalid instruments in 1.20.5.
md_5
added a comment - Suggest you try 1.20.5 — I'm not sure Vanilla allows this/ invalid instruments in 1.20.5.
Assignee:
Unassigned
Reporter:
Athar42
Votes:
0Vote for this issue
Watchers:
4Start watching this issue
Created:
Updated:
Resolved:
{"searchers":{"groups":[{"searchers":[{"name":"Project","id":"project","key":"issue.field.project","isShown":true,"lastViewed":1743564099195,"shown":true},{"name":"Summary","id":"summary","key":"issue.field.summary","isShown":true,"shown":true},{"name":"Type","id":"issuetype","key":"issue.field.issuetype","isShown":true,"lastViewed":1743564099196,"shown":true},{"name":"Status","id":"status","key":"issue.field.status","isShown":true,"lastViewed":1743564099199,"shown":true},{"name":"Priority","id":"priority","key":"issue.field.priority","isShown":true,"shown":true},{"name":"Resolution","id":"resolution","key":"issue.field.resolution","isShown":true,"shown":true},{"name":"Creator","id":"creator","key":"issue.field.creator","isShown":true,"shown":true},{"name":"Affects Version","id":"version","key":"issue.field.affectsversions","isShown":true,"shown":true},{"name":"Fix Version","id":"fixfor","key":"issue.field.fixversions","isShown":true,"shown":true},{"name":"Component","id":"component","key":"issue.field.components","isShown":false,"shown":false},{"name":"% Limits","id":"workratio","key":"issue.field.workratio","isShown":true,"shown":true},{"name":"Link types","id":"issue_link_type","key":"issue.field.issuelinks","isShown":true,"shown":true},{"name":"Environment","id":"environment","key":"issue.field.environment","isShown":true,"shown":true},{"name":"Description","id":"description","key":"issue.field.description","isShown":true,"shown":true},{"name":"Comment","id":"comment","key":"issue.field.comment","isShown":true,"shown":true},{"name":"Label","id":"labels","key":"issue.field.labels","isShown":true,"lastViewed":1743564099200,"shown":true},{"name":"Query","id":"text","key":"text","isShown":true,"shown":true},{"name":"Business Value","id":"customfield_10003","key":"com.atlassian.jira.plugin.system.customfieldtypes:float","isShown":false,"shown":false},{"name":"Development","id":"customfield_10500","key":"com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary","isShown":true,"shown":true},{"name":"Epic Color","id":"customfield_10009","key":"com.pyxis.greenhopper.jira:gh-epic-color","isShown":false,"shown":false},{"name":"Epic Link","id":"customfield_10006","key":"com.pyxis.greenhopper.jira:gh-epic-link","isShown":true,"shown":true},{"name":"Epic Name","id":"customfield_10007","key":"com.pyxis.greenhopper.jira:gh-epic-label","isShown":true,"shown":true},{"name":"Epic Status","id":"customfield_10008","key":"com.pyxis.greenhopper.jira:gh-epic-status","isShown":false,"shown":false},{"name":"Epic/Theme","id":"customfield_10001","key":"com.atlassian.jira.plugin.system.customfieldtypes:labels","isShown":true,"shown":true},{"name":"Flagged","id":"customfield_10000","key":"com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes","isShown":true,"shown":true},{"name":"Forums Username","id":"customfield_10600","key":"com.atlassian.jira.plugin.system.customfieldtypes:textfield","isShown":false,"shown":false},{"name":"Guidelines Read","id":"customfield_10700","key":"com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons","isShown":true,"shown":true},{"name":"Original story points","id":"customfield_10904","key":"com.atlassian.jpo:jpo-custom-field-original-story-points","isShown":true,"shown":true},{"name":"Parent Link","id":"customfield_10901","key":"com.atlassian.jpo:jpo-custom-field-parent","isShown":false,"shown":false},{"name":"Plugin","id":"customfield_10100","key":"com.atlassian.jira.plugin.system.customfieldtypes:textfield","isShown":true,"shown":true},{"name":"Rank","id":"customfield_10102","key":"com.pyxis.greenhopper.jira:gh-lexo-rank","isShown":true,"shown":true},{"name":"Release Version History","id":"customfield_10107","key":"com.pyxis.greenhopper.jira:greenhopper-releasedmultiversionhistory","isShown":true,"shown":true},{"name":"Sprint","id":"customfield_10005","key":"com.pyxis.greenhopper.jira:gh-sprint","isShown":true,"shown":true},{"name":"Story Points","id":"customfield_10002","key":"com.atlassian.jira.plugin.system.customfieldtypes:float","isShown":false,"shown":false},{"name":"Team","id":"customfield_10900","key":"com.atlassian.teams:rm-teams-custom-field-team","isShown":true,"shown":true},{"name":"Version","id":"customfield_10601","key":"com.atlassian.jira.plugin.system.customfieldtypes:textfield","isShown":true,"shown":true}],"type":"DETAILS","title":"Details"},{"searchers":[{"name":"Created Date","id":"created","key":"issue.field.created","isShown":true,"shown":true},{"name":"Updated Date","id":"updated","key":"issue.field.updated","isShown":true,"shown":true},{"name":"Resolution Date","id":"resolutiondate","key":"issue.field.resolution.date","isShown":true,"shown":true},{"name":"Target end","id":"customfield_10903","key":"com.atlassian.jpo:jpo-custom-field-baseline-end","isShown":true,"shown":true},{"name":"Target start","id":"customfield_10902","key":"com.atlassian.jpo:jpo-custom-field-baseline-start","isShown":true,"shown":true}],"type":"DATES","title":"Dates"},{"searchers":[{"name":"Assignee","id":"assignee","key":"issue.field.assignee","isShown":true,"lastViewed":1743564099199,"shown":true},{"name":"Reporter","id":"reporter","key":"issue.field.reporter","isShown":true,"shown":true}],"type":"PEOPLE","title":"People"}]},"values":{"issuetype":{"name":"Type","editHtml":"\n\n\n\n <div class=\"field-group aui-field-issuetype\" >\n <label for=\"searcher-type\">Type</label> <select class=\"select js-default-checkboxmultiselect\"\n id=\"searcher-type\"\n multiple=\"multiple\"\n name=\"type\"\n data-max-inline-results-displayed=\"100\"\n data-placeholder-text=\"Find Issue Types...\">\n <optgroup>\n \n <option class=\" \"\n id=\"type_-2\"\n title=\"All Standard Issue Types\"\n value=\"-2\">All Standard Issue Types</option>\n </optgroup>\n\n <optgroup label=\"Standard Issue Types\">\n \n <option class=\" imagebacked 10402 10101 10200 \"\n data-icon=\"/jira/secure/viewavatar?size=xsmall&avatarId=10303&avatarType=issuetype\"\n data-fallback-icon=\"/jira/images/icons/issuetypes/blank.png\"\n id=\"type_1\"\n title=\"Bug\"\n value=\"1\">Bug</option>\n \n <option class=\" imagebacked 10402 10200 \"\n data-icon=\"/jira/secure/viewavatar?size=xsmall&avatarId=10310&avatarType=issuetype\"\n data-fallback-icon=\"/jira/images/icons/issuetypes/blank.png\"\n id=\"type_4\"\n title=\"Improvement\"\n value=\"4\">Improvement</option>\n \n <option class=\" imagebacked 10402 10101 10200 \"\n data-icon=\"/jira/secure/viewavatar?size=xsmall&avatarId=10311&avatarType=issuetype\"\n data-fallback-icon=\"/jira/images/icons/issuetypes/blank.png\"\n id=\"type_2\"\n title=\"New Feature\"\n value=\"2\">New Feature</option>\n </optgroup>\n\n <optgroup label=\"Sub-Task Issue Types\">\n </optgroup>\n </select>\n </div>\n ","validSearcher":true,"isShown":true},"project":{"name":"Project","editHtml":" \n <div class=\"field-group aui-field-project\" >\n <label for=\"searcher-pid\">Project</label> <select class=\"js-project-checkboxmultiselect\"\n data-placeholder-text=\"Find Projects...\"\n id=\"searcher-pid\"\n multiple=\"multiple\"\n name=\"pid\">\n <optgroup label=\"Recent Projects\">\n </optgroup>\n <optgroup label=\"All Projects\" >\n \n <option data-icon=\"/jira/secure/projectavatar?pid=10100&size=small\"\n title=\"BuildTools\"\n value=\"10100\">\n BuildTools (BUILDTOOLS)\n </option>\n <option data-icon=\"/jira/secure/projectavatar?pid=10002&size=small\"\n title=\"Spigot\"\n value=\"10002\">\n Spigot (SPIGOT)\n </option>\n <option data-icon=\"/jira/secure/projectavatar?pid=10101&size=small\"\n title=\"SpigotPlugins\"\n value=\"10101\">\n SpigotPlugins (PLUG)\n </option>\n </optgroup>\n </select>\n </div>\n \n\n","validSearcher":true,"isShown":true},"assignee":{"name":"Assignee","editHtml":"\n \n <div class=\"field-group aui-field-userlist\" >\n <label for=\"searcher-assigneeSelect\">Assignee</label> <fieldset rel=\"assignee\" class=\"hidden user-group-searcher-params\">\n </fieldset>\n <select class=\"js-usergroup-checkboxmultiselect\" multiple=\"multiple\" id=\"assignee\" name=\"assignee\" data-placeholder-text=\"Enter username or group\">\n <optgroup>\n <option class=\"headerOption\" data-icon=\"https://hub.spigotmc.org/jira/secure/useravatar?size=xsmall&avatarId=10123\" value=\"empty\" title=\"Unassigned\">Unassigned</option>\n </optgroup>\n <optgroup>\n </optgroup>\n </select>\n <input type=\"hidden\" name=\"check_prev_assignee\" value=\"true\">\n </div>\n \n","validSearcher":true,"isShown":true},"status":{"name":"Status","editHtml":"\n <div class=\"field-group aui-field-constants\" >\n <label for=\"searcher-status\">Status</label> <select class=\"select js-default-checkboxmultiselectstatuslozenge\"\n data-placeholder-text=\"Find Statuses...\"\n id=\"searcher-status\"\n multiple=\"multiple\"\n name=\"status\"\n data-max-inline-results-displayed=\"100\"\n data-footer-text=\"-95 more options. Continue typing to refine further.\" data-status-lozenge=\"true\">\n <optgroup >\n <option class=\"imagebacked\" data-icon=\"/jira/images/icons/statuses/open.png\" value=\"1\" title=\"Open\" data-simple-status=\"{"id":"1","name":"Open","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"/jira/images/icons/statuses/open.png","statusCategory":{"id":2,"key":"new","colorName":"default"}}\">Open</option>\n <option class=\"imagebacked\" data-icon=\"/jira/images/icons/statuses/inprogress.png\" value=\"3\" title=\"In Progress\" data-simple-status=\"{"id":"3","name":"In Progress","description":"This issue is being actively worked on at the moment by the assignee.","iconUrl":"/jira/images/icons/statuses/inprogress.png","statusCategory":{"id":4,"key":"indeterminate","colorName":"inprogress"}}\">In Progress</option>\n <option class=\"imagebacked\" data-icon=\"/jira/images/icons/statuses/reopened.png\" value=\"4\" title=\"Reopened\" data-simple-status=\"{"id":"4","name":"Reopened","description":"This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.","iconUrl":"/jira/images/icons/statuses/reopened.png","statusCategory":{"id":2,"key":"new","colorName":"default"}}\">Reopened</option>\n <option class=\"imagebacked\" data-icon=\"/jira/images/icons/statuses/resolved.png\" value=\"5\" title=\"Resolved\" data-simple-status=\"{"id":"5","name":"Resolved","description":"A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.","iconUrl":"/jira/images/icons/statuses/resolved.png","statusCategory":{"id":3,"key":"done","colorName":"success"}}\">Resolved</option>\n <option class=\"imagebacked\" data-icon=\"/jira/images/icons/statuses/closed.png\" value=\"6\" title=\"Closed\" data-simple-status=\"{"id":"6","name":"Closed","description":"The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.","iconUrl":"/jira/images/icons/statuses/closed.png","statusCategory":{"id":3,"key":"done","colorName":"success"}}\">Closed</option>\n </optgroup>\n</select>\n </div>\n \n","validSearcher":true,"isShown":true},"labels":{"name":"Label","viewHtml":" <div class=\"searcherValue\">\n \n <label class=\"fieldLabel\" for=\"fieldlabels\">Label:</label><span id=\"fieldlabels\" class=\"fieldValue\">\n \n Horn\n</span></div>\n","editHtml":"\n <div class=\"field-group aui-field-labels\" >\n <label for=\"searcher-labels\">Labels</label> <select class=\"js-label-checkboxmultiselect\" multiple=\"multiple\" id=\"searcher-labels\" name=\"labels\" data-placeholder-text=\"Find Labels...\">\n <option value=\"Horn\" title=\"Horn\" selected=\"selected\">Horn</option>\n </select>\n </div>\n \n","jql":"labels = Horn","validSearcher":true,"isShown":true}}}
[{"id":-1,"name":"My open issues","jql":"assignee = currentUser() AND resolution = Unresolved order by updated DESC","isSystem":true,"sharePermissions":[],"requiresLogin":true},{"id":-2,"name":"Reported by me","jql":"reporter = currentUser() order by created DESC","isSystem":true,"sharePermissions":[],"requiresLogin":true},{"id":-4,"name":"All issues","jql":"order by created DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false},{"id":-5,"name":"Open issues","jql":"resolution = Unresolved order by priority DESC,updated DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false},{"id":-9,"name":"Done issues","jql":"statusCategory = Done order by updated DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false},{"id":-3,"name":"Viewed recently","jql":"issuekey in issueHistory() order by lastViewed DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false},{"id":-6,"name":"Created recently","jql":"created >= -1w order by created DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false},{"id":-7,"name":"Resolved recently","jql":"resolutiondate >= -1w order by updated DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false},{"id":-8,"name":"Updated recently","jql":"updated >= -1w order by updated DESC","isSystem":true,"sharePermissions":[],"requiresLogin":false}]
This bug still exists in the current version of 1.21.4. Custom instruments that are defined in the item NBT instead of a datapack also kick the player, but work fine in vanilla server software.