mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-31 21:37:39 +01:00
SPIGOT-6616: Cancellable StriderTemperatureChangeEvent
By: md_5 <git@md-5.net>
This commit is contained in:
parent
10f782354b
commit
34e6b033ad
@ -1,6 +1,7 @@
|
||||
package org.bukkit.event.entity;
|
||||
|
||||
import org.bukkit.entity.Strider;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@ -8,10 +9,11 @@ import org.jetbrains.annotations.NotNull;
|
||||
* Called when a {@link Strider}'s temperature has changed as a result of
|
||||
* entering or existing blocks it considers warm.
|
||||
*/
|
||||
public class StriderTemperatureChangeEvent extends EntityEvent {
|
||||
public class StriderTemperatureChangeEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final boolean shivering;
|
||||
private boolean cancelled;
|
||||
|
||||
public StriderTemperatureChangeEvent(@NotNull Strider what, boolean shivering) {
|
||||
super(what);
|
||||
@ -33,6 +35,16 @@ public class StriderTemperatureChangeEvent extends EntityEvent {
|
||||
return shivering;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return cancelled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCancelled(boolean cancelled) {
|
||||
this.cancelled = cancelled;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public HandlerList getHandlers() {
|
||||
|
Loading…
Reference in New Issue
Block a user