Skip to content

Interactions and Seating

Dan Alexander edited this page Nov 3, 2026 · 1 revision

Interaction commands

Furniture can consume a normal right-click and dispatch one or more commands. A string entry runs as the player:

        interaction:
          commands:
            - "help getting-started"

Use the mapping form when a command should run from console:

        interaction:
          commands:
            - command: "tutorial open {player} hub"
              executor: CONSOLE
            - command: "help shops"
              executor: PLAYER

Leading / characters are optional and are removed when content is parsed. Supported executors are PLAYER (the default) and CONSOLE. Before dispatch, VoxelFurniture expands these built-in context placeholders:

  • {player} - interacting player's name
  • {uuid} - interacting player's UUID
  • {world} - furniture world
  • {x}, {y}, {z} - furniture origin block coordinates
  • {furniture_id} - concrete placed content ID

If PlaceholderAPI is installed, its player placeholders are expanded after the built-in values. PlaceholderAPI remains optional; VoxelFurniture uses a soft dependency and commands continue to work without it.

Interaction commands run after FurnitureInteractEvent and before built-in use-animation, inventory, and seat behavior. Dyeing still has first priority. A furniture definition with at least one command therefore consumes a successful normal interaction instead of also toggling/opening/sitting. Players require voxelfurniture.interaction.commands, which defaults to true.

Commands participate in normal VoxelCore inheritance. A shared abstract help-box parent can contain all rendering and animation properties while concrete child definitions replace the commands list:

items:
  help_box:
    abstract: true
    material: PAPER
    display_name: "&fHelp Box"
    render:
      model: voxel:block/guide/help
    properties:
      furniture:
        renderer: display
        # shared hitbox / animation / display_parts ...

  help_box_shops:
    extends: help_box
    abstract: false
    display_name: "&fShops Help"
    properties:
      furniture:
        interaction:
          commands:
            - "help shops"

  help_box_tutorial:
    extends: help_box
    abstract: false
    display_name: "&fTutorial"
    properties:
      furniture:
        interaction:
          commands:
            - command: "tutorial open {player} hub"
              executor: CONSOLE

Seats

Furniture can opt into right-click seating with a seat mapping. If seat is absent, interaction behavior is unchanged and the furniture cannot be sat on.

        seat:
          x: 0.0
          y: -1.1
          z: 0.0
          yaw: 0.0

The seat offset is local to the furniture and rotates with its placement yaw. x and z move the seat around the furniture model, y controls the seated height, and yaw adds an optional facing offset to both the seat anchor and the rider. Use values such as yaw: 180 when a chair model is authored facing the opposite direction. Defaults are x: 0, y: -1.1, z: 0, and yaw: 0.

Right-clicking seated furniture first fires FurnitureInteractEvent. If another plugin cancels that event, VoxelFurniture does not mount the player. Otherwise players with voxelfurniture.sit can occupy the seat when it is free. Seats use transient invisible marker armor stands and are not written to furniture.yml. Empty seat anchors are removed automatically, and active seats are removed when the furniture is broken, administratively removed, or VoxelFurniture shuts down.

Clone this wiki locally