Disappearing a block display set to a variable in skript

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

clem

Member
Oct 22, 2026
2
0
1
How to make a specific block display set to a variable disappear from all players

Part of code:
Java:
spawn block display at player
            set blockdata of last spawned block display to cartography table
            set {-medicalCart} to last spawned entity
            send "&bSpawned medical carts display" to player

on join:
    if {medicalquest::%uuid of player%} is not set:
        set {medicalquest::%uuid of player%} to false
        make {-medicalCart} disappear from player


on right click:
    if name of target is "CD_Quests":
        if {medicalquest::%uuid of player%} is false:
            send "{@prefix} {@color}Accepted CD Quest" to player
            set {medicalquest::%uuid of player%} to true
            apply glowing to {-medicalCart}
            make {-medicalCart} disappear from all players
 
You're actually pretty close! Since you've already stored the block display in {-medicalCart}, you can simply use:

hide {-medicalCart}
This hides the display from all online players (Skript 2.10+).

Alternatively, since you're using SkBee, you can use:

make {-medicalCart} disappear from all players
Just make sure it's all players, not all player.

One thing I'd recommend, though: since this is a quest system, you might want to hide the display only from the player who accepted the quest. Otherwise, accepting the quest will hide it for everyone.

Also, keep in mind that hiding entities isn't permanent, so you'll need to handle players rejoining or chunks reloading.