Towny is a plugin for Bukkit (originally from but discontinued from hMod) that allows players to create towns and nations, along with simple alliance controls. The world is broken up into a grid using 16x16 grid cells as default. Each town is given a certain number of these cells and gains more as the town holds more players. These cells can be controlled by a town's mayor to remove mobs, animals, set build/destroy permissions, and define PvP zones. The mayor can also section off some of these cells for sale among its residents. Once a town joins a nation, it's residents can then start building in it's allied towns, but is susceptible to it's enemies destroying it when war time is announced.
Towny uses 6 libraries to compile. 1 API along with 4 other plugins.
Bukkit : https://github.com/Bukkit/Bukkit : http://bamboo.lukegb.com/browse/BUKKIT-BUKKITMAIN/
iConomy : by Nijikokun
Permissions : by Nijikokun
Essentials + EssentialsTele : by Zenexer
GroupManager : by AnjoCaido