Plugin Description
#21
I don't have permission to push to your repo, can you add me as a contributor? It should be somewhere in the repo settings.
Reply
Thanks given by:
#22
Done (I hope)
Reply
Thanks given by:
#23
Thanks. I promise to fork next time, I just started working and only then realized that I cannot push, and it was too late to move to a different repo Smile
I've pushed the basics into the InfoDump branch, have a look at the butchering, if you want. The dumping doesn't work yet, but command registering (through InfoReg.lua) does.
I haven't looked properly yet, but it seems that the "/schematic" command is a multicommand (requires a second verb to actually determine what to do)? If so, consider documenting even the subcommands (see the Gallery plugin's Info.lua for how it's done there); later on I'll add a generic handler for multicommands to the InfoReg file, so that we don't have to actually write a separate handler for each multicommand.
Reply
Thanks given by: NiLSPACE
#24
The "/we" also is a multicommand Wink
The Gallery plugin uses a handler even for the subcommands. The "/schematic" doesn't have that. Should I split it in order for it to work?
Reply
Thanks given by:
#25
Not yet, I might be changing the info file for the dumper so let's avoid conflicts for now. And I think we've gone too far from the original topic of this post, how about we move this discussion to the WE's forum post?
Reply
Thanks given by:
#26
Really like the fast work that's being done to this!
More so as normally people around time this are busy.
Reply
Thanks given by:
#27
I've got this documentation generated for the Gallery plugin, what do you think of it, is it what you're looking for?


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.

The following list contains all currently implemented permissions, with their recommended level and the effect they have:
  • gallery.admin.* - Admin-level permissions, see each individual permission below for details. Recommended level: admins
  • gallery.admin.buildanywhere - Build in other people's areas and the public sidewalks. Recommended level: admins, mods
  • gallery.admin.buildanywhere.<GalleryName> - Build in other people's areas and the public sidewalks in the specific gallery. Recommended level: local admins, local mods
  • gallery.admin.goto - Teleport to any player's area. Recommended level: VIPs
  • gallery.admin.info - View information on any area. Recommended level: VIPs
  • gallery.admin.my - View list of areas for other players, using the "/gallery my @playername [<galleryname>]" form. Recommended level: VIPs
  • gallery.admin.name - Rename any area for any player. Recommended level: admins, mods
  • gallery.admin.template - Create a .schematic file out of an in-game cuboid. Recommended level: admins
  • gallery.claim - Claim an area in any gallery. Recommended level: normal users
  • gallery.goto - Teleport to an area owned by self. Recommended level: normal users
  • gallery.help - Display help for subcommands. Recommended level: everyone
  • gallery.info - View information on an area owned by self. Recommended level: normal users
  • gallery.list - List available gallery. Recommended level: normal users
  • gallery.my - List all my owned areas. Recommended level: normal users
  • gallery.name - Rename an area owned by self. Recommended level: normal users

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 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 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 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 template - creates new .schematic template based on your selection
    Permission required: gallery.admin.template
    The following parameter combinations are recognized:
    /gallery template FileName - Let's you select an arbitrary square area, then saves its contents into a file, FileName.schematic
Reply
Thanks given by:
#28
Wait, all this information is generated, below the line ?
Then yes! this tells me everything i need to know!

I doubt it gets all this info from a .lua file, so what does the info file look like ?
Reply
Thanks given by:
#29
This is the info.lua for WorldEdit: https://github.com/mc-server/WorldEdit/b...p/Info.lua

And this is the info.lua for the Gallery plugin: https://github.com/madmaxoft/Gallery/blo...r/Info.lua
Reply
Thanks given by:
#30
This is amazing, if all plugins would be using this that would be great,
If i wanted to know something i can just open up the info.lua and read what it does version etc, even lastupdated i asume date stands for!

Happy as i can beBig Grin
Reply
Thanks given by:




Users browsing this thread: 7 Guest(s)