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

Started by CaiGuyCrafter on Mon, 01/11/2021 - 20:33

Topic category: Help with modding (Java Edition)

Last seen on 20:48, 17. May 2022
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How would I check the number of XP levels in a procedure?
Mon, 01/11/2021 - 20:33

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.