Skip to main content

🧱 Interact Blocks

INTERACT_BLOCKS lets players score by right-clicking configured blocks.

It works well for:

button hunts
bell hunts
hidden block events
crate interaction events
custom block hunts
server exploration events

Basic example

objective:
type: INTERACT_BLOCKS
blocks:
bell:
display-name: "&eBell"
material: BELL
points: 5
once-per-player: true
cancel-event: false

When a player right-clicks a matching bell, they earn 5 points.


Block settings

SettingDescription
display-nameName shown in messages/placeholders
materialVanilla Bukkit material
pointsPoints awarded
once-per-playerWhether each player can score from it once
cooldownOptional cooldown before scoring again
cancel-eventWhether EventForge should cancel the interaction
trackingHow the interaction is tracked

Multiple blocks

objective:
type: INTERACT_BLOCKS
blocks:
bell:
display-name: "&eBell"
material: BELL
points: 5
once-per-player: true

crafting_table:
display-name: "&aCrafting Table"
material: CRAFTING_TABLE
points: 3
once-per-player: true

Cooldowns

Use cooldowns when a block should be reusable.

objective:
type: INTERACT_BLOCKS
blocks:
beacon:
display-name: "&bBeacon"
material: BEACON
points: 2
once-per-player: false
cooldown: 30s

Tracking

Tracking controls how EventForge remembers interactions.

Common options:

PLAYER
LOCATION
GLOBAL

Example:

objective:
type: INTERACT_BLOCKS
blocks:
hidden_button:
display-name: "&eHidden Button"
material: STONE_BUTTON
points: 5
tracking: PLAYER
once-per-player: true

Use PLAYER when each player should be able to score from the block.

Use LOCATION when a specific block location should only count once.

Use GLOBAL when the block entry should only be completed once globally.


Custom block support

INTERACT_BLOCKS can also match custom blocks from supported custom-content plugins.

Supported providers:

ItemsAdder
Oraxen
Nexo

Example:

objective:
type: INTERACT_BLOCKS
blocks:
lucky_block:
display-name: "&eLucky Block"
provider: ITEMSADDER
custom-id: "luckyblockhunt:common_lucky_block"
fallback-material: GOLD_BLOCK
points: 10
once-per-player: true

The fallback material is useful for testing or for servers that do not have the custom-content plugin installed.


Interaction actions

Blocks can run actions when successfully interacted with.

objective:
type: INTERACT_BLOCKS
blocks:
bell:
display-name: "&eBell"
material: BELL
points: 5
once-per-player: true
actions:
- type: MESSAGE
message: "&aYou found &f{block_display}&a!"
- type: SOUND
sound: ENTITY_PLAYER_LEVELUP
volume: 1.0
pitch: 1.2

Cooldown actions

You can run actions when a player interacts while still on cooldown.

objective:
type: INTERACT_BLOCKS
blocks:
beacon:
display-name: "&bBeacon"
material: BEACON
points: 2
once-per-player: false
cooldown: 30s
cooldown-actions:
- type: ACTIONBAR
message: "&cThis block is still on cooldown."

Placeholders

Interact block actions can use normal EventForge placeholders and block placeholders.

{block}
{block_display}
{block_material}
{block_provider}
{block_custom_id}
{score_change}
{new_score}
{score}
{player}
{event_display}

Example:

message: "&aYou interacted with &f{block_display}&a! &7(+{score_change})"

Milestone example

milestones:
enabled: true
thresholds:
10:
display-name: "&e10 Interaction Points"
once-per-player: true
actions:
- type: MESSAGE
message: "&aYou reached &f{milestone_display}&a!"
- type: SOUND
sound: ENTITY_PLAYER_LEVELUP

Testing

After adding the event file:

/eventforge reload
/eventforge validate interact_blocks_hunt
/eventforge start interact_blocks_hunt

Right-click one of the configured blocks.

If scoring does not work, check:

/eventforge errors interact_blocks_hunt

Summary

INTERACT_BLOCKS is used for events where players need to find and right-click blocks.

It supports vanilla blocks and supported custom block providers.