Denizen Script Commands


Commands are always written with a '-' before them, and are the core component of any script, the primary way to cause things to happen.
Learn about how commands work in The Beginner's Guide.


Showing 1 out of 183 commands...
NameWebServer
Syntaxwebserver [start/stop] (port:<#>) (ignore_errors)
Short DescriptionCreates a local HTTP web-server within your minecraft server.
Full DescriptionCreates a local HTTP web-server within your minecraft server.

The server does not provide SSL (HTTPS) security or functionality.
The server does not provide active abuse-prevention or routing control or etc.

If your webserver is meant for public connection, it is very strongly recommended you put the webserver behind a reverse-proxy server, such as Nginx or Apache2.

The port, if unspecified, defaults to 8080. You should usually manually specify a port.

The "ignore_errors" option can be enabled to silence basic connection errors that might otherwise spam your console logs.

You can only exactly one webserver per port.
If you use multiple ports, you can thus have multiple webservers.

When using the stop instruction, you must specify the same port you used when starting.

The webserver only does anything if you properly handle Event:webserver web request

Most webserver processing is done in the event, and thus is synchronous with the minecraft thread, and thus may induce lag if not done with care.
Note per the event's meta, "file:" is handled async, and "cached_file:" only runs sync once per file.

This command must be enabled in the Denizen/config.yml before it can be used.
Related TagsNone
Usage Example
#Use to start a webserver on port 8081.
- webserver start port:8081
Usage Example
#Use to stop the webserver on port 8081.
- webserver stop port:8081
Groupcore
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/scripts/commands/core/WebServerCommand.java#L29