Skip to content

Commit

Permalink
Add helpers to Event.Result.
Browse files Browse the repository at this point in the history
  • Loading branch information
LexManos committed Jun 11, 2024
1 parent 9ce967e commit 85e8bc4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/net/minecraftforge/eventbus/api/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ public enum Result {
DENY,
DEFAULT,
ALLOW

public boolean isDefault() { return this == Result.DEFAULT; }
public boolean isDenied() { return this == Result.DENY; }
public boolean isAllowed() { return this == Result.ALLOW; }
}

private boolean isCanceled = false;
Expand Down

0 comments on commit 85e8bc4

Please sign in to comment.