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

Added DeluxeMenusOpenMenuEvent and DeluxeMenusPreOpenMenuEvent #60

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DomiRusz24
Copy link

Added DeluxeMenusOpenMenuEvent and DeluxeMenusPreOpenMenuEvent

Both are useful for when you try to use other custom inventory plugins with DeluxeMenus.
(I myself needed this event, and it would be nice to not have to update the plugin manually myself each time you drop an update)

@@ -488,6 +495,11 @@ public void openMenu(final Player viewer, final Map<String, String> args, final
holder.startUpdatePlaceholdersTask();
}
});

Bukkit.getScheduler().runTask(DeluxeMenus.getInstance(), () -> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose in doing this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the event runs on the main thread, I think that is the preferable option here. Can be ran async though, see no problem with that. But the event name would have to include Async or note it in any other way.

@DomiRusz24
Copy link
Author

Hey, any update?

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

Successfully merging this pull request may close these issues.

2 participants