Gallery
#1
This plugin allows users to automatically claim areas from a predefined "pool" of areas (galleries). Each such area is then protected so that only the area owner can interact with the area.

Setting up: galleries
Before the plugin can be fully used, the server admin needs to set up the galleries - define the galleries where players are allowed to claim areas. Some other configuration options are available, too. The configuration is read from the Galleries.cfg file located in the same folder as the MCServer executable. If the file doesn't exist, the plugin outputs a message in the server console and stays inactive. The plugin also creates an example configuration file named Galleries.example.cfg located next to the MCServer executable. This file contains an example configuration with documentation on all of the used variables. You might want to consult that file while continuing to read this description.

The config file contains settings that are formatted as Lua code. No worries, the code is very easy to understand and modify. There are two sections, Galleries and Config. The Config section allows the admin to change the configuration for the entire plugin, such as the command prefix that the plugin uses, or the database engine to use. The Galleries section contains the definitions for all the galleries.

Each gallery needs to be enclosed in an extra pair of braces. It needs to contain the following values in order to become functional: Name, WorldName, MinX, MinZ, MaxX, MaxZ, FillStrategy and either AreaTemplate or AreaSizeX and AreaSizeZ. There is an optional AreaEdge parameter, too. Note that the plugin will tell you if it detects any problems in the gallery definition.

The Name parameter identifies the gallery. It needs to be unique for each gallery. Note that it cannot contain "funny symbols", stay safe and use only letters, numbers and underscores. Also note that this is the name that the users will type in their "claim" command. Good names are short and descriptive.

The WorldName parameter specifies the world in which the gallery resides. The MinX, MinZ, MaxX anx MaxZ parameters specify the position and dimensions of the gallery in that world. Note that it is a good idea to make the dimensions perfectly divisible by the size of the area, otherwise the gallery will contain empty space where no-one except the server admins will be allowed to build.

The FillStrategy parameter specifies the order in which the areas are claimed within the gallery. The value is a string containing the letters x, z and symbols + and -. The x and z specify the axis and + or - specify the direction on that axis, so "x+" means "along the x axis towards the positive numbers", while "z-" means "along the z axis towards the negative numbers". Two such directions, one for each axis, are joined together to make up the FillStrategy. The first direction is used first, once the areas reach the end of that direction, it is reset back and the second direction is applied. For example, setting the FillStrategy to "z-x+" means that the first area will start at [MinX, MaxZ], the next area claimed will be at [MinX, MaxZ - AreaSizeZ], the third area at [MinX, MaxZ - 2 * AreaSizeZ] etc.; once the Z coord reaches MinZ, the next area will be at [MinX + AreaSizeX, MaxZ].

Areas can be either left as the world generator generates them, or the plugin can fill them with a predefined "image" loaded from a .schematic file. To leave the world as it was generated, fill in the AreaSizeX and AreaSizeZ values. These indicate how large each area will be. On the other hand, if the AreaTemplate parameter is specified, the image is loaded from the given file and its size is used for AreaSizeX and AreaSizeZ (so there's no need to specify those when using AreaTemplate), and the image is pasted onto the area when it is claimed.

The AreaEdge parameter allows you to specify that each area should have an "edge" where even its owner cannot build. This is useful for templates that include paths along the template's border. The value represents the number of blocks from each of the area's boundaries that are unbuildable.

The Config section can contain the value CommandPrefix. Other values, such as for specifying the DB storage engine, are planned but not yet implemented.

The CommandPrefix specifies the common part of the in-game commands that the users and admins use with this plugin. If not specified, the plugin uses "/gallery" as its value; this would make it register the commands "/gallery claim", "/gallery info", "/gallery my" etc. Changing the value to "/gal", for example, would make the plugin register "/gal claim", "/gal info", "/gal my" and so on.

Setting up: permissions
Caution! Pay attention when setting up permissions, since giving someone the wrong permissions could allow them to wreck entire galleries for everyone.

The permissions system specifies which users are allowed to interact with what level of the gallery plugin. There are basically four levels, each comprising a group of commands that can be used. The first level is "normal users". Users with this level of access can claim areas and build stuff in their owned areas. This is the level where you want most of your users. Second level is "restricted users", these don't have any permissions and thus cannot interact with the Gallery plugin at all, thus they cannot claim areas. Consider this level a "punishment" level. The third level is "VIPs", player with these permissions can view information about other players' areas, can list and teleport to other players' areas by their name. The highest level, "admins", can rename anyone's areas, build and destroy anywhere, transfer or remove area ownership and reset anyone's area.

Note that most admin-level permissions need their non-admin-level permissions in order to work. If you give someone "gallery.admin.goto" but not "gallery.goto", they will not be able to use the goto command at all.

Commands

General
  • /gallery allow - allows a friend to build at your area
    Permission required: gallery.allow
    The following parameter combinations are recognized:
    /gallery allow FriendName - allows the specified friend to build at your area where you're standing now

    /gallery claim - claims a new area
    Permission required: gallery.claim
    The following parameter combinations are recognized:
    /gallery claim GalleryName - claims a new area in the specified gallery. The gallery must be in the current world.

    /gallery deny - denies a friend the build permissions for your area
    Permission required: gallery.deny
    The following parameter combinations are recognized:
    /gallery deny FormerFriendName - denies the specified friend the build permission to your area where you're standing now

    /gallery fork - copy-and-claims an area
    Permission required: gallery.fork
    The following parameter combinations are recognized:
    /gallery fork - claims a new area and fills it with a copy of the area you're now standing in

    /gallery goto - teleports you to specified gallery area
    Permission required: gallery.goto
    The following parameter combinations are recognized:
    /gallery goto AreaName - teleports you to the specified area
    /gallery goto @PlayerName AreaName - teleports you to the specified area owned by the player (Requires permission 'gallery.admin.goto')

    /gallery help - prints detailed help for the subcommand
    Permission required: gallery.help
    The following parameter combinations are recognized:
    /gallery help - displays list of subcommands with basic help for each
    /gallery help Subcommand - displays detailed help for the subcommand, including all the parameter combinations

    /gallery info - prints information on the area you're currently standing at
    Permission required: gallery.info

    /gallery list - lists all available galleries
    Permission required: gallery.list

    /gallery lockarea - locks an area so that even the owner can't build there
    Permission required: gallery.admin.lockarea

    /gallery my - lists all your areas
    Permission required: gallery.my
    The following parameter combinations are recognized:
    /gallery my - lists all your owned areas in this world
    /gallery my GalleryName - lists all your owned areas in the specified gallery
    /gallery my @PlayerName - lists all areas owned by the player in this world. (Requires permission 'gallery.admin.my')
    /gallery my @PlayerName GalleryName - lists all areas owned by the player in the specified gallery (Requires permission 'gallery.admin.my')

    /gallery name - renames the area you're currently standing at
    Permission required: gallery.name
    The following parameter combinations are recognized:
    /gallery name NewName - renames your area you're currently standing in
    /gallery name OldName NewName - renames your area OldName to NewName
    /gallery name NewName - renames the area you're currently standing in (regardless of ownership) (Requires permission 'gallery.admin.name')
    /gallery name @PlayerName OldName NewName - renames Player's area from OldName to NewName (Requires permission 'gallery.admin.name')

    /gallery remove - removes the area you're standing on from its owner
    Permission required: gallery.admin.remove

    /gallery reset - resets the area you're standing on to its original state
    Permission required: gallery.reset
    The following parameter combinations are recognized:
    /gallery reset - If you are the owner of the area, resets it to its original state (Requires permission 'gallery.reset')
    /gallery reset - Resets the area you're standing on it to its original state, regardless of the ownership (Requires permission 'gallery.admin.reset')

    /gallery select - selects the entire area you're standing in.
    Permission required: gallery.select

    /gallery stats - shows statistics about the galleries on this server
    Permission required: gallery.stats

    /gallery template - creates new .schematic template based on your selection
    Permission required: gallery.admin.template
    The following parameter combinations are recognized:
    /gallery template FileName - Lets you select an arbitrary square area, then saves its contents into a file, FileName.schematic

    /gallery unclaim - removes your claim on the area you're standing in
    Permission required: gallery.unclaim

    /gallery unlockarea - unlocks a previously locked area
    Permission required: gallery.admin.unlockarea

    /gallery visit - teleports you to the specified gallery
    Permission required: gallery.visit
    The following parameter combinations are recognized:
    /gallery visit GalleryName - Teleports you to the latest area of the specified gallery
    /gallery visit GalleryName AreaIndex - Teleports you to the specified area of the specified gallery


Permissions
  • - gallery.admin.buildanywhere - Build in other people's areas and the public sidewalks.
    • Recommended groups: admins, mods
    - gallery.admin.buildanywhere.<GalleryName> - Build in other people's areas and the public sidewalks in the specific gallery.
    • Recommended groups: local admins, local mods
    - gallery.admin.goto - Teleport to any player's area.
    • Commands affected:
      - /gallery goto @PlayerName AreaName
    • Recommended groups: VIPs
    - gallery.admin.info - View information on any area.
    • Commands affected:
      - /gallery info
    • Recommended groups: VIPs
    - gallery.admin.lockarea - Lock an area so that not even the owner can build in there.
    • Commands affected:
      - /gallery lockarea
    • Recommended groups: admins
    - gallery.admin.my - View list of areas for other players, using the "/gallery my @playername [<galleryname>]" form.
    • Commands affected:
      - /gallery my @PlayerName
      - /gallery my @PlayerName GalleryName
    • Recommended groups: VIPs
    - gallery.admin.name - Rename any area for any player.
    • Commands affected:
      - /gallery name NewName
      - /gallery name @PlayerName OldName NewName
    • Recommended groups: admins, mods
    - gallery.admin.overridelocked - Allows a player to build in areas that have been locked. The player still needs to have access to the area - either ownership or by allowance.
    • Recommended groups: admins
    - gallery.admin.remove -
    • Commands affected:
      - /gallery remove
    - gallery.admin.template - Create a .schematic file out of an in-game cuboid.
    • Commands affected:
      - /gallery template
    • Recommended groups: admins
    - gallery.admin.unlockarea - Unlock a previously locked area. See also "gallery.admin.lock."
    • Commands affected:
      - /gallery unlockarea
    • Recommended groups: admins
    - gallery.admin.worldedit - Allows the use of worldedit anywhere in the gallery.
    • Recommended groups: admins
    - gallery.allow - Allow another player to build in your area.
    • Commands affected:
      - /gallery allow
    • Recommended groups: normal users
    - gallery.claim - Claim an area in any gallery.
    • Commands affected:
      - /gallery claim
    • Recommended groups: normal users
    - gallery.deny - Deny another player to build in your area.
    • Commands affected:
      - /gallery deny
    • Recommended groups: normal users
    - gallery.fork -
    • Commands affected:
      - /gallery fork
    - gallery.goto - Teleport to any player's area.
    • Commands affected:
      - /gallery goto @PlayerName AreaName
    • Recommended groups: VIPs
    - gallery.help - Display help for subcommands.
    • Commands affected:
      - /gallery help
    • Recommended groups: everyone
    - gallery.info - View information on an area owned by self.
    • Commands affected:
      - /gallery info
    • Recommended groups: normal users
    - gallery.list - List available gallery.
    • Commands affected:
      - /gallery list
    • Recommended groups: normal users
    - gallery.my - View list of areas for other players, using the "/gallery my @playername [<galleryname>]" form.
    • Commands affected:
      - /gallery my @PlayerName
      - /gallery my @PlayerName GalleryName
    • Recommended groups: VIPs
    - gallery.name - Rename any area for any player.
    • Commands affected:
      - /gallery name NewName
      - /gallery name @PlayerName OldName NewName
    • Recommended groups: admins, mods
    - gallery.reset -
    • Commands affected:
      - /gallery reset
    - gallery.select -
    • Commands affected:
      - /gallery select
    - gallery.stats -
    • Commands affected:
      - /gallery stats
    - gallery.unclaim -
    • Commands affected:
      - /gallery unclaim
    - gallery.visit - Teleport to any gallery.
    • Commands affected:
      - /gallery visit
    • Recommended groups: normal users
    - gallery.worldedit - Allows the use of WorldEdit within each individual area.
    • Recommended groups: normal users

Download: https://github.com/cuberite/Gallery
Reply
Thanks given by: Taugeshtu , NiLSPACE , Antonio , tonibm19 , Kozchu
#2
What about the structures server ?Tongue
Reply
Thanks given by:
#3
How did you init the handlers in the Info.lua? I'm now working on another plugin but I have to use dofile(PLUGIN:GetLocalFolder() .. "/Info.lua") first and then use the RegisterPluginInfoCommands() function.
Reply
Thanks given by:
#4
I'm thinking about it now. There are multiple options:
- I could run it at home, probably on my RasPi. I've got some 1/2 MBit/s upload, that should be more than enough to handle a few players.
- I could run it on my webhosting VPS, xoft.cz. I'd need to pay a bit more money for a public IPv4 address, though, and check with the company providing the webhosting that it'd actually work. I like this option the most because the world could be made available to the public easily through the web.
- I have a friend who runs several vanilla and bukkit servers, he once offered to host a MCServer server (he's the same guy who promised to ask his server's players to help us with the structures).
- or we can host the server on someone's host1free VPS. I don't like using a free service for that, though, because they could decide at any time to shut us down without us ever seeing our data again.

Also I'd like to have access to the server, so that I can update the plugins and manipulate the server; it's unlikely that anyone would give me such access for prolonged periods of time if it was a server they owned and had other stuff going on there.

Last but not least, the Gallery plugin is still not mature enough to be put into real-world use. I'd like to see a few features implemented before that - mainly protection against malicious players. There needs to be a limit to how many areas (per day / total) a player can claim. I'd like to have the area forking working, too. And admins should be able to remove areas that have been claimed by malicious players, such as people building nonsense or even offensive stuff.

(01-12-2014, 12:59 AM)STR_Warrior Wrote: How did you init the handlers in the Info.lua? I'm now working on another plugin but I have to use dofile(PLUGIN:GetLocalFolder() .. "/Info.lua") first and then use the RegisterPluginInfoCommands() function.

I'm doing the registration in the Initialize() function; so that I know that all the Lua files inside the plugin folder have already been loaded and the globals are available.
Reply
Thanks given by:
#5
I can run it for free on my VPS (not a free one). (Also, you don't need another IPv4 on your VPS, why would you?)
Reply
Thanks given by:
#6
(01-12-2014, 01:14 AM)STR_Warrior Wrote: Should I put this in the Plugin Description thread?

Please do, and include a link to full code. Maybe there is something that I missed with the Info.lua file.

(01-12-2014, 01:33 AM)bearbin Wrote: I can run it for free on my VPS (not a free one). (Also, you don't need another IPv4 on your VPS, why would you?)

That's the problem - it's *your* VPS, will you give me permanent SSH access to it?

I need a public IPv4 address, currently the VPS has only a private one, NATed. It seems to have a public IPv6, though.
Reply
Thanks given by:
#7
Actually I cant run it on my free host1free vps because I host a private server but maybe one could claim one.
I'm not anyone to propose other's server, but maybe we could, if tigerw agrees of course, host it on his free vps, that it's a public MCS server already.
Reply
Thanks given by:
#8
(01-12-2014, 01:36 AM)xoft Wrote:
(01-12-2014, 01:33 AM)bearbin Wrote: I can run it for free on my VPS (not a free one). (Also, you don't need another IPv4 on your VPS, why would you?)

That's the problem - it's *your* VPS, will you give me permanent SSH access to it?

I need a public IPv4 address, currently the VPS has only a private one, NATed. It seems to have a public IPv6, though.

I guess I could.
Reply
Thanks given by:
#9
I have just ordered a faster internet connection to home, will have 12 MBit/s upload, then we can definitely use my RasPi as the server Smile
I also sent an inquiry to the webhosting company, asking them about the IPv4 address, if that would work. I still consider that the best scenario, if it works out.
Reply
Thanks given by:
#10
12mbs upload? :0
In my village we have 1mbs of upload.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)