9
0
mirror of https://github.com/HibiscusMC/HibiscusCommons.git synced 2025-12-19 15:09:26 +00:00

fix: Libs Disguises calling wrong event

This commit is contained in:
LoJoSho
2024-04-02 12:24:01 -05:00
parent cd9521e0ad
commit 4f94ee8906

View File

@@ -2,6 +2,7 @@ package me.lojosho.hibiscuscommons.hooks.misc;
import me.libraryaddict.disguise.events.DisguiseEvent;
import me.libraryaddict.disguise.events.UndisguiseEvent;
import me.lojosho.hibiscuscommons.api.events.HibiscusPlayerUnVanishEvent;
import me.lojosho.hibiscuscommons.api.events.HibiscusPlayerVanishEvent;
import me.lojosho.hibiscuscommons.hooks.Hook;
import org.bukkit.Bukkit;
@@ -25,7 +26,7 @@ public class HookLibsDisguises extends Hook {
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onPlayerShow(@NotNull UndisguiseEvent event) {
if (!(event.getEntity() instanceof Player player)) return;
HibiscusPlayerVanishEvent newEvent = new HibiscusPlayerVanishEvent(this, player);
HibiscusPlayerUnVanishEvent newEvent = new HibiscusPlayerUnVanishEvent(this, player);
Bukkit.getPluginManager().callEvent(newEvent);
}
}