#how can I make something like this?
1 messages · Page 1 of 1 (latest)
check the position of every player and if they're out of bounds tp them back
Thanks, and how can I move the border?
you can store the radius with a scoreboard or dynamic property and change that
basically a database stored on the world
May you give me an example, plz? Or links?
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