How would I check the number of XP levels in a procedure?

Started by CaiGuyCrafter on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How would I check the number of XP levels in a procedure?

I think the title says it, but I'll go into a little more detail. In a GUI menu, the player can purchase something, and they need to have XP to do it. But first, I need to check the amount of XP they have, and then subtract 15 from it. How would I do that? I see something that says "Get Player XP Level", but it doesn't go inside the "if, then do" block, and it doesn't check for the amount of XP, it only gets the number.