mirror of
https://github.com/DanilaFe/abacus
synced 2025-04-22 00:24:12 -07:00
Fix documentation loading code.
This commit is contained in:
parent
5aa47d9602
commit
5ec277e042
@ -147,10 +147,18 @@ public class PluginManager {
|
|||||||
* @return the documentation object.
|
* @return the documentation object.
|
||||||
*/
|
*/
|
||||||
public Documentation documentationFor(String name, DocumentationType type){
|
public Documentation documentationFor(String name, DocumentationType type){
|
||||||
|
Documentation toReturn = null;
|
||||||
for(Documentation entry : registeredDocumentation){
|
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