mirror of
https://github.com/DanilaFe/abacus
synced 2024-11-17 16:09:32 -08:00
Fix documentation loading code.
This commit is contained in:
parent
8c3de54d0c
commit
fdcf2b5c6d
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user