diff --git a/src/main/java/net/knarcraft/bookswithoutborders/utility/FileHelper.java b/src/main/java/net/knarcraft/bookswithoutborders/utility/FileHelper.java index b1b05e7..b5afa47 100644 --- a/src/main/java/net/knarcraft/bookswithoutborders/utility/FileHelper.java +++ b/src/main/java/net/knarcraft/bookswithoutborders/utility/FileHelper.java @@ -122,6 +122,9 @@ public final class FileHelper { */ public static void printFiles(CommandSender sender, List fileList) { BooksWithoutBorders.sendSuccessMessage(sender, "Available Books:"); + if (fileList == null) { + return; + } int listSize = fileList.size(); for (int fileIndex = 0; fileIndex < listSize; fileIndex++) { sender.sendMessage(ChatColor.GRAY + "[" + (fileIndex + 1) + "] " + fileList.get(fileIndex));