CreateEntityContext context = this.npcManager.prepareEntity(RemoteEntityType.Human).asStationary(true).withName("test").atLocation(inEvent.getPlayer().getLocation()).withID(10);
//Whenever you specify an id it's not 100% sure that the entity you create has that ID. It'll get the next free ID from the give ID.
for(int i = 0; i < 10; i++)
{
//Whenever we call the create method a new entity gets created with the options we specified in the context. That means we'll create ten "test" human npcs in this case.
context.create();
}
}
}