What if someone made proximity detectors underground in a town, such as the spawn on a server. If the player is in proximity you can set them to adventure mode, this could be used for vanilla servers, or protecting your own villages on any server. It could even be used in Bukkit servers, for instance if you want to use your proximity detector and have it be able to turn on/off, one lever can enable building in your town, the possibilities are endless.
It could work but in adventure mode people can still place blocks and now they can destroy block if they have the right tool.
You could have it so people can't come into the town when you are away. By some type of proximity and then a teleport with a range with surrounds your town that would teleport anyone out of town and away.
You could have it so people can't come into the town when you are away. By some type of proximity and then a teleport with a range with surrounds your town that would teleport anyone out of town and away.