From b2c95675df9d9070f03c7b9808ae0bbc552dfcf8 Mon Sep 17 00:00:00 2001 From: Pepich Date: Tue, 7 Feb 2017 00:42:40 +0100 Subject: [PATCH] Fixed NPE --- src/com/redstoner/modules/adminnotes/AdminNotes.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/redstoner/modules/adminnotes/AdminNotes.java b/src/com/redstoner/modules/adminnotes/AdminNotes.java index 5114d2d..a7828aa 100644 --- a/src/com/redstoner/modules/adminnotes/AdminNotes.java +++ b/src/com/redstoner/modules/adminnotes/AdminNotes.java @@ -19,7 +19,7 @@ import com.redstoner.misc.Utils; import com.redstoner.modules.Module; @AutoRegisterListener -@Version(major = 1, minor = 0, revision = 1, compatible = 1) +@Version(major = 1, minor = 0, revision = 2, compatible = 1) public class AdminNotes implements Module, Listener { private boolean enabled = false; @@ -30,6 +30,8 @@ public class AdminNotes implements Module, Listener public void onEnable() { notes = JsonManager.getArray(saveFile); + if (notes == null) + notes = new JSONArray(); enabled = true; }