NBStudio

Sign Tags & Grief Security

Comprehensive details on sign tags syntax, bi-directional teleportation, SQLite databases, and anti-grief protection listeners.

Sign Tags & Grief Security

SignWarp operates on a precise sign linking model, securing physical signs against structural damage and exploits using custom engine listeners.


Sign Formatting Syntax

To create teleportation links, write special headers on the first line of a placed sign, followed by the warp name on the second line. All headers are case-insensitive.

Warp Origin Sign

Right-clicking this sign teleports the player to the destination warp coordinates.

  • First Line Options: [Warp] or [WP]
  • Second Line: The precise name of the warp destination.
[Warp]
spawn

Note: Placing this sign changes the header to a prominent blue text if a target with that name exists in the database.

Warp Target Sign

Placing this sign saves your active location (X, Y, Z, Yaw, and Pitch) into the SQLite database.

  • First Line Options: [WarpTarget] or [WPT]
  • Second Line: The name of the warp you want to create.
[WarpTarget]
spawn

Note: The sign will glow in blue text once successfully registered in the database.


SignWarp doesn't just offer one-way teleports. It supports a unique Bi-Directional Teleportation mechanic.

  • Normal Travel: A player right-clicks a departure sign ([Warp]) and is teleported to the coordinate location of the destination sign ([WarpTarget]).
  • Return Travel: If a player right-clicks the destination sign ([WarpTarget]), the plugin performs a database lookup, finds the location of the origin sign, and teleports them back to the departure coordinates!

SQLite Database Persistence

All warp data is written dynamically to a local SQLite database located at:

  • plugins/SignWarp/warps.db

Using an SQLite database ensures that data is stored highly efficiently without causing server lag. The database contains two primary tables:

1. The warps Table

Stores registered target locations:

  • name (Primary Key) - The identifier name of the warp.
  • world / x / y / z / yaw / pitch - Exact spatial coordinates.
  • created_at - Timestamp of when the warp was created.

Tracks physical sign coords to enable bi-directional links and protection:

  • warp_name - Linked warp name.
  • sign_type - WARP (origin) or TARGET (destination).
  • world / x / y / z - Physical coordinates of the sign block.

Grief Protection & Security Listeners

To prevent players from breaking warp pathways or exploiting teleport structures, SignWarp features robust safety listeners built directly into the Spigot event loops:

1. Piston Movement Lock

Griefers cannot use pistons to shift warp signs away or break them.

  • Listener: BlockPistonExtendEvent & BlockPistonRetractEvent
  • Behavior: The plugin scans the piston block list. If any block being pushed or pulled contains a registered warp sign, the entire piston action is instantly cancelled.

2. Explosion and TNT Immunity

Warp signs are completely immune to explosive blasts.

  • Listener: EntityExplodeEvent
  • Behavior: If TNT, creepers, or other entities detonate near warp blocks, the plugin scans the affected block list and removes any registered warp signs from the blast register before damage occurs.

3. Combustion Prevention

Warp signs will never burn down.

  • Listener: BlockBurnEvent
  • Behavior: Any event attempting to catch fire or burn a block containing a registered warp sign is automatically cancelled.

4. Accidental Destruction Protection

Even authorized players cannot destroy a warp sign by accident.

  • Listener: BlockBreakEvent
  • Behavior: If an administrator or player with signwarp.break attempts to punch or break a warp sign:
    1. The break event is cancelled (the sign remains intact).
    2. The plugin places a 10-second pending deletion window on the player's account.
    3. The player receives a warning: "Are you sure you want to delete this Warp sign? Type /signwarp confirmwarpdelete within 10 seconds to confirm."
    4. If the player runs /sw confirmwarpdelete within 10 seconds, the warp is deleted from the SQLite database and the block is safely broken. Otherwise, the request expires and the sign remains protected.

On this page