Need help retrieving the UUID of an entity

Started by MagyTheMage on

Topic category: Advanced modding

Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Need help retrieving the UUID of an entity

Im trying to create a custom reputation system for villagers that will, based on my own calculated reputation score, have several ramifications in villagers behavior: However im struggling with one aspect: Attempting to retrieve the players formmated ID.

No i dont mean the normal UUID that you can get with certain plugins, i mean the UUID thats formated in 4 different integrers that i can use to run commands:

 

I intend to modify the reputation system completly and for that i want to establish custom discounts based on my own thresholds, i figured this out most of the way but i ran into an issue here:

The command im runningAttempts at getting an output on the console with the UUID i need

 

Im trying to actively modify Villagers major_positive and minor_positive values when the player right clicks the villager in order to create completly custom discounts, i originally used the hero of the village effect but im looking for a fancier way to go about it as using the hero of the village effect causes issues in the oridinary use of the effect.

Using "create text with" in the command is what i often do when i need to run a command that needs to be modified actively based on different conditions, this method has worked on several ocassions, but im running with the issue of being unable to retrieve the UUID of the player to correctly apply it to my data command and this is where im at the standstill.

I have tried every method i could think of, using different plugins such as Additions or Metadata editor, but i cant seem to figure out how to retrieve the UUID in the format that i need to apply it directly on the command. 

Using metadata editor to modify the values is impossible as the plugin does not support lists inside lists. 

Ive considered running some kind of advanced procedure that runs the command for the player and stores the output of a /data get entity @s UUID somewhere in a variable and edditing it as needed, but i cant figure out how to retrieve the necesary output.

Anyone has any ideas on how i can get this to work?