Instead of guessing a gate's shape by flood-filling connected frame material, the plugin now matches a fixed ASCII template against the world (gate.template in config.yml), the same idea as the classic Stargate plugin's .gate files. Default is an 11x11 ring with 7 chevrons at their real positions rather than auto-spaced. - New GateTemplate parses the '*'/'1'/'2'/'0' grid. - New GateTemplateScanner tries every plausible alignment of a punched block against a frame/chevron cell, then verifies the rest of the template matches; no more flood-fill leak/enclosure diagnostics needed since the shape is exact. - The player's look direction at punch time (snapped to N/S/E/W) decides whether template columns run along world X or Z; this facing is now stored in Gate.facing (repurposing the old sign-attachment field) so restarts can re-scan deterministically. - Exit-teleport yaw now comes from that stored facing instead of a geometric guess. - Removed gate.chevron-count/max-frame-blocks/max-iris-blocks/ min-frame-blocks - the template itself defines size and chevrons.
Stargate
A network-aware Stargate portal plugin for PaperMC, with sign-based dialing and cross-server travel over Velocity or BungeeCord.
Modules
| Module | What it is |
|---|---|
stargate-common |
Shared models + JDBC storage (SQLite / MySQL) used only by the Paper plugin |
stargate-paper |
The actual gate plugin — install this on every backend server |
stargate-velocity |
Proxy companion for Velocity — install on the proxy only if using cross-server gates |
stargate-bungee |
Same, for BungeeCord/Waterfall |
Build everything with ./gradlew build. Jars land in each module's build/libs/.
Building a gate
A gate's shape is a fixed template in config.yml (gate.template), matched exactly
against the world - not flood-filled or guessed. The default is an 11x11 ring with 7
chevrons, laid out top row to bottom row:
00000000000
0000*1*0000
00012221000
00*22222*00
0*2222222*0
01222222210
0*2222222*0
00*22222*00
00012221000
0000***0000
00000000000
*— frame block, never touched by the plugin. Must be one ofgate.frame-materials(default: obsidian, gold block, gilded blackstone, birch/oak planks).1— a chevron: a frame block (same material rules as*) that swaps togate.chevron-lit-material(default gilded blackstone) while dialing/open, then reverts to whatever it looked like at rest when the gate closes. So a chevron can rest as plain obsidian and blend invisibly into the frame until it lights up.2— interior ("iris"), filled withgate.iris-material(default water) while open.0— ignored, not part of the gate.
Build it in a single vertical plane, one block thick, aligned to the world's X or Z
axis (facing north/south/east/west - not built at an angle). Edit gate.template in
config.yml if you want a different size or chevron count/placement.
- Build the frame to match the template.
- Place a sign anywhere - it doesn't need to touch the frame, so it can act like a DHD
console standing apart from the gate - with:
- Line 1:
[Stargate] - Line 2: network name (blank = default network)
- Line 3: gate name (blank = auto-generated)
- Line 4:
hiddento keep it out of the cycle list,fixed:GateNameto lock this gate to always dialGateName(no right-click cycling), or blank
- Line 1:
- The sign will show "Punch the gate (30s)". Within
gate.link-timeout-seconds, stand facing the gate square-on and left-click (punch) any*or1block, withingate.max-link-distanceof the sign. The plugin matches the template against the world starting from that block and links the sign to it.
If punching a block doesn't work, the plugin tells you exactly why in chat - wrong material, no orientation of the template lines up, too far from the sign, etc.
Using a gate
- Right-click the sign: cycles the destination shown on line 3 among the other gates on the same network.
- Left-click the sign: dials the shown destination — chevrons light in sequence,
then the interior fills with
gate.iris-material(default water). Walk into it to teleport. It auto-closes afterdialing.open-seconds.
Multi-world
Gates are addressed by network name, not world — a gate on any loaded world can dial any other gate on the same network regardless of world, exactly like same-server cross-world travel in the original Stargate mod.
Cross-server (Velocity / Bungee)
- Set
storage.type: mysqlin every backend server'sconfig.ymland point them at the same database — this is how servers see each other's gates. - Give each backend a unique
server-idinconfig.ymlthat matches its name in the proxy config (velocity.toml/config.ymlservers list). - Set
cross-server.enabled: trueon every backend. - Drop
stargate-velocity(orstargate-bungee) into the proxy's plugin folder.
When a player dials a gate hosted on another backend, the Paper plugin asks the
proxy (over the stargate:teleport plugin channel) to connect the player to that
server; once they land, the proxy forwards a delivery message so the destination
server's Stargate instance teleports them to the gate's exit point.
Permissions
stargate.use(default: true) — dial/cycle gatesstargate.create(default: op) — build new gatesstargate.destroy(default: op) — break your own gatesstargate.admin(default: op) — reload, break/manage any gate
Commands
/sg list [network]/sg destroy(look at a gate's sign)/sg reload