Skip to content

Commit 3794e2e

Browse files
committed
Add missing nullable check.
1 parent 0a441ce commit 3794e2e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/ch/njol/skript/lang/parser/ParserInstance.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ public void deleteCurrentEvent() {
228228
* See also {@link #isCurrentEvent(Class[])} for checking with multiple argument classes
229229
*/
230230
public boolean isCurrentEvent(Class<? extends Event> event) {
231+
if (currentEvents == null)
232+
return false;
231233
for (Class<? extends Event> currentEvent : currentEvents) {
232234
// check that current event is same or child of event we want
233235
if (event.isAssignableFrom(currentEvent))
@@ -622,7 +624,7 @@ public interface ScriptActivityChangeEvent extends ScriptLoader.LoaderEvent, Scr
622624
* That is, the contents of any collections will remain the same, but there is no guarantee that
623625
* the contents themselves will remain unchanged.
624626
* @see #backup()
625-
* @see #restoreBackup(Backup)
627+
* @see #restoreBackup(Backup)
626628
*/
627629
public static class Backup {
628630

0 commit comments

Comments
 (0)