Started by
Perdly
on
Topic category: Help with MCreator software
Ok so basically, im making an Animation vs Minecraft mod and I want to make it so that, when the "Minecraft game icon" is in my main hand, it switches game mode to creative and i figured that out already.. but when i switch to another item im still in creative and i wanna make it so that, when i switch off the game icon, i go back to survival.
You could run a procedure every player tick that checks if the item in their main hand is the game icon, and, if it isn't, switches them back to survival mode. Though keep in mind this will make it literally impossible to enter creative mode without the item. You could probably also do something with global player variables to make this work better. (Such as giving players a 'true creative mode' variable that, if true, keeps them in creative mode regardless of if they're holding the item.)