diff --git a/src/main/java/org/nwapw/abacus/plugin/PluginManager.java b/src/main/java/org/nwapw/abacus/plugin/PluginManager.java index e6d4953..390b9e8 100644 --- a/src/main/java/org/nwapw/abacus/plugin/PluginManager.java +++ b/src/main/java/org/nwapw/abacus/plugin/PluginManager.java @@ -147,10 +147,18 @@ public class PluginManager { * @return the documentation object. */ public Documentation documentationFor(String name, DocumentationType type){ + Documentation toReturn = null; for(Documentation entry : registeredDocumentation){ - if(entry.getCodeName().equals(name) && entry.getType() == type) return entry; + if(entry.getCodeName().equals(name) && entry.getType() == type) { + toReturn = entry; + break; + } } - return null; + if(toReturn == null){ + toReturn = new Documentation(name, "", "", "", type); + registerDocumentation(toReturn); + } + return toReturn; } /**