Plot Management System

2k Downloads

Hello folks, this is my very first plugin I publish, so I really hope that everything will be right with the plugin for you.

This plugin manages your plots with regions from WorldGuard. You can define it as an WorldGuard extension or as an own plugin.

Features:

  • Get a plot by typing in the ID or just standing on it.
  • Sell your plot (If it didn't cost anything, then you won't get money back)
  • Remove all owners and members from a plot.
  • Add a player to your plot to build with a friend.
  • You also can remove your friend from your plot.
  • Look to which player the plot belongs to.
  • List all plots a player owns.
  • When you sell a plot, then the plot will be resetted without any server lag.
  • Check if the plugin defines a ID as a plot or not.
  • Language pack support: Create, and switch language packs ingame. (English and German are already included)
  • When a plot is already owned, the plugin will show you to which player it belongs.
  • SQLite support.
  • List all plots of a type (For example, member, vip, skyscraper, etc.)
  • Define your own plot types, how much it will cost, which permission a player needs to get/buy it, the alias and the name of the plot-type.
  • Look which plots you own already.
  • Define how many times the plugin should check if the block placed by the plot recreation process is the correct one.
  • Define how many plots a player is allowed to own or to build on. (For both a restriction of 20)
  • Define how much a plot can cost per square meter, this is good if you have plots with one type which have a different size.
  • Define your own plottypes with a command.
  • Get information about a plot, how much it costs, which size it has, and which type it is, and if it is owned.

So, you can see that the plugin has a bunch of features. At the beginning I just made it for my server, but I didn't find any plugin which has all these features I needed, so I just wrote it by myself.

Features which are work in progress:

  • Updatecheck feature. IN PROGRESS
  • A command to save only a plot that you have typed in as a param, or all plots that have not been saved yet. IN PROGRESS
  • Automatic config file updater. IN PROGRESS

That are my current main goals, but you also can post your ideas in the comments, and I will look how often an idea has been requested, and may I'll add it.

Commands:

<> = Needed, [] = Optional

CommandDescriptionPermission
/buyplot [PlotID]Get a plot by standing on it or typing in the IDfcgsbuy.member
/sellplot <plotID>Sell or leave your plotfcgsbuy.member
/listplots <plotType or all>Get a list of the typed in plot-type or from all plotsfcgsbuy.list
/removeowner <plotID>Remove the owner of a plotfcgsbuy.admin
/adduser <plotID> <username>Add a user to one of your plotsfcgsbuy.member
/removeuser <plotID> <username>Remove a user of one of your plotsfcgsbuy.member
/updatedatabasesFill the databases with the users and their owned plotsfcgsbuy.dropdb
/ownedby <plotID>Look which user owns the plotfcgsbuy.belongsto
/listplotsfromplayer <username>Get a list of the owned plots from a playerfcgsbuy.listgsfromplayer
/saveplotsSave all plots to files. Needed to reset the plotsfcgsbuy.saveplots
/isplot <plotiD>Look if the plotID is validfcgsbuy.debug.isplot
/pmsinfoGet information about the pluginNone
/changepack <languagepackname>Load a language packfcgsbuy.changelanguage
/myplotsGet a list of your owned plotsfcgsbuy.myplots
/defineplot <plotType> <costs> <permission> <alias> <pps>Create a new plot typefcgsbuy.admin
/plotinfo <plotID>Get information about a plotfcgsbuy.admin

If you are questioning you why every permission has a "fcgsbuy" in it, it's just a remaining thing from the server exclusive time. It means "FloriluCraftGrundstückBuy". I know, pretty bad name. I'll may change the permissions, it just depends on the requested changes/features.

How to install:

  • Download the current pms.jar here from dev.bukkit.org and drop it in your plugins-folder. You NEED WorldGuard and Vault to run this plugin, if you don't have them install them.
  • Run your server and you will find a new folder called "PlotManagementSystem", there you can find the config.yml, the plotNames.txt, and under "languagepacks" are all language packs located, theres also a "ex.lp" this is just a pattern for your own language pack. Also a new folder called "sql", there is the player database located.

Define your own plots:

Open the plotNames.txt

member
vip
modern
rome

There you define the full names of the plots, not the aliases.

  • Open the config.yml:
general:
   languagePack: en
   sqlOutput: true
   plotRecreateBuffer: 2
   ownPlots: 4
   onPlots: 2
plots:
   member:
    costs: 0
    pps: 0
    permission: fcgsbuy.member
    identification: m
    special: false
   vip:
    costs: 1000
    pps: 1
    permission: fcgsbuy.vip
    identification: vip
    special: true
   skycraper:
    costs: 2000
    pps: 2
    permission: fcgsbuy.member
    identification: sky
    special: true

Under plots you write the names which you have written in the plotNames.txt, so the plugin can find them easily. At first you define how much a plot will cost, "0" stands for that it's free, when you type in a number bigger than zero then the amount will be withdrawn from the players account. You are also able to define how much a plot will cost per square meter, that means when you have a plot which is like 10*10 meters big and you have defined pps: 4 then 400 money will be withdrawn from the players account plus the normal costs of a plot.
Then you define which permission a player needs to get a various type of plot, you can define them by yourself, so it doesn't matter if you write "fcgsbuy.member" or "blablabla", the player just needs the permission.
The identification is VERY important, this is the alias of the plot like for example by "member" it is "m" so that meens all member plots are named as "m1, m2, m3, m4, m5, m6, m7 etc.".
And special doesn't make sense yet, it's just a placeholder.
At "sqlOutput" you can define if you want to look which SQL-Queries the plugin sends to the database. For example if you encounter a bug.
At "ownPlots" you define how many plots a player can own. (Restriction from 20)
At "onPlots" you define on how many plots a player can build with a friend. (Restriction from 20)

  • Restart your server and define the plots with WorldGuard.
  • Then run the command /saveplots, this will save all plots into files lagfree and fast. This is important for resetting, so don't touch these files.
  • I also recommend to run the command /updatedatabases

How to Update:

Hint: I recommend to use the PluginManager http://dev.bukkit.org/bukkit-plugins/pm-pluginmanager/
Download the newest version of the plugin here on BukkitDEV, and drop it into your plugins folder.
If there are any configuration changes or changes at the database structure, delete the database or the config.yml
Restart your server or if you have installed the PluginManager type in the command
/pm reload PlotManagementSystem

Known Bugs:

If you want to save the plots and you already have them in the save folder you will encounter a server crash with the "ConcurrentModificationException". So better delete them before you use the /saveplots command.

So that's pretty much like how it works. If you have any questions or ideas, just post them in the comments, but I can't program every day alot of hours on it because I'm working as a developer in a company, I try my best to respond fast.

I hope you find it interesting and that you are going to download it :) And if you want to support me, you can write me a PM or a comment. If you encounter any bug, create a new ticket. For wishes etc. just write them into the comments.

Hints:

The plugin is a little bit in development right now, so you can expect a lot of new features! It also supports 1.7.10. But I can't say alot to that, so use it at your own risk.

Source Code:

Here's my GitHub Repository: https://github.com/florilu/Plot-Management-System

Future Updates:

So, after almost one year of not being active on this plugin, I spontaneously started updating the plugin to Bukkit-1.8.8. The first things are fixed now, but I have to rework alot, because there has been changed so much in the past year. So currently I'm experiencing alot of errors mostly occuring with my SQLite functionality, just because some datatypes have been changed over time. But I hope that it will be fixed pretty fast and that this thing is the only "gamebreaking" error that occurs besides the wrong file encoding...I really should use UTF-8

I plan to release the update at least during the week from 02.11.2015 to 08.11.2015.