Step 13: Plot Squared
Plot Squared is a mod that brings together many of the previous mods and really gives your players a great environment to be creative in while making it hard for others to grief or cause trouble. Plot Squared can take a bit to get configured at first as it uses multiverse, economy, sql, worldguard, and if desired the economy. For this setup we're going to edit the config file to add a new world and adjust some settings, then create a new world with multiverse and tell it to to use the Plot squared generator. We should then be able to teleport to that world and see not only the terrain being setup as we specified, but also be able to claim plots. Then we'll setup the permissions so players can also claim a plot for themselves.
Lets start with adding the mod to your plugins server, start and then stop the server so that the necessary files are generated for us. Like in Multi-inventory there are two files we are going to look at for configuration, one that handles the SQL setup, and the other that handles the mod settings. The SQL setup file is found at \plugins\PlotSquared\config\storage.yml and you just set it up like you have with other previous mods if you want to use SQL, I didn't have any problems not using SQL but if you plan to do a lot of plot world work, I would suggest you get it setup before continuing.
In the same folder "\plugins\PlotSquared\config" there is a settings.yml file that we now want to look at and make some changes to so that when we generate the new world it will automatically work with PlotSquared. The File itself is not layed out intuitively, with the first section being some settings from the mod, then it goes into the world settings, and then back to some generic mod settings, I'll try and make this move obvious so you know later on where to make some changes to add another plot world to your server if desired.
Lets start with adding the mod to your plugins server, start and then stop the server so that the necessary files are generated for us. Like in Multi-inventory there are two files we are going to look at for configuration, one that handles the SQL setup, and the other that handles the mod settings. The SQL setup file is found at \plugins\PlotSquared\config\storage.yml and you just set it up like you have with other previous mods if you want to use SQL, I didn't have any problems not using SQL but if you plan to do a lot of plot world work, I would suggest you get it setup before continuing.
In the same folder "\plugins\PlotSquared\config" there is a settings.yml file that we now want to look at and make some changes to so that when we generate the new world it will automatically work with PlotSquared. The File itself is not layed out intuitively, with the first section being some settings from the mod, then it goes into the world settings, and then back to some generic mod settings, I'll try and make this move obvious so you know later on where to make some changes to add another plot world to your server if desired.
Plots Squared settings.yml
Generating the plot world.
Now that our settings file is configured we can start the server back up and connect to the game to make our new world. For the Multiverse command we need to be sure that the name we set in the settings file for the world matches exactly to the world name we use in the command, this means capitalization is important as TheWorld and theworld are two different worlds to PlotSquared and Multiverse. Here's the command you can use to create the plot world we've setup.
"/mv create plotworld NORMAL -g PlotSquared"
Once its finished creating the world, teleport to it and see if it looks correct, with roads and square plots. We now need to check that Plot Squared is working for this world by going into a plot area, and typing the following command.
"/plots info"
We should get information back saying that the plot has not been claimed. If you get a message saying "this is not a plotworld" then you'll need to make sure the settings file world name and the world we just created match up correctly.
"/mv create plotworld NORMAL -g PlotSquared"
Once its finished creating the world, teleport to it and see if it looks correct, with roads and square plots. We now need to check that Plot Squared is working for this world by going into a plot area, and typing the following command.
"/plots info"
We should get information back saying that the plot has not been claimed. If you get a message saying "this is not a plotworld" then you'll need to make sure the settings file world name and the world we just created match up correctly.
Claiming plots, setting plot permissions and flags
The last part of configuring the Plot Squared mod is how to claim and clear plots, and how to setup the permissions for normal players so they can claim plots and setting a limit to the number of plots they can claim.
Here are the basic commands for claiming that are important to know.
"/plots claim" - Claims the plot the player is standing in for the price set if economy is enabled.
"/plots setowner (player)" - Changes the owner of the plot to a new player, I used this for groups if the owner left after a session.
"/plots sethome" - Sets the players home plot to the current one they are standing in.
Once players have a plot they can build in it, keep chest in it, and no one else besides OP players can do anything besides come and visit. This did have the side affect of other players standing in the way of some people who were building. Luckily there is a way to deny a player access to a plot with the following command.
"/plots deny (player)" - The player that is given to this command will not be able to enter the plot the player who types the command is standing in.
"/plots undeny (player)" - This will remove the deny effect from the player, the player typing the command must be in the plot they want to undeny the other player from.
Now when you want players to work together, the owner of the plot can issue this command to let the player given in the command the rights to build and use everything in the plot as if they were an owner also, the other player just can't trust others or remove the trust from others, only the owner can do that.
"/plots trust (player)" - Lets a player build and use items in the plot.
"/plots untrust (player)" - Removes a trust effect from the player.
The final command that controls a great deal of permissions, and is way to detailed to go into is dealing with Flags. Both WorldGuard Regions and Plots have permission flags, these are generally very specific types of permissions that you either enable or disable. I wouldn't let the players set these themselves, but ask the teacher for them if needed. The command to see all available flags is:
"/plots help protection" - Will show lots of info on the /plots flag command.
The main flag I needed to set for the students so others could come and try out their creations was the following:
"plots flag add vehicle-use true" - allows players to use minecarts and boats in a plot, necessary when players make roller coasters and others want to try it out.
Here are the basic commands for claiming that are important to know.
"/plots claim" - Claims the plot the player is standing in for the price set if economy is enabled.
"/plots setowner (player)" - Changes the owner of the plot to a new player, I used this for groups if the owner left after a session.
"/plots sethome" - Sets the players home plot to the current one they are standing in.
Once players have a plot they can build in it, keep chest in it, and no one else besides OP players can do anything besides come and visit. This did have the side affect of other players standing in the way of some people who were building. Luckily there is a way to deny a player access to a plot with the following command.
"/plots deny (player)" - The player that is given to this command will not be able to enter the plot the player who types the command is standing in.
"/plots undeny (player)" - This will remove the deny effect from the player, the player typing the command must be in the plot they want to undeny the other player from.
Now when you want players to work together, the owner of the plot can issue this command to let the player given in the command the rights to build and use everything in the plot as if they were an owner also, the other player just can't trust others or remove the trust from others, only the owner can do that.
"/plots trust (player)" - Lets a player build and use items in the plot.
"/plots untrust (player)" - Removes a trust effect from the player.
The final command that controls a great deal of permissions, and is way to detailed to go into is dealing with Flags. Both WorldGuard Regions and Plots have permission flags, these are generally very specific types of permissions that you either enable or disable. I wouldn't let the players set these themselves, but ask the teacher for them if needed. The command to see all available flags is:
"/plots help protection" - Will show lots of info on the /plots flag command.
The main flag I needed to set for the students so others could come and try out their creations was the following:
"plots flag add vehicle-use true" - allows players to use minecarts and boats in a plot, necessary when players make roller coasters and others want to try it out.
One quick change you need to make to prevent spawn protection being a problem in your worlds and blocking players from building or destroying things. Open up the "server.properties" file in your Minecraft folder and the very top setting is going to say "spawn-protection=16" and we need to change the sixteen to zero, save the file, and then restart the server. You'll notice in the Video I had an issue when a player claimed a plot but couldn't work on half of it, due to the spawn protection.
Setup Plots in PermissionsEX
The last thing to cover is that certain permissions need to be added to PermissionsEX so that the players can do things, by default no players with out specific permission can do anything with plots. So here are the commands you'll want to use to make sure your default group lets them, if you have other groups you place them into in PEX, you'll need to adjust the commands accordingly.
"/pex group BaseGroup add plots.claim"
"/pex group BaseGroup add plots.home"
"/pex group BaseGroup add plots.info"
"/pex group BaseGroup add plots.clear"
"/pex group BaseGroup add plots.deny"
"/pex group BaseGroup add plots.undeny"
"/pex group BaseGroup add plots.trust"
"/pex group BaseGroup add plots.untrust"
"/pex group BaseGroup add plots.visit"
"/pex group BaseGroup add plots.set.home"
"/pex group BaseGroup add plots.plot.1" -This command limits them to 1 plot, you can set it to any number or remove it for unlimited plots.
After running those commands your players should be able to do most everything they need themselves. I've added them below in the code window for easy copy and pasting into your server console (not in game).
"/pex group BaseGroup add plots.claim"
"/pex group BaseGroup add plots.home"
"/pex group BaseGroup add plots.info"
"/pex group BaseGroup add plots.clear"
"/pex group BaseGroup add plots.deny"
"/pex group BaseGroup add plots.undeny"
"/pex group BaseGroup add plots.trust"
"/pex group BaseGroup add plots.untrust"
"/pex group BaseGroup add plots.visit"
"/pex group BaseGroup add plots.set.home"
"/pex group BaseGroup add plots.plot.1" -This command limits them to 1 plot, you can set it to any number or remove it for unlimited plots.
After running those commands your players should be able to do most everything they need themselves. I've added them below in the code window for easy copy and pasting into your server console (not in game).
Pex commands to set default access for players to Plots.