Difference between revisions of "Server"
|Line 42:||Line 42:|
Revision as of 16:33, 15 February 2018
The Server block is a block which can be used to host small web pages. These pages will then be publicly available to other players through special URLs. This functionality can be disabled by setting the "miniservPort" value to 0 in the WebDisplays configuration file. The storage quota can also be changed through the configuration file.
Even though the server is not a peripheral, its recipe uses a Peripheral Base as an ingredient.
How to use
Player pages uploaded with server blocks can be accessed through special URLs that look like this:
wd://player-uuid/page.ext. Since they are quite long (because of the player UUID), they can be obtained with the "url" command of the server block.
The server block works a little bit like the Ender Chest. It is useless for a player to place several server blocks as they will all have the same content. Destroying every server blocks placed by a player will not delete the uploaded pages. However, unlike the Ender Chest, each server block is linked to a player, and only the player who placed the block can upload files. Other players, on the other hand, are able to use some commands to list the files uploaded by the owner, get their URLs etc...
With the server block, everything is done through commands. Most of them do not require any arguments, so simply write the name of the command and hit enter. Here's a list of the most important commands:
Lists the file uploaded by the server block owner.
Argument: the file name
Displays the name and the UUID of the owner of this server block.
This is a debug command. Internally, files are not transferred using the Minecraft packet system, but rather using a custom system named "Miniserv". Thus, it is possible to loose the connection to Miniserv without loosing the connection to the Minecraft server. If this happens, most of the commands listed here will fail. You can then use this command to try to reconnect to the Miniserv server.
Only the server block owner can do that. It will display how much space your files are using on the server. This space is of course limited. By default, every player has 1 MiO, but this can be configured in the WebDisplays configuration file.
Argument: the name of the file you want to delete
Only the server block owner can do that. Deletes an uploaded file. Double-check what you're doing because this is permanent and there is no confirmation.
Optional argument: the directory to start from, or the path to a file you want to upload
Only the server block owner can do that. This command will open the upload wizard. This is just a crude file browser. Select a file with the up/down arrow keys, and hit enter to either enter a directory or upload a file. You can also type the beginning of a file name to find it, just like you'd do with the Windows file explorer. The F5 key will also reload the contents of the current directory. Pressing the Escape key will not close the GUI but will leave the upload wizard.
The files uploaded by the players are located in the wd_filehost directory inside the world save. If you want to host files "manually", create a directory called "00000000-0000-0000-0000-000000000000" and put your files in it. They should be available at "wd://0-0-0-0-0/myfile.ext".