use of io.github.thebusybiscuit.slimefun4.api.events.SlimefunGuideOpenEvent in project Slimefun4 by Slimefun.
the class SlimefunGuideListener method openGuide.
@ParametersAreNonnullByDefault
private void openGuide(Player p, PlayerRightClickEvent e, SlimefunGuideMode layout) {
SlimefunGuideOpenEvent event = new SlimefunGuideOpenEvent(p, e.getItem(), layout);
Bukkit.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
e.cancel();
SlimefunGuide.openGuide(p, event.getGuideLayout());
}
}
Aggregations