This is the solution I used when bug testing MedievaLands. https://github.com/ZaneDubya/YserbiusData/tree/master/Yserbius/Solution