diff --git a/Crafttweaker_Annotation_Processors/src/main/java/com/blamejared/crafttweaker_annotation_processors/processors/document/DocumentProcessorNew.java b/Crafttweaker_Annotation_Processors/src/main/java/com/blamejared/crafttweaker_annotation_processors/processors/document/DocumentProcessorNew.java index e66147176..3e33de93c 100644 --- a/Crafttweaker_Annotation_Processors/src/main/java/com/blamejared/crafttweaker_annotation_processors/processors/document/DocumentProcessorNew.java +++ b/Crafttweaker_Annotation_Processors/src/main/java/com/blamejared/crafttweaker_annotation_processors/processors/document/DocumentProcessorNew.java @@ -153,7 +153,7 @@ private void writeYAML() throws IOException { final Map files = new HashMap<>(); for(CrafttweakerDocumentationPage value : values) { - String path = value.getDocPath().substring(0, value.getDocPath().lastIndexOf("/")); + String path = value.getDocPath().contains("/") ? value.getDocPath().substring(0, value.getDocPath().lastIndexOf("/")) : value.getDocPath(); String[] topFolders = path.split("/"); for(int i = 0; i < topFolders.length; i++) { topFolders[i] = topFolders[i].toUpperCase().charAt(0) + topFolders[i].substring(1);