SPIGOT-6616: Cancellable StriderTemperatureChangeEvent

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-07-03 09:36:51 +10:00
parent fec9294c47
commit bc5ed0e911
2 changed files with 6 additions and 4 deletions

View File

@@ -1585,9 +1585,10 @@ public class CraftEventFactory {
return event;
}
public static void callStriderTemperatureChangeEvent(EntityStrider strider, boolean shivering) {
public static boolean callStriderTemperatureChangeEvent(EntityStrider strider, boolean shivering) {
StriderTemperatureChangeEvent event = new StriderTemperatureChangeEvent((Strider) strider.getBukkitEntity(), shivering);
Bukkit.getPluginManager().callEvent(event);
return !event.isCancelled();
}
public static boolean handleEntitySpellCastEvent(EntityIllagerWizard caster, EntityIllagerWizard.Spell spell) {