-
-
Notifications
You must be signed in to change notification settings - Fork 368
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 player(nameOrUUID: string, getExactPlayer: boolean)
function
#5845
🚀 Add player(nameOrUUID: string, getExactPlayer: boolean)
function
#5845
Conversation
src/main/java/ch/njol/skript/classes/data/DefaultFunctions.java
Outdated
Show resolved
Hide resolved
Was looking over this in the issue the suggested syntax was to do I understand if not as it can be a bit redundant since |
Nope just wanted to make sure as I didn't see it mentioned, reasoning makes perfect sense to me. |
what do you think about using two functions ( |
was something I mentioned here as well, but it falls under the same thing as it's as simple as doing |
personally i'd like |
This falls under the same subject Fuze mentioned, read this reply and let me know what you think |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional addition could be a boolean flag to use getExactPlayer instead of just getPlayer. I know there have been a few complaints that parsing "a" as player will match "Andre", if Andre 's online and a isn't.
Not sure about this addition, is there any useful use case for it? I am afraid users will just never use it OR misuse it and complain about their code not working as expected |
Say you have a stored list of names (or a text input from chat, or a sign, or something) and you need the player objects of the online players. You can: Additionally, this issue can and does pop up when using arguments in commands, but that's not related to this PR. It'd be a niche and pretty minor addition, but something i'd appreciate and have seen a few people grapple with in SkUnity help channels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks solid!
player(nameOrUUID: string)
functionplayer(nameOrUUID: string, getExactPlayer)
function
player(nameOrUUID: string, getExactPlayer)
functionplayer(nameOrUUID: string, getExactPlayer: boolean)
function
Description
Adds a player function that return player or offlineplayer from name or uuid.
Target Minecraft Versions: Any
Requirements: Any
Related Issues:
player(name: string)
function #5842