#how can I make something like this?

1 messages · Page 1 of 1 (latest)

rapid gazelle
#

Specifically, a worldborder

pale solstice
#

check the position of every player and if they're out of bounds tp them back

rapid gazelle
#

Thanks, and how can I move the border?

pale solstice
#

you can store the radius with a scoreboard or dynamic property and change that

rapid gazelle
#

Ummm thanks, but what's dynamic property?

#

😅

pale solstice
#

basically a database stored on the world

rapid gazelle
#

May you give me an example, plz? Or links?

pale solstice
#
world.afterEvents.worldInitialize.subscribe((event) => {
    const { propertyRegistry } = event
    const def = new DynamicPropertiesDefinition()
    def.defineNumber("someVariable")
    propertyRegistry.registerEntityTypeDynamicProperties(def, EntityTypes.get("minecraft:player"))
})

player.setDynamicProperty("someVariable", 10)
player.getDynamicProperty("someVariable") // returns 10
#

so you could make one of these for the border, read them to get the size and change them to grow or shrink it