9
0
mirror of https://github.com/HibiscusMC/HibiscusCommons.git synced 2025-12-28 11:29:21 +00:00

clean: ignore cancelled events for SuperVanish

This commit is contained in:
LoJoSho
2024-01-05 11:34:35 -06:00
parent 51da2c68be
commit eb02a604cd

View File

@@ -20,13 +20,13 @@ public class HookSuperVanish extends Hook {
super("SuperVanish");
}
@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerVanish(@NotNull PlayerHideEvent event) {
HibiscusPlayerVanishEvent newEvent = new HibiscusPlayerVanishEvent(this, event.getPlayer());
Bukkit.getPluginManager().callEvent(newEvent);
}
@EventHandler(priority = EventPriority.NORMAL)
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerShow(@NotNull PlayerShowEvent event) {
HibiscusPlayerUnVanishEvent newEvent = new HibiscusPlayerUnVanishEvent(this, event.getPlayer());
Bukkit.getPluginManager().callEvent(newEvent);