mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-12-05 03:13:14 +01:00
cancelable event results are nullable
This commit is contained in:
parent
6371cd4c5a
commit
18bd63076f
@ -18,17 +18,24 @@
|
||||
*/
|
||||
package com.plotsquared.core.events;
|
||||
|
||||
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
/**
|
||||
* PlotSquared event with {@link Result} to cancel, force, or allow.
|
||||
*/
|
||||
public interface CancellablePlotEvent {
|
||||
|
||||
Result getEventResult();
|
||||
@Nullable Result getEventResult();
|
||||
|
||||
void setEventResult(Result eventResult);
|
||||
void setEventResult(@Nullable Result eventResult);
|
||||
|
||||
/**
|
||||
* @deprecated No usage and not null-safe
|
||||
*/
|
||||
@Deprecated(since = "TODO")
|
||||
default int getEventResultRaw() {
|
||||
return getEventResult().getValue();
|
||||
return getEventResult() != null ? getEventResult().getValue() : -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user