Skip to content

Virtual worldborder shared between players due to improper initialization #7825

Open
@ahmadmsaleem

Description

@ahmadmsaleem

Skript/Server Version

[17:11:19 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[17:11:19 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[17:11:19 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[17:11:19 INFO]: [Skript] Server Version: 1.21.1-132-b48403b (MC: 1.21.1)
[17:11:19 INFO]: [Skript] Skript Version: 2.11.0 (skriptlang-github)
[17:11:19 INFO]: [Skript] Installed Skript Addons: 
[17:11:19 INFO]: [Skript]  - skript-placeholders v1.7.0 (https://github.com/APickledWalrus/skript-placeholders)
[17:11:19 INFO]: [Skript]  - SkBee v3.11.1 (https://github.com/ShaneBeee/SkBee)
[17:11:19 INFO]: [Skript]  - skript-reflect v2.6 (https://github.com/SkriptLang/skript-reflect)
[17:11:19 INFO]: [Skript] Installed dependencies: 
[17:11:19 INFO]: [Skript]  - Vault v1.7.3-b131
[17:11:19 INFO]: [Skript]  - WorldGuard v7.0.12+829a4a4

Bug Description

When using a function like setPersonalBorder(p: player, radius: number = 3), all players share the same virtual worldborder instance. This seems to happen because the border is initialized in a way that causes it to be reused for every player.

function setPersonalBorder(p: player, radius: number = 3):
	set {_center} to location of {_p}
	set {_border} to a virtual worldborder:
		set worldborder radius to {_radius}
		set world border center of event-worldborder to {_center}
	set worldborder of {_p} to {_border}

Expected Behavior

Each player should have their own unique worldborder, centered around their location.

Steps to Reproduce

use function above

Errors or Screenshots

No response

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn issue that needs to be fixed. Alternatively, a PR fixing an issue.priority: mediumIssues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions