Gallery - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Plugins (https://forum.cuberite.org/forum-1.html) +--- Forum: Plugin Releases (https://forum.cuberite.org/forum-2.html) +--- Thread: Gallery (/thread-1306.html) |
Gallery - xoft - 01-07-2014 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
Permissions
Download: https://github.com/cuberite/Gallery RE: Gallery - tonibm19 - 01-12-2014 What about the structures server ? RE: Gallery - NiLSPACE - 01-12-2014 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. RE: Gallery - xoft - 01-12-2014 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. RE: Gallery - bearbin - 01-12-2014 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?) RE: Gallery - xoft - 01-12-2014 (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. RE: Gallery - tonibm19 - 01-12-2014 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. RE: Gallery - bearbin - 01-12-2014 (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?) I guess I could. RE: Gallery - xoft - 01-12-2014 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 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. RE: Gallery - tonibm19 - 01-12-2014 12mbs upload? :0 In my village we have 1mbs of upload. |