Difference between revisions of "Server"

From WebDisplays
Jump to: navigation, search
(How to use)
 
(2 intermediate revisions by the same user not shown)
Line 33: Line 33:
 
<strong>Argument:</strong> the name of the file you want to delete
 
<strong>Argument:</strong> the name of the file you want to delete
  
Deletes an uploaded file. Double-check what you're doing because this is permanent and there is no confirmation.
+
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.
  
 
===upload===
 
===upload===
 
Optional argument: the directory to start from, or the path to a file you want to upload
 
Optional argument: the directory to start from, or the path to a file you want to upload
  
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.
+
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.
  
 
===access===
 
===access===
 
RfiQYRn7fBg
 
RfiQYRn7fBg
 +
 +
==Server-global hosting==
 +
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".

Latest revision as of 02:07, 16 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.

Recipe

Server.png

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:

ls

Lists the file uploaded by the server block owner.

url

Argument: the file name

Copies the URL that leads to file passed in parameter. This URL can then pasted in the set-URL GUIs of both Screens and minePads.

owner

Displays the name and the UUID of the owner of this server block.

reconnect

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.

quota

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.

rm

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.

upload

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.

access

RfiQYRn7fBg

Server-global hosting

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".