Making a player unable to trade with villagers

Started by MagyTheMage on

Topic category: Help with MCreator software

Last seen on 02:29, 20. Apr 2024
Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Making a player unable to trade with villagers
Fri, 06/05/2020 - 02:12 (edited)

The idea is simple,as a part of a mod im working with, you can join the Illagers and become evil,

however i want to make it so that Illager players cannot trade with villagers..does anyone have an idea on how i can pull this off?

ive tried spawning another GUI, Closing the GUI using the "close GUI" Process, but i cant figure anything out.

anyone got an idea of a way i could find some way to do this?

Edited by MagyTheMage on Fri, 06/05/2020 - 02:12
Last seen on 03:10, 19. Feb 2022
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think it isn't possible…
Fri, 06/05/2020 - 02:34

I think it isn't possible without coding, sorry

 

Last seen on 19:10, 11. Apr 2024
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could make a procedure…
Tue, 12/14/2021 - 01:03

You could make a procedure that executes /data remove @s Offers.Recipes as any villager around the player, although that'll completely erase their trades for all players. Searching for a better way to do this myself.

Last seen on 19:10, 11. Apr 2024
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Not even 10 minutes later I…
Tue, 12/14/2021 - 01:12

Not even 10 minutes later I found the answer: After detecting that the player right-clicked a villager wait 1 tick server-side for the Trade GUI to open and immediately close it and if you want you could even play the entity.villager.no sound