Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keywords for scoreboard player operations #45

Closed
MysteryBlokHed opened this issue Jun 26, 2021 · 1 comment · Fixed by #47
Closed

Add keywords for scoreboard player operations #45

MysteryBlokHed opened this issue Jun 26, 2021 · 1 comment · Fixed by #47
Labels
enhancement New feature or request

Comments

@MysteryBlokHed
Copy link
Owner

If you want to perform a scoreboard operation on two databind variables, you'd currently have to do it like this:

scoreboard players operation --databind var1 = --databind var2

It would be easier to have a keyword that becomes --databind var1 or --databind var2. The :tvar keyword almost does this, but it also has score at the beginning (eg. :tvar var1 -> score --databind var1). Adding a new keyword like :gvar to get just what you'd need to perform an operation would be a good idea. That way, the above could be written as such:

scoreboard players operation :gvar var1 = :gvar var2

Adding another keyword like :varop or something that becomes scoreboard players operation would shorten the above even further to the following:

:varop :gvar var1 = :gvar var2
@MysteryBlokHed MysteryBlokHed added the enhancement New feature or request label Jun 26, 2021
@MysteryBlokHed
Copy link
Owner Author

Mixing multiple Databind keywords in the way the aforementioned example does could be hard to implement in the tokenize() function. Adding something to handle :varop in preprocess.rs would most likely be easiest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant