bind a block to the player

Started by guernester13 on

Topic category: Help with modding (Data Packs)

Last seen on 07:30, 10. Aug 2022
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
bind a block to the player

my mod will add a block that must bind to a player (in this case the block will be placed when a player dies and bind to that player) then you should be able to interact with this block to be able to use commands that affect the player it is linked to (commands will be used by the block and will be in relation to tp or effects)

 (translated from spanish to english by google translate)

Last seen on 06:22, 13. Mar 2023
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use the UUID plugin and set…
Mon, 08/22/2022 - 04:54

Use the UUID plugin and set a string nbt tag to the block saved with the players UUID.

Then you can either call use the procedure for each player on the server with this if statement under it: if (player uuid==block string tag), and it will call a command for that player. Alternatively, you can test if the player right trying to run the command if (player uuid==block string tag).

UUID plugin can be found here:

https://mcreator.net/plugin/89039/namespace-id-uuid-procedures