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

[Suggestion] Adding function name to the FunctionEvent #610

Closed
TheLimeGlass opened this issue Jun 1, 2017 · 3 comments
Closed

[Suggestion] Adding function name to the FunctionEvent #610

TheLimeGlass opened this issue Jun 1, 2017 · 3 comments
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something.

Comments

@TheLimeGlass
Copy link
Collaborator

TheLimeGlass commented Jun 1, 2017

As the title suggests. Adding a way to grab the name or Function instance of a function being called in a function event.
https://github.com/bensku/Skript/blob/master/src/main/java/ch/njol/skript/lang/function/FunctionEvent.java

This would be useful for me because I want to make an event that is called when a function is called. This is mostly useful for cross sharing scripts (When you use a function from another script). That way you don't have to call another function that tells that the one function has been ran. If you get what I mean?

Adding a method to grab the name or Function instance of the function being called in the event would be helpful. I know the FunctionEvent wasn't ment to be tapped into, but just grabbing the name of the function opens lots of API possibilities.

@Syst3ms
Copy link
Contributor

Syst3ms commented Jun 1, 2017

A function isn't like a subroutine, its name can't vary. You can just have the function name as a constant in your code there.

@bensku bensku added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Jun 1, 2017
@bensku
Copy link
Member

bensku commented Jun 1, 2017

I'm kinda surprised that function event doesn't already include reference to function.

@28andrew
Copy link
Contributor

PR is done.

@bensku bensku closed this as completed Sep 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something.
Projects
None yet
Development

No branches or pull requests

4 participants