Skip to main content

Temporary Dimension

Private instanced worlds cloned from Slime templates on entry and deleted when empty.

Privatev0.0.2World & building
RequiresTypeWriter0.9.0-beta-177 (BTC build)BTC CoreAdvancedSlimePaper

Built for the BornToCraft network. This extension is documented for reference and is not distributed.

Overview​

Temporary Dimension sends a player into a fresh copy of a template world. The copy is created from an Advanced SlimeWorld template when the player enters, lives only in memory and is unloaded as soon as the player has left, so every visit starts from the template. It is made for dungeons, tutorials, private rooms and cutscene sets that must not be shared or kept.

You describe a dimension once with a Temporary Dimension Definition entry: the template worlds (one is chosen at random), the area where players appear, the permission to enter, blocked commands and what to trigger on entry and exit. Players enter it through a command, a TypeWriter action, or an admin command, and return to the exact place they left.

It runs on the BTC build of TypeWriter and BTC Core (Paper/Folia) and also supports AdvancedSlimePaper servers. Creation, spawn search and teleportation are asynchronous and Folia-safe.

Features​

  • Instanced worlds — each entry creates a new world named tempdim_<uuid> from a template, and deletes it when empty.
  • Several templates — list more than one template world and one is picked at random.
  • Safe random spawn — random points in a box, then a search around its centre, accepting only air above a solid, non-dangerous block.
  • Spawn block whitelist — restrict spawning to chosen block types.
  • Command blacklist — block commands (and their plugin: forms) while inside.
  • Return to origin — the player goes back to the location, rotation and world they left.
  • Entry and exit triggers — run any TypeWriter entries and send MiniMessage messages on entry and exit.
  • Per-dimension permission — a permission per dimension, checked by the command and optionally by the action.
  • Facts and placeholders — know whether a player is in a dimension, which one, and who else is in it.

Installation​

  1. Run the server on BTC Core, or on AdvancedSlimePaper; the extension looks for either at runtime.
  2. Put the Temporary Dimension JAR in plugins/Typewriter/extensions/ and restart the server.
  3. Prepare your template worlds as Slime worlds:
    • On BTC Core, put them where the file Slime loader reads worlds (slime_worlds in the server folder by default).
    • On AdvancedSlimePaper, the template must be a loaded Slime world with the exact template name; it is copied from memory.
  4. Give players the permission you will set on the dimension.

Getting started​

Create a dungeon that players can enter with /typewriter tempdim dungeon1.

  1. Build your dungeon as a Slime world named dungeon1_template and put it where your server expects templates (see above).
  2. In the TypeWriter web panel, open a static page and add a Temporary Dimension Definition entry.
  3. Set commandName to dungeon1, permission to dimension.dungeon1, and add dungeon1_template to templateWorlds.
  4. Set spawnZone to two opposite corners (x1, y1, z1 and x2, y2, z2) around the entrance. Use block coordinates of the template world.
  5. Optionally fill blacklistedCommands (for example home, spawn, tpa) and link triggers in onEnter and onExit.
  6. Publish, give a test player the permission and run /typewriter tempdim dungeon1.

To enter from a quest or an NPC instead, use Enter Temporary Dimension and, to leave, Leave Temporary Dimension.

Command aliases

The dimension command is a sub-command of /typewriter tempdim; the extension does not register a top-level command. A short command such as /dungeon1 can be exposed with a TypeWriter custom_command entry on your page, which keeps command registration reload-safe.

How it works​

A player can be in only one temporary dimension at a time. If the creation fails (no template, template not found, no safe spawn within 10 seconds, teleport failure), the player stays where they are, receives an error message and the half-built world is removed. If the player disconnects, they are removed from the instance without a teleport and the world is closed when it is empty. Every instance is closed when TypeWriter reloads or stops.

Commands​

All commands live under /typewriter.

CommandDescription
/typewriter tempdim <commandName>Enter the dimension whose commandName matches. Requires the dimension's permission (empty means open to everyone).
/typewriter tempdim enter <dimension>Enter any dimension chosen from the entry list, ignoring its permission. Requires typewriter.temporarydimension.admin.
/typewriter tempdim leaveLeave your current dimension and go back to your origin. No permission needed.
/typewriter tempdim listList active instances with their player count and world name. Requires typewriter.temporarydimension.admin.

commandName accepts letters, digits, _, - and : only, and cannot be enter, leave or list. Commands are built when the entries load, so publish after changing it.

Permissions​

PermissionGrants
typewriter.temporarydimension.admin/typewriter tempdim enter and /typewriter tempdim list.
the permission field of a definition/typewriter tempdim <commandName> and, if checkPermission is on, the enter action.

Placeholders​

MiniPlaceholders expansion tempdim, usable as MiniMessage tags. They return an empty value or 0/false when the player is not in a dimension.

PlaceholderReturns
<tempdim_in_dimension>true or false.
<tempdim_in_dimension_bool>1 or 0, for numeric comparisons.
<tempdim_current>Name of the entry of the current dimension.
<tempdim_current_id>Entry id of the current dimension.
<tempdim_current_world>World name of the instance (tempdim_...).
<tempdim_players>Number of players in the instance.
<tempdim_players_list>Names of the players in the instance, separated by commas.

In the messages of a definition, <dimension> is replaced by the entry name, and <command> in the blocked-command message by the blocked command.

Entries​

5 entries, generated from the extension source.

Actions2
Facts2
Manifests1

Troubleshooting​

Unable to prepare the temporary dimension. The template could not be cloned. Check the template name in templateWorlds against the Slime world name, that the world is in slime_worlds (BTC Core) or loaded (AdvancedSlimePaper), and read the warning in the log for the cause. On servers that are neither BTC Core nor AdvancedSlimePaper the log says unsupported server platform for SlimeWorld.

Nothing happens and the log says no template configured. templateWorlds is empty or only contains blank names.

No safe spawn was found in the temporary dimension. None of the tested points had two free blocks of air above a solid block that is not lava, fire, cactus or magma. Enlarge the spawnZone, make sure it covers solid ground of the template (Y included), and check that spawnBlockWhitelist contains the block of the floor.

You are already in a temporary dimension. A player can only be in one instance. Use the leave command or action first.

A command still works inside the dimension. Write the command name without the slash in blacklistedCommands. Matching is on the first word, case-insensitive, and also blocks name:command forms, but not aliases registered under another name.

The dimension command does not exist after editing. Dimension commands are generated from the entries: publish the page, and check that commandName only uses allowed characters and does not clash with another dimension.