We dont ask why you want to cheat, we just tell you how it works 😉
If you want to cheat some items, you’ll have to be either in singleplayer mode or an admin on a server. You can read this tutorial on how to get admin access on your server.
After you’ve gained admin access, you’ll have two possibile ways of cheating items. The first is using the in-game GUI (Admin Console), which is pretty limited in functionality. We suggest using the Cheat Console. You can open it by pressing ` / ~ / INSERT (depends on your language). Then you just have to enter the command SpawnItem <ITEMID> <AMOUNT>. Of course you have to replace <ITEMID> and <AMOUNT> with the values you want. You can look up the itemid on this page.