Skip to content

Commit

Permalink
Fix NPE in CTF flag use
Browse files Browse the repository at this point in the history
  • Loading branch information
addstar committed Dec 12, 2024
1 parent 7d6c255 commit 6984c73
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static void registerMinigameSign(MinigameSign mgSign) {

@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
private void takeFlag(@NotNull TakeFlagEvent event) {
if (event.getFlag().getAttachedToLocation() != null) {
if (event.getFlag() != null && event.getFlag().getAttachedToLocation() != null) {
this.takenFlags.add(event.getFlag());
}
}
Expand Down

0 comments on commit 6984c73

Please sign in to comment.