Can we disable only a specific command for a specific Minecraft server operator?

Solution 1:

Vanilla Way

You can't. This isn't supported; you can't be an op but be unable to access these commands as /give and /gamemode belong to Level 1 (cheats) permissions; second-lowest and will lock them out of other commands.

See What does op-permission-level do?.

Permissions Way (Requires Plugins and Bukkit/Spigot/Paper)

Give the following permission nodes and deop your player:

  • minecraft.command.clear
  • minecraft.command.difficulty
  • minecraft.command.effect
  • minecraft.command.gamerule
  • minecraft.command.summon
  • minecraft.command.setblock
  • minecraft.command.tp
  • minecraft.command.ban
  • minecraft.command.deop
  • minecraft.command.whitelist
  • minecraft.command.kick
  • minecraft.command.op
  • minecraft.command.stop
  • minecraft.command.save
  • minecraft.command.save-all

Also, you shouldn't be giving away op to players you don't want cheating. That's on you; just /deop them. By giving all operator powers other than /give or /gamemode, what's stopping them from them just /baning you out of retaliation?