Prevent Being Used (Power Type)

Prevents other players from being able to 'use' (right-click) the entity that has the power and executes a bi-entity action, item action and/or give an item upon being prevented.

Prevents other players from being able to “use” (right-click) the entity that has the power and executes a bi-entity action, item action and/or give an item upon being prevented.

Type ID: apoli:prevent_being_used

!!! note

In the context of this power type, the ’actor’ entity is the entity that did the “usage” action (right-click) while the ’target’ entity is the entity that has the power.

Fields

FieldTypeDefaultDescription
bientity_actionBi-entity Action TypeoptionalIf specified, this action will be executed on either or both the ’actor’ and ’target’ entities.
held_item_actionItem Action TypeoptionalIf specified, this action will be executed on the item used by the ’actor’ entity for right-clicking the ’target’ entity.
result_item_actionItem Action TypeoptionalIf specified, this action will be executed on the item that is given to the ’actor’ entity.
bientity_conditionBi-entity Condition TypeoptionalIf specified, the specified actions will only be executed if this condition is fulfilled by either or both ’actor’ and ’target’ entities.
item_conditionItem Condition TypeoptionalIf specified, the specified actions will only be executed if this condition is fulfilled by the item used by the ’actor’ entity for right-clicking the ’target’ entity.
handsArray of Strings["off_hand", "main_hand"]Determines if the power should be activated if the ’actor’ entity used the specified hand(s). Accepts "off_hand", "main_hand" or both.
result_stackItem StackoptionalIf specified, this item stack will be given to the ’actor’ entity.

Examples

{
    "type": "apoli:prevent_being_used",
    "bientity_action": {
        "type": "apoli:actor_action",
        "action": {
            "type": "apoli:execute_command",
            "command": "title @s actionbar {\"text\": \"Entity cannot be interacted with!\", \"color\": \"red\"}"
        }
    }
}

This example will prevent other players from “using” (right-clicking) the entity that has the power and inform them that the ‘entity cannot be interacted with’.