Packet Entity Viewers (Effect) — skPackets

Addon: skPackets · Category: Effect · Since: 1.0.0

Syntax

add %players% to [the] viewers of (fake|packet) entit(y|ies) %packetentities%

Description

Adds online viewers or permanently removes viewers, including offline players. Updates persistence tracking. Removing the last viewer hides the entity without destroying it.

Examples

command /private-preview:
    trigger:
        set {_mob} to a new packet entity:
            entity: zombie
            location: location of player
            viewers: player
        add player to viewers of packet entity {_mob}
        wait 5 seconds
        remove player from viewers of packet entity {_mob}
        kill packet entity {_mob}

View source