When is a player flagged as a cheater?
Solution 1:
The actions to get flagged as a cheater are liquid spam, projectile spam, add tile spam and remove tile spam.
If spam checking is enabled, all players are checked for spam on every server tick. The server keeps track of placing liquid and tiles, shooting projectiles and removing tiles for each player. Every tick of the server clears 4 projectile shots, 3 tile placements, 5 tile removals and 2 liquid placements from its memory, from every player.
If you keep doing these 4 actions faster than the server clears them from its memory for long enough, you will be kicked from the server.
Solution 2:
I don't think inventory editing will flag you as a cheater, however, using tools like cheat engine on a server likely will, as it allows players to become literally invincible!