-
Notifications
You must be signed in to change notification settings - Fork 52
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
Selectors #10
Comments
There should also be selectable block positions / vector3 positions... ree This one should be done on |
Why would you run onRun() multiple times? Just return the array of entities in the argument class and the command can loop over them or whatever? |
Sure, that'd be better |
ad5001 already implemented this sometime ago Maybe his project can provide some answers |
It's unreadable 😂 https://github.com/Ad5001/PlayerSelectors/blob/master/src/Ad5001/PlayerSelectors/selector/Selector.php#L105-L122 I might implement a way to build your own parsers and selectors... and the default provided |
How should this work... literally.
The only thing that I can think of that would be "good enough" is a separate
SelectableEntityArgument
class which would be parsed and the results will be an array of results.The array will contain entities that satisfied the conditions given by the user... such as
name
,limit
, etc.This would also involve running
onRun
several times for each argument that is selectable and for each of its results. Then$args["argumentName"]
will contain an entity for every iteration.This is a simply but effective way of doing it, but I still have some thoughts that it's dirty.
Leave suggestions below...
The text was updated successfully, but these errors were encountered: