Solved Recipe is not working...

Discussion in 'Plugin Development' started by 17nhammond, Jul 16, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    17nhammond

    The only recipes that work are the sword recipes. The rest won't work!

    Code:java
    1.  
    2. @Override
    3. public void onDisable()
    4. {
    5. PluginDescriptionFile pdfFile = this.getDescription();
    6. logger.info(pdfFile.getName() + " Has Been Disabled!");
    7. getServer().clearRecipes();
    8. }
    9.  
    10. public void onEnable()
    11. {
    12. PluginDescriptionFile pdfFile = this.getDescription();
    13. logger.info(pdfFile.getName() + " Version " + pdfFile.getVersion() + " Has Been Enabled!");
    14.  
    15.  
    16. //Stone Sword Recipe
    17. ShapelessRecipe stonesword = new ShapelessRecipe(new ItemStack(Material.STONE_SWORD, 1));
    18. stonesword.addIngredient(Material.WOOD_SWORD );
    19. stonesword.addIngredient(Material.WOOD_SWORD );
    20. stonesword.addIngredient(Material.WOOD_SWORD );
    21.  
    22. //Iron Sword Recipe
    23. ShapelessRecipe ironsword = new ShapelessRecipe(new ItemStack(Material.IRON_SWORD, 1));
    24. ironsword.addIngredient(Material.STONE_SWORD );
    25. ironsword.addIngredient(Material.STONE_SWORD );
    26. ironsword.addIngredient(Material.STONE_SWORD );
    27. ironsword.addIngredient(Material.STONE_SWORD );
    28.  
    29. //Gold Sword Recipe
    30. ShapelessRecipe goldsword = new ShapelessRecipe(new ItemStack(Material.GOLD_SWORD, 1));
    31. goldsword.addIngredient(Material.IRON_SWORD );
    32. goldsword.addIngredient(Material.IRON_SWORD );
    33. goldsword.addIngredient(Material.IRON_SWORD );
    34. goldsword.addIngredient(Material.IRON_SWORD );
    35. goldsword.addIngredient(Material.IRON_SWORD );
    36.  
    37. //Diamond Sword Recipe
    38. ShapelessRecipe diamondsword = new ShapelessRecipe(new ItemStack(Material.GOLD_SWORD, 1));
    39. diamondsword.addIngredient(Material.GOLD_SWORD );
    40. diamondsword.addIngredient(Material.GOLD_SWORD );
    41. diamondsword.addIngredient(Material.GOLD_SWORD );
    42. diamondsword.addIngredient(Material.GOLD_SWORD );
    43. diamondsword.addIngredient(Material.GOLD_SWORD );
    44. diamondsword.addIngredient(Material.GOLD_SWORD );
    45.  
    46.  
    47.  
    48.  
    49. //Stone Pickaxe Recipe
    50. ShapelessRecipe stonepa = new ShapelessRecipe(new ItemStack(Material.STONE_PICKAXE, 1));
    51. stonepa.addIngredient(Material.WOOD_PICKAXE );
    52. stonepa.addIngredient(Material.WOOD_PICKAXE );
    53. stonepa.addIngredient(Material.WOOD_PICKAXE );
    54.  
    55. //Iron Pickaxe Recipe
    56. ShapelessRecipe ironpickaxe = new ShapelessRecipe(new ItemStack(Material.IRON_PICKAXE, 1));
    57. ironpickaxe.addIngredient(Material.STONE_PICKAXE );
    58. ironpickaxe.addIngredient(Material.STONE_PICKAXE );
    59. ironpickaxe.addIngredient(Material.STONE_PICKAXE );
    60. ironpickaxe.addIngredient(Material.STONE_PICKAXE );
    61.  
    62. //Gold Pickaxe Recipe
    63. ShapelessRecipe goldpickaxe = new ShapelessRecipe(new ItemStack(Material.GOLD_PICKAXE, 1));
    64. goldpickaxe.addIngredient(Material.IRON_PICKAXE );
    65. goldpickaxe.addIngredient(Material.IRON_PICKAXE );
    66. goldpickaxe.addIngredient(Material.IRON_PICKAXE );
    67. goldpickaxe.addIngredient(Material.IRON_PICKAXE );
    68. goldpickaxe.addIngredient(Material.IRON_PICKAXE );
    69.  
    70. //Diamond Pickaxe Recipe
    71. ShapelessRecipe diamondpickaxe = new ShapelessRecipe(new ItemStack(Material.DIAMOND_PICKAXE, 1));
    72. diamondpickaxe.addIngredient(Material.GOLD_PICKAXE );
    73. diamondpickaxe.addIngredient(Material.GOLD_PICKAXE );
    74. diamondpickaxe.addIngredient(Material.GOLD_PICKAXE );
    75. diamondpickaxe.addIngredient(Material.GOLD_PICKAXE );
    76. diamondpickaxe.addIngredient(Material.GOLD_PICKAXE );
    77. diamondpickaxe.addIngredient(Material.GOLD_PICKAXE );
    78.  
    79.  
    80.  
    81. //Stone Axe Recipe
    82. ShapelessRecipe stoneaxe = new ShapelessRecipe(new ItemStack(Material.STONE_AXE, 1));
    83. stoneaxe.addIngredient(Material.WOOD_AXE );
    84. stoneaxe.addIngredient(Material.WOOD_AXE );
    85. stoneaxe.addIngredient(Material.WOOD_AXE );
    86.  
    87. //Iron Axe Recipe
    88. ShapelessRecipe ironaxe = new ShapelessRecipe(new ItemStack(Material.IRON_AXE, 1));
    89. ironaxe.addIngredient(Material.STONE_AXE );
    90. ironaxe.addIngredient(Material.STONE_AXE );
    91. ironaxe.addIngredient(Material.STONE_AXE );
    92. ironaxe.addIngredient(Material.STONE_AXE );
    93.  
    94. //Gold Axe Recipe
    95. ShapelessRecipe goldaxe = new ShapelessRecipe(new ItemStack(Material.GOLD_AXE, 1));
    96. goldaxe.addIngredient(Material.IRON_AXE );
    97. goldaxe.addIngredient(Material.IRON_AXE );
    98. goldaxe.addIngredient(Material.IRON_AXE );
    99. goldaxe.addIngredient(Material.IRON_AXE );
    100. goldaxe.addIngredient(Material.IRON_AXE );
    101.  
    102. //Diamond Axe Recipe
    103. ShapelessRecipe diamondaxe = new ShapelessRecipe(new ItemStack(Material.DIAMOND_AXE, 1));
    104. diamondaxe.addIngredient(Material.GOLD_AXE );
    105. diamondaxe.addIngredient(Material.GOLD_AXE );
    106. diamondaxe.addIngredient(Material.GOLD_AXE );
    107. diamondaxe.addIngredient(Material.GOLD_AXE );
    108. diamondaxe.addIngredient(Material.GOLD_AXE );
    109. diamondaxe.addIngredient(Material.GOLD_AXE );
    110.  
    111.  
    112.  
    113. //Stone Hoe Recipe
    114. ShapelessRecipe stonehoe = new ShapelessRecipe(new ItemStack(Material.STONE_HOE, 1));
    115. stonehoe.addIngredient(Material.WOOD_HOE );
    116. stonehoe.addIngredient(Material.WOOD_HOE );
    117. stonehoe.addIngredient(Material.WOOD_HOE );
    118.  
    119. //Iron Hoe Recipe
    120. ShapelessRecipe ironhoe = new ShapelessRecipe(new ItemStack(Material.IRON_HOE, 1));
    121. ironhoe.addIngredient(Material.STONE_HOE );
    122. ironhoe.addIngredient(Material.STONE_HOE );
    123. ironhoe.addIngredient(Material.STONE_HOE );
    124. ironhoe.addIngredient(Material.STONE_HOE );
    125.  
    126. //Gold Hoe Recipe
    127. ShapelessRecipe goldhoe = new ShapelessRecipe(new ItemStack(Material.GOLD_HOE, 1));
    128. goldhoe.addIngredient(Material.IRON_HOE );
    129. goldhoe.addIngredient(Material.IRON_HOE );
    130. goldhoe.addIngredient(Material.IRON_HOE );
    131. goldhoe.addIngredient(Material.IRON_HOE );
    132. goldhoe.addIngredient(Material.IRON_HOE );
    133.  
    134. //Diamond Hoe Recipe
    135. ShapelessRecipe diamondhoe = new ShapelessRecipe(new ItemStack(Material.DIAMOND_HOE, 1));
    136. diamondhoe.addIngredient(Material.GOLD_HOE );
    137. diamondhoe.addIngredient(Material.GOLD_HOE );
    138. diamondhoe.addIngredient(Material.GOLD_HOE );
    139. diamondhoe.addIngredient(Material.GOLD_HOE );
    140. diamondhoe.addIngredient(Material.GOLD_HOE );
    141. diamondhoe.addIngredient(Material.GOLD_HOE );
    142.  
    143.  
    144.  
    145. //Stone Spade Recipe
    146. ShapelessRecipe stonespade = new ShapelessRecipe(new ItemStack(Material.STONE_SPADE, 1));
    147. stonespade.addIngredient(Material.WOOD_SPADE );
    148. stonespade.addIngredient(Material.WOOD_SPADE );
    149. stonespade.addIngredient(Material.WOOD_SPADE );
    150.  
    151. //Iron Spade Recipe
    152. ShapelessRecipe ironspade = new ShapelessRecipe(new ItemStack(Material.IRON_SPADE, 1));
    153. ironspade.addIngredient(Material.STONE_SPADE );
    154. ironspade.addIngredient(Material.STONE_SPADE );
    155. ironspade.addIngredient(Material.STONE_SPADE );
    156. ironspade.addIngredient(Material.STONE_SPADE );
    157.  
    158. //Gold Spade Recipe
    159. ShapelessRecipe goldspade = new ShapelessRecipe(new ItemStack(Material.GOLD_SPADE, 1));
    160. goldspade.addIngredient(Material.IRON_SPADE);
    161. goldspade.addIngredient(Material.IRON_SPADE);
    162. goldspade.addIngredient(Material.IRON_SPADE);
    163. goldspade.addIngredient(Material.IRON_SPADE);
    164. goldspade.addIngredient(Material.IRON_SPADE);
    165.  
    166. //Diamond Spade Recipe
    167. ShapelessRecipe diamondspade = new ShapelessRecipe(new ItemStack(Material.DIAMOND_SPADE, 1));
    168. diamondspade.addIngredient(Material.GOLD_SPADE);
    169. diamondspade.addIngredient(Material.GOLD_SPADE);
    170. diamondspade.addIngredient(Material.GOLD_SPADE);
    171. diamondspade.addIngredient(Material.GOLD_SPADE);
    172. diamondspade.addIngredient(Material.GOLD_SPADE);
    173. diamondspade.addIngredient(Material.GOLD_SPADE);
    174.  
    175.  
    176.  
    177. //Gold Helmet Recipe
    178. ShapelessRecipe goldhelmet = new ShapelessRecipe(new ItemStack(Material.GOLD_HELMET, 1));
    179. goldhelmet.addIngredient(Material.LEATHER_HELMET );
    180. goldhelmet.addIngredient(Material.LEATHER_HELMET );
    181. goldhelmet.addIngredient(Material.LEATHER_HELMET );
    182.  
    183. //Gold Chestplate Recipe
    184. ShapelessRecipe goldchestplate = new ShapelessRecipe(new ItemStack(Material.GOLD_CHESTPLATE, 1));
    185. goldchestplate.addIngredient(Material.LEATHER_CHESTPLATE );
    186. goldchestplate.addIngredient(Material.LEATHER_CHESTPLATE );
    187. goldchestplate.addIngredient(Material.LEATHER_CHESTPLATE );
    188.  
    189. //Gold Leggings Recipe
    190. ShapelessRecipe goldleggings = new ShapelessRecipe(new ItemStack(Material.GOLD_LEGGINGS, 1));
    191. goldleggings.addIngredient(Material.LEATHER_LEGGINGS );
    192. goldleggings.addIngredient(Material.LEATHER_LEGGINGS );
    193. goldleggings.addIngredient(Material.LEATHER_LEGGINGS );
    194.  
    195. //Gold Boots Recipe
    196. ShapelessRecipe goldboots = new ShapelessRecipe(new ItemStack(Material.GOLD_BOOTS, 1));
    197. goldboots.addIngredient(Material.LEATHER_BOOTS );
    198. goldboots.addIngredient(Material.LEATHER_BOOTS );
    199. goldboots.addIngredient(Material.LEATHER_BOOTS );
    200.  
    201.  
    202.  
    203. //Chainmail Helmet Recipe
    204. ShapelessRecipe chainmailhelmet = new ShapelessRecipe(new ItemStack(Material.CHAINMAIL_HELMET, 1));
    205. chainmailhelmet.addIngredient(Material.GOLD_HELMET );
    206. chainmailhelmet.addIngredient(Material.GOLD_HELMET );
    207. chainmailhelmet.addIngredient(Material.GOLD_HELMET );
    208. chainmailhelmet.addIngredient(Material.GOLD_HELMET );
    209.  
    210. //Chainmail Chestplate Recipe
    211. ShapelessRecipe chainmailchestplate = new ShapelessRecipe(new ItemStack(Material.CHAINMAIL_CHESTPLATE, 1));
    212. chainmailchestplate.addIngredient(Material.GOLD_CHESTPLATE );
    213. chainmailchestplate.addIngredient(Material.GOLD_CHESTPLATE );
    214. chainmailchestplate.addIngredient(Material.GOLD_CHESTPLATE );
    215. chainmailchestplate.addIngredient(Material.GOLD_CHESTPLATE );
    216.  
    217. //Chainmail Leggings Recipe
    218. ShapelessRecipe chainmailleggings = new ShapelessRecipe(new ItemStack(Material.CHAINMAIL_LEGGINGS, 1));
    219. chainmailleggings.addIngredient(Material.GOLD_LEGGINGS );
    220. chainmailleggings.addIngredient(Material.GOLD_LEGGINGS );
    221. chainmailleggings.addIngredient(Material.GOLD_LEGGINGS );
    222. chainmailleggings.addIngredient(Material.GOLD_LEGGINGS );
    223.  
    224. //Chainmail Boots Recipe
    225. ShapelessRecipe chainmailboots = new ShapelessRecipe(new ItemStack(Material.CHAINMAIL_BOOTS, 1));
    226. chainmailboots.addIngredient(Material.GOLD_BOOTS );
    227. chainmailboots.addIngredient(Material.GOLD_BOOTS );
    228. chainmailboots.addIngredient(Material.GOLD_BOOTS );
    229. chainmailboots.addIngredient(Material.GOLD_BOOTS);
    230.  
    231.  
    232. //Iron Helmet Recipe
    233. ShapelessRecipe ironhelmet = new ShapelessRecipe(new ItemStack(Material.IRON_HELMET, 1));
    234. ironhelmet.addIngredient(Material.CHAINMAIL_HELMET );
    235. ironhelmet.addIngredient(Material.CHAINMAIL_HELMET );
    236. ironhelmet.addIngredient(Material.CHAINMAIL_HELMET );
    237. ironhelmet.addIngredient(Material.CHAINMAIL_HELMET );
    238. ironhelmet.addIngredient(Material.CHAINMAIL_HELMET );
    239.  
    240. //Iron Chestplate Recipe
    241. ShapelessRecipe ironchestplate = new ShapelessRecipe(new ItemStack(Material.IRON_CHESTPLATE, 1));
    242. ironchestplate.addIngredient(Material.CHAINMAIL_CHESTPLATE );
    243. ironchestplate.addIngredient(Material.CHAINMAIL_CHESTPLATE );
    244. ironchestplate.addIngredient(Material.CHAINMAIL_CHESTPLATE );
    245. ironchestplate.addIngredient(Material.CHAINMAIL_CHESTPLATE );
    246. ironchestplate.addIngredient(Material.CHAINMAIL_CHESTPLATE );
    247.  
    248. //Iron Leggings Recipe
    249. ShapelessRecipe ironleggings = new ShapelessRecipe(new ItemStack(Material.IRON_LEGGINGS , 1));
    250. ironleggings.addIngredient(Material.CHAINMAIL_LEGGINGS );
    251. ironleggings.addIngredient(Material.CHAINMAIL_LEGGINGS );
    252. ironleggings.addIngredient(Material.CHAINMAIL_LEGGINGS );
    253. ironleggings.addIngredient(Material.CHAINMAIL_LEGGINGS );
    254. ironleggings.addIngredient(Material.CHAINMAIL_LEGGINGS );
    255.  
    256. //Iron Boots Recipe
    257. ShapelessRecipe ironboots = new ShapelessRecipe(new ItemStack(Material.IRON_BOOTS , 1));
    258. ironboots.addIngredient(Material.CHAINMAIL_BOOTS );
    259. ironboots.addIngredient(Material.CHAINMAIL_BOOTS );
    260. ironboots.addIngredient(Material.CHAINMAIL_BOOTS );
    261. ironboots.addIngredient(Material.CHAINMAIL_BOOTS );
    262. ironboots.addIngredient(Material.CHAINMAIL_BOOTS );
    263.  
    264.  
    265.  
    266. //Diamond Helmet Recipe
    267. ShapelessRecipe diamondhelmet = new ShapelessRecipe(new ItemStack(Material.DIAMOND_HELMET, 1));
    268. diamondhelmet.addIngredient(Material.IRON_HELMET );
    269. diamondhelmet.addIngredient(Material.IRON_HELMET );
    270. diamondhelmet.addIngredient(Material.IRON_HELMET );
    271. diamondhelmet.addIngredient(Material.IRON_HELMET );
    272. diamondhelmet.addIngredient(Material.IRON_HELMET );
    273. diamondhelmet.addIngredient(Material.IRON_HELMET );
    274.  
    275. //Diamond Chestplate Recipe
    276. ShapelessRecipe diamondchestplate = new ShapelessRecipe(new ItemStack(Material.DIAMOND_CHESTPLATE, 1));
    277. diamondchestplate.addIngredient(Material.IRON_CHESTPLATE );
    278. diamondchestplate.addIngredient(Material.IRON_CHESTPLATE );
    279. diamondchestplate.addIngredient(Material.IRON_CHESTPLATE );
    280. diamondchestplate.addIngredient(Material.IRON_CHESTPLATE );
    281. diamondchestplate.addIngredient(Material.IRON_CHESTPLATE );
    282. diamondchestplate.addIngredient(Material.IRON_CHESTPLATE );
    283.  
    284. //Diamond Leggings Recipe
    285. ShapelessRecipe diamondleggings = new ShapelessRecipe(new ItemStack(Material.DIAMOND_LEGGINGS, 1));
    286. diamondleggings.addIngredient(Material.IRON_LEGGINGS );
    287. diamondleggings.addIngredient(Material.IRON_LEGGINGS );
    288. diamondleggings.addIngredient(Material.IRON_LEGGINGS );
    289. diamondleggings.addIngredient(Material.IRON_LEGGINGS );
    290. diamondleggings.addIngredient(Material.IRON_LEGGINGS );
    291. diamondleggings.addIngredient(Material.IRON_LEGGINGS );
    292.  
    293. //Diamond Boots Recipe
    294. ShapelessRecipe diamondboots = new ShapelessRecipe(new ItemStack(Material.DIAMOND_BOOTS , 1));
    295. diamondboots .addIngredient(Material.IRON_BOOTS );
    296. diamondboots .addIngredient(Material.IRON_BOOTS );
    297. diamondboots .addIngredient(Material.IRON_BOOTS );
    298. diamondboots .addIngredient(Material.IRON_BOOTS );
    299. diamondboots .addIngredient(Material.IRON_BOOTS );
    300. diamondboots .addIngredient(Material.IRON_BOOTS );
    301.  
    302.  
    303.  
    304.  
    305.  
    306.  
    307.  
    308.  
    309.  
    310.  
    311.  
    312.  
    313.  
    314.  
    315.  
    316.  
    317.  
    318. getServer().addRecipe(stonesword);
    319. getServer().addRecipe(ironsword);
    320. getServer().addRecipe(goldsword);
    321. getServer().addRecipe(diamondsword);
    322.  
    323.  
    324. getServer().addRecipe(stonepa);
    325. getServer().addRecipe(ironpickaxe);
    326. getServer().addRecipe(goldpickaxe);
    327. getServer().addRecipe(diamondpickaxe);
    328.  
    329.  
    330. getServer().addRecipe(stoneaxe);
    331. getServer().addRecipe(ironaxe);
    332. getServer().addRecipe(goldaxe);
    333. getServer().addRecipe(diamondaxe);
    334.  
    335.  
    336. getServer().addRecipe(stonehoe);
    337. getServer().addRecipe(ironhoe);
    338. getServer().addRecipe(goldhoe);
    339. getServer().addRecipe(diamondhoe);
    340.  
    341.  
    342. getServer().addRecipe(stonespade);
    343. getServer().addRecipe(ironspade);
    344. getServer().addRecipe(goldspade);
    345. getServer().addRecipe(diamondspade);
    346.  
    347.  
    348. getServer().addRecipe(goldhelmet);
    349. getServer().addRecipe(goldchestplate);
    350. getServer().addRecipe(goldleggings);
    351. getServer().addRecipe(goldboots);
    352.  
    353.  
    354. getServer().addRecipe(chainmailhelmet);
    355. getServer().addRecipe(chainmailchestplate);
    356. getServer().addRecipe(chainmailleggings);
    357. getServer().addRecipe(chainmailboots);
    358.  
    359.  
    360. getServer().addRecipe(ironhelmet);
    361. getServer().addRecipe(ironchestplate);
    362. getServer().addRecipe(ironleggings);
    363. getServer().addRecipe(ironboots);
    364.  
    365.  
    366. getServer().addRecipe(diamondhelmet);
    367. getServer().addRecipe(diamondchestplate);
    368. getServer().addRecipe(diamondleggings);
    369. getServer().addRecipe(diamondboots);
    370.  
     
Thread Status:
Not open for further replies.

Share This Page