Update enderAPI.lua

reduce file reads