satoshinm / WebSandboxMC

Bukkit plugin providing a web-based interface with an interactive WebGL 3D preview or glimpse of your server 🕷⏳📦 ⛺
https://www.spigotmc.org/resources/websandboxmc.39415/
MIT License
19 stars 5 forks source link
bukkit bukkit-plugin emscripten webgl

WebSandboxMC

Bukkit plugin providing a web-based interface with an interactive WebGL 3D preview or glimpse of your server

Screenshot

Downloads: WebSandboxMC at Spigot Resources, or GitHub releases

CircleCI

Features

Currently supports:

TODO: missing features

Compilation

    cp ../NetCraft/release-build-js/craft.* src/main/resources/`
    cp ../NetCraft/wasm-build/craftw.* src/main/resources/`
    perl -pe 's(\Q{{{ SCRIPT }}}\E)("<script>".`cat ../NetCraft/src/load.js`."</script>")e' -i src/main/resources/craft.html

Usage

  1. Copy target/WebSandboxMC.jar to the plugins folder of your Bukkit-compatible server (see below)
  2. Visit http://localhost:4081/ in a modern browser (requires WebGL, Pointer Lock, WebSockets)
  3. Play the game

Configuration

After an initial run, plugins/WebSandboxMC/config.yml should be populated with configuration defaults. The settings are as follows:

http

Configures the HTTP and WebSocket server:

mc

Configures what part of your world to expose:

nc

Configures the NetCraft web client:

Newer versions of NetCraft can be installed without upgrading the plugin, or the main page customized, by placing the saving files in the plugin's data directory: craft.html (main page), craft.js, craft.html.mem. If not given, WebSandboxMC's embedded version of NetCraft will be served up instead.

If the plugin folder contains a file named textures.zip, then it will be sent as a custom texture pack to the client. This archive must contain a terrain.png with a texture atlas. For details on texture pack compatibility, see NetCraft#textures.

Commands

All commands except help and auth require op, or a websandbox.command.<command> permission node.

Compatibility

WebSandboxMC uses the Bukkit API from Spigot with the aim of maximizing server compatibility. Known compatible server software:

WebSandboxMC 2.x is compatible with 1.17 (and possibly newer) down to 1.14 API version.

WebSandboxMC 1.x is compatible down to 1.7, but will use "legacy materials" on API versions newer than 1.12.

License

MIT