TriggerReactor

TriggerReactor

24.6k Downloads

Inconsistent behavior of global variable

gerzytet opened this issue ยท 1 comments

commented

/trg run {"j"} = player.getLocation(); #message {"j"}; j = {"j"}; j.add(1, 1, 1); #message {"j"}
The global variable was modified even though it was not assigned to.

For some people, this will be useful, but I'm labeling this as a bug because global variables aren't supposed to behave that way, and it will cause compatibility issues in 3.1.

In 3.1, we're moving to gson for serialization, which will not do any of the dirty magic bukkit does that makes this work.

commented

Nice catch

That wasn't intended indeed

It can lead to data inconsistency if not solved.