From acff317aa810d935fd78d7f23113617f05efc958 Mon Sep 17 00:00:00 2001 From: walterhiggins Date: Wed, 30 Dec 2015 13:12:56 +0000 Subject: [PATCH] Fix API generation --- docs/API-Reference.md | 138 ++++++++++++++--------------- src/docs/js/generateEntitiesDoc.js | 5 +- src/docs/js/generateItemsDoc.js | 3 +- 3 files changed, 71 insertions(+), 75 deletions(-) diff --git a/docs/API-Reference.md b/docs/API-Reference.md index f8b014f..88ee2e8 100644 --- a/docs/API-Reference.md +++ b/docs/API-Reference.md @@ -6169,7 +6169,7 @@ your own mini-game... [bukscore]: http://jd.bukkit.org/beta/apidocs/org/bukkit/scoreboard/package-summary.html -/********************* + ## Items module The Items module provides a suite of functions - one for each possible item. See https://ci.visualillusionsent.net/job/CanaryLib/javadoc/net/canarymod/api/inventory/ItemType.html for a list of possible items @@ -6715,8 +6715,7 @@ The following functions are provided: * yellowStainedClay() * zombieHead() -***/ -/********************* + ## Entities module The Entities module provides a suite of functions - one for each possible entity type. @@ -6729,71 +6728,70 @@ The Entities module provides a suite of functions - one for each possible entity The following functions are provided: - * aRMOR_STAND() - * aRROW() - * bAT() - * bLAZE() - * bOAT() - * cAVE_SPIDER() - * cHICKEN() - * cOMPLEX_PART() - * cOW() - * cREEPER() - * dROPPED_ITEM() - * eGG() - * eNDERMAN() - * eNDERMITE() - * eNDER_CRYSTAL() - * eNDER_DRAGON() - * eNDER_PEARL() - * eNDER_SIGNAL() - * eXPERIENCE_ORB() - * fALLING_BLOCK() - * fIREBALL() - * fIREWORK() - * fISHING_HOOK() - * gHAST() - * gIANT() - * gUARDIAN() - * hORSE() - * iRON_GOLEM() - * iTEM_FRAME() - * lEASH_HITCH() - * lIGHTNING() - * mAGMA_CUBE() - * mINECART() - * mINECART_CHEST() - * mINECART_COMMAND() - * mINECART_FURNACE() - * mINECART_HOPPER() - * mINECART_MOB_SPAWNER() - * mINECART_TNT() - * mUSHROOM_COW() - * oCELOT() - * pAINTING() - * pIG() - * pIG_ZOMBIE() - * pLAYER() - * pRIMED_TNT() - * rABBIT() - * sHEEP() - * sILVERFISH() - * sKELETON() - * sLIME() - * sMALL_FIREBALL() - * sNOWBALL() - * sNOWMAN() - * sPIDER() - * sPLASH_POTION() - * sQUID() - * tHROWN_EXP_BOTTLE() - * uNKNOWN() - * vILLAGER() - * wEATHER() - * wITCH() - * wITHER() - * wITHER_SKULL() - * wOLF() - * zOMBIE() + * armor_stand() + * arrow() + * bat() + * blaze() + * boat() + * cave_spider() + * chicken() + * complex_part() + * cow() + * creeper() + * dropped_item() + * egg() + * ender_crystal() + * ender_dragon() + * ender_pearl() + * ender_signal() + * enderman() + * endermite() + * experience_orb() + * falling_block() + * fireball() + * firework() + * fishing_hook() + * ghast() + * giant() + * guardian() + * horse() + * iron_golem() + * item_frame() + * leash_hitch() + * lightning() + * magma_cube() + * minecart() + * minecart_chest() + * minecart_command() + * minecart_furnace() + * minecart_hopper() + * minecart_mob_spawner() + * minecart_tnt() + * mushroom_cow() + * ocelot() + * painting() + * pig() + * pig_zombie() + * player() + * primed_tnt() + * rabbit() + * sheep() + * silverfish() + * skeleton() + * slime() + * small_fireball() + * snowball() + * snowman() + * spider() + * splash_potion() + * squid() + * thrown_exp_bottle() + * unknown() + * villager() + * weather() + * witch() + * wither() + * wither_skull() + * wolf() + * zombie() -***/ diff --git a/src/docs/js/generateEntitiesDoc.js b/src/docs/js/generateEntitiesDoc.js index 3f9142b..b5eb4c0 100644 --- a/src/docs/js/generateEntitiesDoc.js +++ b/src/docs/js/generateEntitiesDoc.js @@ -4,7 +4,7 @@ var out = java.lang.System.out, err = java.lang.System.err, entry = null; var content = [ - '/*********************', + '', '## Entities module', 'The Entities module provides a suite of functions - one for each possible entity type.', '', @@ -24,14 +24,13 @@ var entitytypes = org.bukkit.entity.EntityType.values(); for (t in entitytypes) { if (entitytypes[t] && entitytypes[t].ordinal) { name = entitytypes[t].name(); - name = ('' + name).replace(/^(.)/,function(a){ return a.toLowerCase(); }); + name = ('' + name).replace(/^(.*)/,function(a){ return a.toLowerCase(); }); enumVals.push(' * ' + name + '()'); } } enumVals.sort(); content = content.concat(enumVals); content.push(''); -content.push('***/'); for (i = 0; i< content.length; i++){ out.println(content[i]); } diff --git a/src/docs/js/generateItemsDoc.js b/src/docs/js/generateItemsDoc.js index 07610c5..11fe534 100644 --- a/src/docs/js/generateItemsDoc.js +++ b/src/docs/js/generateItemsDoc.js @@ -4,7 +4,7 @@ var out = java.lang.System.out, err = java.lang.System.err, entry = null; var content = [ - '/*********************', + '', '## Items module', 'The Items module provides a suite of functions - one for each possible item.', 'See https://ci.visualillusionsent.net/job/CanaryLib/javadoc/net/canarymod/api/inventory/ItemType.html for a list of possible items', @@ -35,7 +35,6 @@ for (var i = 0;i < materials.length; i++ ){ enumVals.sort(); content = content.concat(enumVals); content.push(''); -content.push('***/'); for (var i = 0; i< content.length; i++){ out.println(content[i]); }