Close any gui open for...

Started by ItzAxo on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2026
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Close any gui open for...

i have seen quite a few similiar issues, but couldnt pintpoint one that could help me.

Sorry if im dupping.

Anyways im on Fabric 1.21.8

But here the issue, im trying to make a item that when you hold right click for 3 seconds opens a gui & the item delets.

In the gui you can enter a player name & if the player is Not in survival they will be switched to survival and telepeorted to overworld 0 80 0 & they get advancement. also in the chat it says as no one "PlayerRev success" which is all functioning well. the issue is that the close any gui open for event/target entity, doesnt close the gui. i've tried putting it all the way at the top, so it would automatically close the gui if you entered it & that doesnt work either. Also yes i am well aware the code is abit messy. but im fine with feedback & or upgrades. since this is strict about capitals & such.


but yeah how come if the player succeds it doesnt close the gui? (you press a button on the gui & that calls this function) ButtonPressBlueprints