But I’ve tried this with human entities (that aren’t players) and their gamemode doesn’t seem to change. I’ve tried offering it before and after spawning them.
Just a guess here, but gamemodes could possibly purposefully not be implemented for Humans, but rather just Players. I can not guarantee that though. I’m curious though, what is your use case for this? Are you trying to protect the Human from damage?
Humans should have GameModes, if we set them in creative it would avoid to cancel a damage event sent by the client, but the main point is : if I want to set them in spectator ? (with just a transparent head) Without GameModes I should send fake packets to achieve that (and use NMS)
An Human should have all properties of a Player since for the client it’s a Player.
Of course they are not Players but they appear as a Player to the client. I don’t need a transparent head but it was just an example, for personal use, I don’t care if Humans have GameModes or not, I was just thinking that someone may needs to attach attributes to an Human if he needs to modify the appearance.