[SPIGOT-7298] Debug stick can modify only the default attribute when not in creative, even with minecraft.debugstick.always Created: 16/Mar/23  Updated: 25/Dec/24  Resolved: 20/Mar/23

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Z Muerle Assignee: Doc
Resolution: Fixed Votes: 0
Labels: bug, permission
Environment:

Ubuntu server, running in a docker container.
My main server runs paper, which is where I noticed the issue, but it looks like the issue initially stems from here, with "0085-Add-creative-mode-NBT-permissions.patch"
I initially filed an issue with paper, but figured I should go upstream to the source.
I feel this cannot be classified as a vanilla bug, as craftbukkit is what implemented the permissions.


Version: CraftBukkit version 3647-Spigot-19641c7-39462a8 (MC: 1.19.3) (Implementing API version 1.19.3-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

Expected behavior

left-clicking with a debug stick should cycle through the available attributes.
For example: on pistons, it defaults to "extended": true/false, but left clicking allows you to instead modify the "facing" value.

Observed/Actual behavior

right-clicking still cycles the selected attribute, but left-clicking does nothing. no toast about the selected attribute, and right clicking still cycles the "extended" state.
If you switch to creative, then change which attribute you're modifying, then it cycles that one, even if you switch back to survival.

This does not seem to be a new issue, as this person posted about it 2 years ago, and their fix was to just use worldedit instead:
https://www.reddit.com/r/admincraft/comments/m3yseb/debug_stick_left_click_isnt_working/
(in their attached video, you can see that when they're in survival mode, left-clicking only breaks the glass pane instead of selecting the next direction they can toggle)
Though they were using purpur, but that code still comes all the way back to craftbukkit.

Steps/models to reproduce

  • give player the minecraft.debugstick and minecraft.debugstick.always permission
  • give the player a debug stick
  • set the player into survival
  • player left-clicks on any block with multiple attributes that can be modified
  • player is still only able to modify the first attribute with right-click
  • set player into creative
  • left click now correctly chooses the attribute to modify

Plugin and Datapack List

Plugins:

  • none (tested on a fresh spigot server to be sure)

Datapacks:

  • vanilla (built-in)
  • file/bukkit (world)


 Comments   
Comment by Doc [ 18/Mar/23 ]

Crated PR https://hub.spigotmc.org/stash/projects/SPIGOT/repos/spigot/pull-requests/123/overview

With this handle correctly in first damage of block for survival/adventure mode.

Comment by Z Muerle [ 17/Mar/23 ]

oh, yeah! Breaking the block with the debug stick causes it to select a different attribute, and doesn't break the block!

I'm guessing that when they made it creative-only checking for the block breaking was the same as clicking on the block. So using it in survival would be quite difficult, but not impossible.
So it's not actually a bug, just not the most useful as it is right now.
I apologize for not being more thorough in my testing.
Would changing that behavior be possible?

Comment by Doc [ 16/Mar/23 ]

update....

this works but with the survival behaviour.. if you try break the block (if the block can be broken) when finish and the block is to destroy then execute the debug stick. this need handle this logic for call the debug if has permissions.

Comment by Doc [ 16/Mar/23 ]

check the patch and the left-click use the permission but still require the creative/oplevel for use rather than only the permission like say the description of the permission, when can i can try a PR for this.

Generated at Tue Apr 22 05:09:39 UTC 2025 using Jira 10.3.5#10030005-sha1:190c783f2bd6c69cd5accdb70f97e48812a78d14.