Minecraft Plugin Spotlight - Residence

Welcome to the weekly Minecraft Plugin Spotlight! In this issue we will be featuring "Residence", a plugin created by bekvon


Residence allows you to protect your property in various ways. Rather than bothering admins you will now be able to do it yourself! However, admins can still set certain limits to your abilities.

The first thing you will have to do is selecting the area you would like to protect; the block you are currently standing on will be the centre of this area. If an economy plugin is installed, you will have to take the costs into account as well.

Once the selection is successful you can create your protected area, called a "residence", using the name and values you specified.

To prevent unwanted visitors from entering or damaging your property various flags are at your disposal. Each flag controls a certain action, such as moving and using objects. These flags can be set to "true" or "false", meaning an action is allowed or disallowed respectively. A flag can be set for one specific player or everyone.

When the move flag is set to "false" others will not be able to enter your residence. When they go too far they will even get disconnected from the server.

The use flag prevents unwelcome players from activating objects, which includes doors and gates:

In addition to the flags mentioned above, plenty of other ones are available; including flags that block visitors from destroying or igniting your place:

Residence is packed full of useful features, it's just too much to cover in this spotlight! These features comprise:

  • Residence as a healing zone
  • Giving away your residence to another player
  • Teleporting to a residence
  • Subzones in a residence
  • ...and more!

The plugin requires a permission plugin, such as Essentials GroupManager, to work properly. For buying and selling an economy plugin is needed as well, Essentials Economy for example. A complete list of supported plugins can be found here.

All in all Residence offers a versatile home protection system that doesn't burden the admins with extra work: players can set up their own protected area and configure it as well. Server owners can still limit the players' abilities using the provided configuration file.

We also managed to get an interview with bekvon, the creator of Residence! Check it out below to find out more about the development process of this plugin.

What was your inspiration for creating this plugin?
I had been running a small server just for a few friends, and had been playing around with many different plugins.  Then I found WorldGuard and saw how useful it was to do things like protect the spawn from damage from monsters, and protect my buildings from creepers.  My friends, however, were unable to protect stuff on their own since I was the only admin.  So I got the idea to make my own protection plugin that would allow them to protect their stuff, and so Residence was born.

How was your plugin received by the community at its initial release?
When I released the first version, I thought the community enjoyed it right away.  There weren't really any other well known plugins at the time that offered the exact feature of allowing anyone the freedom to protect land within certain limits.  So it grew and after getting much feedback from the community I continued to improve upon it.  I also received help from the community in the form of writing the wiki, and the occasional help with code, and so I must say thank you to the community for all your support!

Approximately how much time went into the development of Residence so far?
Its hard to say exactly, I built the initial code about a month or two before its release in March 2011.  I then worked on it pretty solidly for a few more months, and after that, I only worked on it in bits and pieces here and there.  Overall though, development never completely halted so I guess its been in the works for about a year and a half now.

Did you come across any problems while working on your plugin?
Plenty!  The biggest challenge was getting down the 3D math stuff of creating the actual areas, and creating code that would prevent them from overlapping.  Also, integrating with other plugins (such as iConomy) initially proved challenging.  Bukkit itself kept changing and developing at a rapid rate, and it was also difficult to find time to keep up with all the changes.

What tools did you use for creating your plugin?
I used the NetBeans IDE.  It is a freeware Java IDE that will do some nice stuff such as auto completing code for you.  Eclipse is another one that is used by some of the other current Residence developers, and its probably more widely known.  For a source code repository we use GitHub.

Have you learned anything new from creating this plugin?
Yes, this was very much a learning experience for me.  I had really only programmed little programs for fun, this was the largest project I had done to date.  Learning how to organize code on a large scale was very difficult for me at first, and some of this still shows until today in the older parts of Residence's code.  I have never done any real professional programming, and so I am still learning the finer points of it as a work on Residence.

What part of the development process of Residence did you enjoy most?
I really enjoyed working on the flags and sub-zone systems.  They were really fun to create and a challenge to think about.  I found the idea of being able to create an infinite number of sub-zones within each Residence, and then create a infinite number more within those sub-zones to be a very neat idea, and then to be able to assign different permissions to each one of them using the flags system.

And what is your favourite part of the plugin itself?
I like the ability of Residence to support other addons that people make, through its custom APIs.  I feel that this provides a lot of freedom for people to expand the mod in ways I never will have time to.  An example would be the Dynamap to Residence bridge, that shows all the Residences on a real time map.  There are quite a number of addons currently, and we try to keep a list of them all on our page so other players can enjoy them too.  We support the ability to add custom flags as well, since this allows developers to do stuff with zones without having to worrying about programming their own zone systems.

Are you currently working on any other plugins or updates?
Not at the moment I'm not.  I had written a few other small plugins that still float around on the bukkit forums and some, such as PlugMan, that have been taken over by others, but I no longer maintain any of them.  Residence 3 is still in the works, but its very slow going right now.

Besides Minecraft, have you ever developed any mods or maps for other games?
None that I have officially released.  I have a working Java based random map generator for Half-Life 2 that I have been working on and off with for about a year now that still needs a ton of polish.  I'm not sure if I will ever release it.

Do you have any advice for other potential plugin developers?
Find a unique idea, the rest is just code. Smile

Many thanks to bekvon for creating this plugin and for participating in our interview.


Posts Quoted:
Clear All Quotes