Started by
QRSTUV
on
Topic category: Help with Minecraft modding (Java Edition)
I am currently working on a mod with a click gui that when one of the buttons are pressed it executes a command for the player. Is there a possible way to do this? There is a block that has "execute command" on it, but in the required dependencies area it says entity how do I specify the entity that will execute the command? I hope you can help me. Thank You
-QRSTUV
This is not possible. To execute the command you need to have entity reference to check for the permissions. Command will only work if the player has permissions to use them. Try using procedures instead of commands.
Is it still not possible even if the entity has sufficient permissions, and I am kinda new to mcreator so I am unfamiliar on how all of it works.
If you accept this, you can use simple procedure execute the command and trigger it on button press.
Ok but how do I know if I used the right elements in the procedure
You can't really mess thing up. Just place execute command in the procedures window. If you are struggling with basics, I suggest you to check this playlist: https://www.youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei
Ok thank you for helping me I will make sure to watch the playlist. enjoy the rest of your day
You are welcome!