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