Hello Creeperkiller09, there are NPC in singleplayer if you have selected the option villages. You can trade with a NPC. In creative mode you can also spawn a NPC if you use a "NPC egg", in your inventory search for "NPC". They will protect you if enemies attack you.