StickyPiston World Manager
Projects | | Links:
All copyright for the World Manager and associated code remains with StickyPiston Hosting Ltd. This page is just to illustrate that Oliver worked on the system. Everything on this page has been approved for public representation.
Overview
The StickyPiston World Manager is a system that was created to help our server owners better understand and manage the Minecraft worlds that are on their server. This system consists multiple parts that allow for things such as:
- Uploading / Downloading worlds
- Creating / Deleting worlds
- Changing the world on the server
- Editing a world’s settings
- Adding or Changing a world’s server resource pack
- Duplicating a world
- Renaming a world
Each of these functionalities come together within the frontend to form one cohesive tool.
The World Manager moves the contents of the page downwards and is inserted near the top of the page to get the user’s attention and be “above the fold”.
Development
This system is built on top of the customized Multicraft control panel that StickyPiston provides to all of the server owners. Each feature within the World Manager consists of the following:
- A Python script that does the file and API manipulation for the feature to work
- PHP added to the web server to accept an AJAX request with the required information to perform the request.
- Javascript, HTML, and CSS to allow the user to control the system and to make the AJAX request to the backend server.
Specific Feature Overviews / Image Gallery
In this section I’ll briefly describe what each feature is and show the UI interactions for each thing.
These descriptions and video/images are accurate as of 2022/03/01 (when Oliver wrote this). Because this system is in an ever-updating environment, these may become out of date as time continues, but at the time of writing this is what the system looked like that Oliver created.
Uploading a world
Within the system there is a drag and drop interface for uploading a world to your server with no effort required. This system will also uploading multiple worlds at the same time if they are within the same ZIP folder, it checks for any level.dat
files in the archive and then determines the world name from the parent directory within the archive.
Downloading a world
This uploads the world to one of our file sharing services after zipping the world and any additional world folders that are produced from the server (like the world_the_end
and world_nether
from Spigot). This download then stays available for 72 hours for the user to download.
Creating a world
The World Manager enables users to create worlds directly on their server with extra options that normally are only exposed through Minecraft’s creation menu or through the server.properties
. All of these settings are put into a file named world_properties.StickyPiston
which allow them to be restored and saved on a per-world basis instead of on a per-server basis, allowing users to have more control over their server settings.
Renaming a world
This simply changes the folder name of the world, ensuring that the user doesn’t select a name that already exists.
There are dynamic errors that appear as the user is typing if they:
- include a special character (any non-alphanumeric character plus brackets, hyphens, and underscores)
- try to use a name that is already taken by a world.
in both of the above cases the user is prevented from renaming the world.
Deleting a world
Allows a user to permanently delete a world. In order for the user to do this since it cannot be undone, we took inspiration from GitHub and make the user type (or copy/paste) their world name into a confirmation box before they can delete it.
Changing the active world
Changing the active world is what allows the user to swap what world is being used by their server. So if they have a creative mode world and a survival world, they can swap between them with a couple clicks.
Editing a world’s settings
The World Manager also allows users to edit any of the settings of their worlds dynamically, meaning that if the server is currently running it will only
Server resource pack
Each world is allowed it’s own server resource pack, this is updated by the system when a world is activated to allow for the user to have a unique server resource pack with each of their world’s.
Adding a resource pack
Adding a resource pack can be done either through the drag and drop interface interface which utilizes the StickyPiston Resource Pack API that I also made, or by providing a direct link and sha1 hash for the resource pack.
Changing the resource pack
Changing the resource pack for the world can be done the same ways as adding a resource pack.
Removing the resource pack
Removing the world’s resource pack is as easy as clicking the “Remove Resource Pack” button.
Duplicating a world
Duplicating a world is a pretty straightforward feature, it copies everything from the one world into a new world. This includes all chunk data and player data from the world being duplicated. When the world is duplicated, a suffix is added to the end of the world name, this suffix is chosen randomly from a list of predefined suffixes and all have something to do with Minecraft.