mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-31 22:22:49 +00:00
ChunkUnloadEvent can no longer be cancelled.
Mechanisms such as setForceLoaded should be used instead
This commit is contained in:
parent
2eb7109534
commit
bf58cf719c
1 changed files with 1 additions and 11 deletions
|
@ -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() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue