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: API & onCustomImageInteractEvent & Image Names #62

Open
RandomTomato opened this issue Dec 21, 2022 · 0 comments
Open

Suggestion: API & onCustomImageInteractEvent & Image Names #62

RandomTomato opened this issue Dec 21, 2022 · 0 comments

Comments

@RandomTomato
Copy link

RandomTomato commented Dec 21, 2022

Hello,
My suggestion is to add a basic API implementation, an CustomImageInteractEvent & Image Names that players can utilize. This is so players can listen to player interaction with loaded images in a official way rather having to use unofficial packet listening. (Below is an example of why the CustomImageInteractEvent would be so useful)

Example Event Code:

    @EventHandler
    public void onCustomImageInteract(CustomImageInteractEvent event) {
        if (event.getAction() == Action.RIGHT_CLICK) {
            CustomImage image = CustomImage.get(event.getEntityId()); // I am not too familiar with your get method but this is a substitute
            if (image.getName().equals("Quest Board")) { // If the name of the image is Quest Board
                // Do things here
                // In my case would be open the quest board
            }
        }
    }

In my case, this would allow me to detect when players click on my quest board on my server (which can be seen below)

Quest Board:

alt text

Let me know what you think of these suggestions and I could possibly help with adding these if needed!

Thanks
RandomTomato

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

No branches or pull requests

1 participant