[HELP] Wont let me export..

Discussion in 'Plugin Development' started by CraftCreeper6, Apr 23, 2014.

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

    CraftCreeper6

    Hello! I have created a plugin but it wont let me export it
    Error:
    JAR creation failed. See details for additional information.
    Class files on classpath not found or not accessible for: 'Minigame (RickyBGamez and CraftCreeper6)/src/me/CraftCreeper6/utilites/InvGUI.java'
    plugin.yml:
    name: Minigame (RickyBGamez and CraftCreeper6)
    author: CraftCreeper6
    main: me.CraftCreeper6.utilites.InvGUI
    version: 1.0
    description: TEST

    code:
    Code:java
    1. package me.CraftCreeper6.utilites;
    2.  
    3. import org.bukkit.Bukkit;
    4. import org.bukkit.ChatColor;
    5. import org.bukkit.Location;
    6. import org.bukkit.Material;
    7. import org.bukkit.enchantments.Enchantment;
    8. import org.bukkit.entity.Player;
    9. import org.bukkit.event.EventHandler;
    10. import org.bukkit.event.Listener;
    11. import org.bukkit.event.block.Action;
    12. import org.bukkit.event.inventory.InventoryClickEvent;
    13. import org.bukkit.event.player.PlayerInteractEvent;
    14. import org.bukkit.event.player.PlayerJoinEvent;
    15. import org.bukkit.inventory.Inventory;
    16. import org.bukkit.inventory.ItemStack;
    17. import org.bukkit.inventory.meta.ItemMeta;
    18. import org.bukkit.plugin.java.JavaPlugin;
    19. import org.bukkit.potion.PotionEffect;
    20. import org.bukkit.potion.PotionEffectType;
    21.  
    22. public class InvGUI extends JavaPlugin implements Listener {
    23.  
    24.  
    25. public void onEnable() {
    26.  
    27. getServer().getPluginManager().registerEvents(this , this);
    28.  
    29. System.out.print("MINIGAME ENALBED!");
    30. }
    31.  
    32. public void onDisable() {
    33. System.out.print("MINIGAME DISABLED!");
    34. }
    35.  
    36.  
    37. private void teleportInWorld(Player p, int x, int y, int z) {
    38.  
    39. p.teleport(new Location(p.getWorld(), x, y, z));
    40.  
    41. }
    42.  
    43. private void openGUI(Player p) {
    44.  
    45. Inventory inv = Bukkit.createInventory(null, 27, ChatColor.BLUE
    46. + "Kit Selector");
    47.  
    48. ItemStack tank = new ItemStack(Material.DIAMOND_CHESTPLATE);
    49. ItemMeta tankMeta = tank.getItemMeta();
    50.  
    51. ItemStack archer = new ItemStack(Material.BOW);
    52. ItemMeta archerMeta = tank.getItemMeta();
    53.  
    54. ItemStack knight = new ItemStack(Material.DIAMOND_SWORD);
    55. ItemMeta knightMeta = tank.getItemMeta();
    56.  
    57. ItemStack horse = new ItemStack(Material.HAY_BLOCK);
    58. ItemMeta horseMeta = tank.getItemMeta();
    59.  
    60. tankMeta.setDisplayName(ChatColor.RED + "TANK");
    61. tank.setItemMeta(tankMeta);
    62.  
    63. archerMeta.setDisplayName(ChatColor.RED + "ARCHER");
    64. archer.setItemMeta(archerMeta);
    65.  
    66. knightMeta.setDisplayName(ChatColor.RED + "KNIGHT");
    67. knight.setItemMeta(knightMeta);
    68.  
    69. horseMeta.setDisplayName(ChatColor.RED + "HORSE");
    70. horse.setItemMeta(horseMeta);
    71.  
    72. inv.setItem(10, tank);
    73.  
    74. inv.setItem(12, archer);
    75.  
    76. inv.setItem(14, knight);
    77.  
    78. inv.setItem(16, horse);
    79.  
    80. p.openInventory(inv);
    81.  
    82. }
    83.  
    84. @EventHandler
    85. public void onInvClick(InventoryClickEvent e){
    86.  
    87. if( !ChatColor.stripColor(e.getInventory().getName())
    88. .equalsIgnoreCase("Kit Selector"))
    89. return;
    90.  
    91. Player p = (Player) e.getWhoClicked();
    92.  
    93. e.setCancelled(true);
    94.  
    95. if(e.getCurrentItem()==null || e.getCurrentItem().getType()==Material.AIR || !e.getCurrentItem().hasItemMeta()){
    96. p.closeInventory();
    97. return;
    98. }
    99.  
    100. switch(e.getCurrentItem().getType()) {
    101.  
    102. case DIAMOND_CHESTPLATE:
    103.  
    104. p.addPotionEffect(new PotionEffect(PotionEffectType.HEALTH_BOOST, 2, 1));
    105.  
    106.  
    107. p.getInventory().clear();
    108.  
    109. teleportInWorld(p, 100, 64, 100);
    110. ItemStack tankarmorchest = new ItemStack(Material.DIAMOND_CHESTPLATE);
    111. ItemStack tankarmorhelm = new ItemStack(Material.DIAMOND_HELMET);
    112. ItemStack tankarmorleggs = new ItemStack(Material.DIAMOND_LEGGINGS);
    113. ItemStack tankarmorboots = new ItemStack(Material.DIAMOND_BOOTS);
    114. ItemStack tankarmorsword = new ItemStack(Material.IRON_SWORD);
    115. ItemStack tankarmorfood = new ItemStack(Material.COOKED_BEEF, 32);
    116.  
    117. tankarmorchest.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 1);
    118. tankarmorhelm.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 1);
    119. tankarmorleggs.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 1);
    120. tankarmorboots.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 1);
    121. tankarmorsword.addEnchantment(Enchantment.DAMAGE_ALL, 2);
    122.  
    123. p.getInventory().setHelmet(tankarmorhelm);
    124. p.getInventory().setChestplate(tankarmorchest);
    125. p.getInventory().setLeggings(tankarmorleggs);
    126. p.getInventory().setBoots(tankarmorboots);
    127.  
    128. p.getInventory().addItem(tankarmorsword);
    129. p.getInventory().addItem(tankarmorfood);
    130.  
    131. p.closeInventory();
    132.  
    133. break;
    134.  
    135.  
    136. case BOW:
    137. p.getInventory().clear();
    138.  
    139.  
    140. p.addPotionEffect(new PotionEffect(PotionEffectType.HEALTH_BOOST, 2, 1));
    141.  
    142.  
    143. teleportInWorld(p, 100, 64, 100);
    144. ItemStack archerarmorchest = new ItemStack(Material.LEATHER_CHESTPLATE);
    145. ItemStack archerarmorhelm = new ItemStack(Material.LEATHER_HELMET);
    146. ItemStack archerarmorleggs = new ItemStack(Material.LEATHER_LEGGINGS);
    147. ItemStack archerarmorboots = new ItemStack(Material.LEATHER_BOOTS);
    148. ItemStack archerarmorbow = new ItemStack(Material.BOW);
    149. ItemStack archerarmorfood = new ItemStack(Material.COOKED_BEEF, 32);
    150. ItemStack archerarrow = new ItemStack(Material.ARROW);
    151.  
    152. archerarmorchest.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 2);
    153. archerarmorhelm.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 2);
    154. archerarmorleggs.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 2);
    155. archerarmorboots.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 2);
    156. archerarmorbow.addEnchantment(Enchantment.ARROW_DAMAGE, 2);
    157. archerarmorbow.addEnchantment(Enchantment.ARROW_INFINITE, 1);
    158.  
    159. p.getInventory().setHelmet(archerarmorhelm);
    160. p.getInventory().setChestplate(archerarmorchest);
    161. p.getInventory().setLeggings(archerarmorleggs);
    162. p.getInventory().setBoots(archerarmorboots);
    163.  
    164. p.getInventory().addItem(archerarmorbow);
    165. p.getInventory().addItem(archerarmorfood);
    166. p.getInventory().addItem(archerarrow);
    167.  
    168. p.closeInventory();
    169.  
    170.  
    171. break;
    172.  
    173. case DIAMOND_SWORD:
    174.  
    175. p.getInventory().clear();
    176.  
    177. p.addPotionEffect(new PotionEffect(PotionEffectType.HEALTH_BOOST, 2, 1));
    178.  
    179.  
    180. teleportInWorld(p, 100, 64, 100);
    181. ItemStack knightarmorchest = new ItemStack(Material.IRON_CHESTPLATE);
    182. ItemStack knightarmorhelm = new ItemStack(Material.IRON_HELMET);
    183. ItemStack knightarmorleggs = new ItemStack(Material.IRON_LEGGINGS);
    184. ItemStack knightarmorboots = new ItemStack(Material.IRON_BOOTS);
    185. ItemStack knightarmorsword = new ItemStack(Material.DIAMOND_SWORD);
    186. ItemStack knightarmorfood = new ItemStack(Material.COOKED_BEEF, 32);
    187.  
    188. knightarmorchest.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 2);
    189. knightarmorhelm.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 2);
    190. knightarmorleggs.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 2);
    191. knightarmorboots.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 2);
    192. knightarmorsword.addEnchantment(Enchantment.DAMAGE_ALL, 1);
    193. knightarmorsword.addEnchantment(Enchantment.KNOCKBACK, 1);
    194.  
    195.  
    196. p.getInventory().setHelmet(knightarmorhelm);
    197. p.getInventory().setChestplate(knightarmorchest);
    198. p.getInventory().setLeggings(knightarmorleggs);
    199. p.getInventory().setBoots(knightarmorboots);
    200.  
    201. p.getInventory().addItem(knightarmorsword);
    202. p.getInventory().addItem(knightarmorfood);
    203.  
    204. p.closeInventory();
    205.  
    206.  
    207. break;
    208.  
    209. case HAY_BLOCK:
    210.  
    211. p.getInventory().clear();
    212.  
    213. p.addPotionEffect(new PotionEffect(PotionEffectType.HEALTH_BOOST, 2, 1));
    214.  
    215.  
    216.  
    217. teleportInWorld(p, 100, 64, 100);
    218. ItemStack horsearmorchest = new ItemStack(Material.IRON_CHESTPLATE);
    219. ItemStack horsearmorhelm = new ItemStack(Material.IRON_HELMET);
    220. ItemStack horsearmorleggs = new ItemStack(Material.IRON_LEGGINGS);
    221. ItemStack horsearmorboots = new ItemStack(Material.IRON_BOOTS);
    222. ItemStack horsearmorsword = new ItemStack(Material.IRON_SWORD);
    223. ItemStack horsearmorfood = new ItemStack(Material.COOKED_BEEF, 32);
    224.  
    225. horsearmorchest.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 2);
    226. horsearmorhelm.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 2);
    227. horsearmorleggs.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 2);
    228. horsearmorboots.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 2);
    229. horsearmorsword.addEnchantment(Enchantment.DAMAGE_ALL, 3);
    230.  
    231. p.getInventory().setHelmet(horsearmorhelm);
    232. p.getInventory().setChestplate(horsearmorchest);
    233. p.getInventory().setLeggings(horsearmorleggs);
    234. p.getInventory().setBoots(horsearmorboots);
    235.  
    236. p.getInventory().addItem(horsearmorsword);
    237. p.getInventory().addItem(horsearmorfood);
    238.  
    239. p.closeInventory();
    240.  
    241.  
    242. break;
    243. default:
    244. break;
    245. }
    246.  
    247. }
    248.  
    249. @EventHandler
    250. public void onJoin(PlayerJoinEvent e) {
    251. e.getPlayer().getInventory().addItem(new ItemStack(Material.COMPASS));
    252. }
    253.  
    254. @EventHandler
    255. public void Interact(PlayerInteractEvent e) {
    256.  
    257. Action a = e.getAction();
    258. ItemStack is = e.getItem();
    259.  
    260. if (a == Action.PHYSICAL || is == null || is.getType() == Material.AIR)
    261. return;
    262.  
    263. if (is.getType() == Material.COMPASS){
    264. openGUI(e.getPlayer());
    265. }
    266. }
    267. }

    Any help appreciated :D
     
  2. Offline

    ko47374737

    "This may or may not help :D" Well you need to right click your project and click refresh then it should work because this is what happens to me
     
  3. Offline

    CraftCreeper6

    ko47374737
    I unfortunately already did this several times and it did not work:/
     
  4. Offline

    ko47374737

    CraftCreeper6
    Did you check all your classes for any underlines?
     
  5. Offline

    CraftCreeper6

    ko47374737
    Yup, I think one of the problems is that all my Projects got deleted for some reason and I had to Share Projects (Saros) with someone to get it back, that may be the problem, I will let them try and export it
     
  6. Offline

    ko47374737

    CraftCreeper6
    Maybe just copy all the code and make a new project and paste it there?
     
    CraftCreeper6 likes this.
  7. Offline

    CraftCreeper6

  8. Offline

    ko47374737

    CraftCreeper6
    Lol first time i actually took my time to help someone :p xD Got skype ?
     
  9. Offline

    CraftCreeper6

Thread Status:
Not open for further replies.

Share This Page