Template Gallery

2commands
2permissions
1file
1figure
5min read
Sheet 29 of 53 · Features

Filesfeatures/templates.yml

Filefeatures/templates.ymlCommand/is templatesCommand/is admin reloadThe template gallery lets players pick a ready-made layout and paste it onto their island, instead of everyone starting from the same bare platform.

CommandWhat it does
/is templatesBrowse and paste island templates (alias `gallery`, permission `ignitesky.templates`, default true)

How it works

The gallery also opens from the Island Tools tile of /is. Only the island owner can paste. Each entry lists its price and what the player already has, a click asks for confirmation, and the whole price is taken before anything is placed.

/is templates: each entry is a schematic with its own icon, description and price.
The template gallery menu with the Starter Base entry and its description

If something is missing, nothing is taken and the player is told exactly what: Missing 5 of 8 Iron Ingot. If a paste fails, is rolled back, cancelled or runs out of time, everything paid goes back where it came from.

What a template costs

By default a paste costs what building it by hand would take:

In the schematicCharged as
A blockThe item that places it: a wall torch is a torch, carrots are a carrot, redstone wire is redstone
A bed, a door, a tall flowerOne item, not one per half
A double slabTwo slabs
Candles, sea pickles, turtle eggs, snow layers, petalsOne item per candle, pickle, egg, layer or petal
A flower pot or a candle cakeBoth parts: the pot and the plant, the cake and the candle
Water, flowing lava, fire, a nether portalNothing. Waterlogged blocks don't add water
A lava sourceA lava bucket
Chests, barrels, shulker boxes, furnaces, hoppers, brewing standsEverything inside them, including what a stored shulker box or bundle holds
Item frames, armour stands, paintings, boats, minecartsThe entity's item plus what it holds or wears

Filefeatures/templates.ymlA block with no item of its own that isn't covered above counts as unobtainable. block-overrides in features/templates.yml covers the rest (farmland is dirt, kelp_plant is kelp) and takes your own entries: free, unobtainable, one item id or a list of item ids charged per block.

Unobtainable things

Some things a survival player can never hand over: spawners, bedrock, budding amethyst, end portal frames, command blocks, spawn eggs, player heads, mobs like villagers, and bees living in a hive. A template holding one is refused by default, and the gallery says what is in the way. Stored items with enchantments, potion effects or other data count too, because nobody can hand over the exact same item.

You can let them through:

  • allowed prices listed ids at a fixed amount of money each (0 = free), in any mode.
  • mode: price charges default-price money for every unobtainable thing instead of refusing.
  • extra-data-as-plain: true charges an enchanted sword as a plain one.

Where the items come from

Items are taken from the player's main inventory (never worn armour) and then the island chest, in the order of material-sources. Only plain items count, so a renamed or enchanted item is never eaten. A refund goes back where each item came from; whatever does not fit there goes to the other source and then drops at the player's feet. A player who logged out gets it on their next join.

Permissionignitesky.templates.freePlayers with ignitesky.templates.free (default op) paste without paying. Test prices with a normal account.

Command/is admin reloadThe price of a template is worked out once and kept until its file changes or you run /is admin reload.

Placing a paste by hand with IgnitePaste

With IgnitePaste installed and engine: auto, confirming a template puts the owner in IgnitePaste's one-time paste mode instead of pasting straight onto the island home. They get the ghost preview, the rotate, move and lock tools and the construction animation, and the paste has to fit inside their own island.

  • The price is taken when the session starts, and the player's inventory is stashed by IgnitePaste as usual.
  • Config keyignitepaste.session-timeout-secondsClosing the session, logging out, or running out of time (ignitepaste.session-timeout-seconds, default 300) hands everything back and doesn't start the cooldown.
  • The safety snapshot is taken the moment the owner pastes. A construction cancelled halfway is rolled back and refunded.
  • IgnitePaste's async and construction pastes place bare blocks, so containers land empty. Only what really lands is charged: the chest, not what was in it. Its plain WorldEdit paste (paste.async.enabled: false) keeps contents, and then they are charged.

Set engine: worldedit to always paste straight onto the island home, even with IgnitePaste installed.

Configuration

features/templates.yml
templates:
  enabled: true
  engine: auto                   # auto | ignitepaste | worldedit
  async-paste: always            # always | auto | never; off-thread only with FAWE
  safe-paste: true               # snapshot before a paste, roll back if it fails or the server stops mid-paste
  paste-cooldown-seconds: 3600   # per island, kept on disk; 0 disables
  cost:
    materials: true              # false = only the money below
    material-sources: [inventory, island-chest]
    money: 0                     # extra money per paste (Vault)
    multiplier: 1.0              # scales every material count, rounded up
    lore-max-lines: 10           # materials listed in the gallery before "and N more"
    chat-max-lines: 8            # missing materials listed in chat
    block-overrides:
      water: free
      lava: lava_bucket
      farmland: dirt
      lava_cauldron: [cauldron, lava_bucket]
      # ...the shipped file lists the rest
    free-entities: [marker, interaction, item_display, block_display, text_display, leash_knot]
    unobtainable:
      mode: refuse               # refuse | price
      default-price: 50000
      allowed: {}                # e.g. spawner: 250000
      extra-data-as-plain: false
      list: [bedrock, spawner, budding_amethyst, "*_spawn_egg", "infested_*"]   # shortened here
  ignitepaste:
    session-timeout-seconds: 300 # 0 = no limit
  entries:
    starter-base:
      display: "<green>Starter Base"
      icon: OAK_LOG
      description:
        - "<gray>A cosy starter house with"
        - "<gray>storage and a small farm."
      file: starter-base.schem   # under <data>/schematics; defaults to <id>.schem
    grinder:
      display: "<red>Mob Grinder"
      icon: ZOMBIE_HEAD
      description:
        - "<gray>A ready-made mob grinder"
        - "<gray>to kick-start your drops."
      file: grinder.schem
      cost:                      # optional, this template only
        materials: false
        money: 5000

A template's own cost: can set materials, money and multiplier, or replace the counted materials with an exact list:

cost:
  items:
    - COBBLESTONE:256
    - HOPPER:4

Pasting needs WorldEdit or FastAsyncWorldEdit (an optional soft dependency); without it the gallery still shows but tells the player no paste engine is installed. Drop the .schem files in <data>/schematics and list each as an entry. With safe-paste on, the island is captured before a paste (using the snapshot storage) so a failed or interrupted paste rolls back, even across a restart.

Loading the index

Enter openUp Down moveEsc close