RemovalReason enum
Пакет: com.hypixel.hytale.server.core.universe.world.events
Файл: com/hypixel/hytale/server/core/universe/world/events/RemoveWorldEvent.java
Поля (1)
| Модификаторы | Тип | Имя |
|---|---|---|
|
GENERAL, |
EXCEPTIONAL |
Исходный код
Показать/скрыть
class="kw">package com.hypixel.hytale.server.core.universe.world.events;
class="kw">import com.hypixel.hytale.event.ICancellable;
class="kw">import com.hypixel.hytale.server.core.universe.world.World;
class="kw">import javax.annotation.Nonnull;
class="kw">public class RemoveWorldEvent class="kw">extends WorldEvent class="kw">implements ICancellable {
class="kw">private boolean cancelled;
@Nonnull
class="kw">private class="kw">final RemoveWorldEvent.RemovalReason removalReason;
class="kw">public RemoveWorldEvent(@Nonnull World var1, @Nonnull RemoveWorldEvent.RemovalReason var2) {
super(var1);
this.removalReason = var2;
}
@Nonnull
class="kw">public RemoveWorldEvent.RemovalReason getRemovalReason() {
class="kw">return this.removalReason;
}
@Override
class="kw">public boolean isCancelled() {
class="kw">return this.removalReason == RemoveWorldEvent.RemovalReason.EXCEPTIONAL ? false : this.cancelled;
}
@Override
class="kw">public void setCancelled(boolean var1) {
this.cancelled = var1;
}
@Nonnull
@Override
class="kw">public String toString() {
class="kw">return "RemoveWorldEvent{cancelled=" + this.cancelled + "} " + super.toString();
}
class="kw">public enum RemovalReason {
GENERAL,
EXCEPTIONAL;
RemovalReason() {
}
}
}