ChunkUnloadEvent can no longer be cancelled.

Mechanisms such as setForceLoaded should be used instead

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot 2019-04-26 16:53:34 +10:00
parent 3eb336e441
commit 1f963a1ee2

View file

@ -1,16 +1,14 @@
package org.bukkit.event.world;
import org.bukkit.Chunk;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
/**
* Called when a chunk is unloaded
*/
public class ChunkUnloadEvent extends ChunkEvent implements Cancellable {
public class ChunkUnloadEvent extends ChunkEvent {
private static final HandlerList handlers = new HandlerList();
private boolean cancel = false;
private boolean saveChunk;
public ChunkUnloadEvent(@NotNull final Chunk chunk) {
@ -40,14 +38,6 @@ public class ChunkUnloadEvent extends ChunkEvent implements Cancellable {
this.saveChunk = saveChunk;
}
public boolean isCancelled() {
return cancel;
}
public void setCancelled(boolean cancel) {
this.cancel = cancel;
}
@NotNull
@Override
public HandlerList getHandlers() {