Might not be related to your problem but make sure to always null check before using am interact option.
NPC Shopkeeper = npcs.closest("Shop npc");
Shopkeeper.interact("Trade");
Should be:
NPC Shopkeeper = npcs.closest("Shop npc");
if(shopkeeper != null){
Shopkeeper.interact("Trade");
...
}
For the rest, on what line are you getting an NPE?