Advertisement
Guest User

Legendary Armour main

a guest
Jul 28th, 2015
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 8.35 KB | None | 0 0
  1. package me.Bryan.LegendaryArmour;
  2.  
  3. import java.util.ArrayList;
  4. import java.util.List;
  5.  
  6. import org.bukkit.ChatColor;
  7. import org.bukkit.Material;
  8. import org.bukkit.command.Command;
  9. import org.bukkit.command.CommandSender;
  10. import org.bukkit.entity.Player;
  11. import org.bukkit.inventory.ItemStack;
  12. import org.bukkit.inventory.meta.ItemMeta;
  13. import org.bukkit.plugin.java.JavaPlugin;
  14. import org.bukkit.potion.PotionEffect;
  15. import org.bukkit.potion.PotionEffectType;
  16.  
  17. public class Main extends JavaPlugin
  18. {
  19.     public void onEnable()
  20.     {
  21.        
  22.     }
  23.    
  24.     public void onDisable()
  25.     {
  26.        
  27.     }
  28.    
  29.     public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args)
  30.     {
  31.         Player player = (Player) sender;
  32.         ItemStack AegisHelm = new ItemStack(Material.GOLD_HELMET);
  33.         ItemStack AegisChestPlate = new ItemStack(Material.GOLD_CHESTPLATE);
  34.         ItemStack AegisLeggings = new ItemStack(Material.GOLD_LEGGINGS);
  35.         ItemStack AegisBoots = new ItemStack(Material.GOLD_BOOTS);
  36.         ItemMeta AegisHelmMeta = AegisHelm.getItemMeta();
  37.         ItemMeta AegisChestMeta = AegisChestPlate.getItemMeta();
  38.         ItemMeta AegisLeggingsMeta = AegisLeggings.getItemMeta();
  39.         ItemMeta AegisBootsMeta = AegisBoots.getItemMeta();
  40.        
  41.         ItemStack ApolloHelm = new ItemStack(Material.IRON_HELMET);
  42.         ItemStack ApolloChestPlate = new ItemStack(Material.IRON_CHESTPLATE);
  43.         ItemStack ApolloLeggings = new ItemStack(Material.IRON_LEGGINGS);
  44.         ItemStack ApolloBoots = new ItemStack(Material.IRON_BOOTS);
  45.         ItemMeta ApolloHelmMeta = ApolloHelm.getItemMeta();
  46.         ItemMeta ApolloChestMeta = ApolloChestPlate.getItemMeta();
  47.         ItemMeta ApolloLeggingsMeta = ApolloLeggings.getItemMeta();
  48.         ItemMeta ApolloBootsMeta = ApolloBoots.getItemMeta();
  49.        
  50.         ItemStack EtherealsHelm = new ItemStack(Material.IRON_HELMET);
  51.         ItemStack EtherealsPlate = new ItemStack(Material.IRON_CHESTPLATE);
  52.         ItemStack EtherealsLeggings = new ItemStack(Material.IRON_LEGGINGS);
  53.         ItemStack EtherealsBoots = new ItemStack(Material.IRON_BOOTS);
  54.         ItemMeta EtherealsHelmMeta = EtherealsHelm.getItemMeta();
  55.         ItemMeta EtherealsChestMeta = EtherealsPlate.getItemMeta();
  56.         ItemMeta EtherealsLeggingsMeta = EtherealsLeggings.getItemMeta();
  57.         ItemMeta EtherealsBootsMeta = EtherealsBoots.getItemMeta();
  58.        
  59.         ItemStack HermesHelm = new ItemStack(Material.DIAMOND_HELMET);
  60.         ItemStack HermesPlate = new ItemStack(Material.DIAMOND_CHESTPLATE);
  61.         ItemStack HermesLeggings = new ItemStack(Material.DIAMOND_LEGGINGS);
  62.         ItemStack HermesBoots = new ItemStack(Material.DIAMOND_BOOTS);
  63.         ItemMeta HermesHelmMeta = HermesHelm.getItemMeta();
  64.         ItemMeta HermesChestMeta = HermesPlate.getItemMeta();
  65.         ItemMeta HermesLeggingsMeta = HermesLeggings.getItemMeta();
  66.         ItemMeta HermesBootsMeta = HermesBoots.getItemMeta();
  67.        
  68.         ApolloHelmMeta.setDisplayName(ChatColor.AQUA + "Apollo Helmet");
  69.         List<String> lore = AegisHelmMeta.getLore();
  70.         lore.add(ChatColor.GREEN + "This is the helmet of Apollo Crest");
  71.         ApolloHelmMeta.setLore(lore);
  72.        
  73.         ApolloChestMeta.setDisplayName(ChatColor.AQUA + "Apollo Chestplate");
  74.         List<String> lore2 = AegisChestMeta.getLore();
  75.         lore2.add(ChatColor.GREEN + "This is the chestplate of Apollo Crest");
  76.         ApolloChestMeta.setLore(lore2);
  77.        
  78.         ApolloLeggingsMeta.setDisplayName(ChatColor.AQUA + "Apollo Leggings");
  79.         List<String> lore3 = AegisChestMeta.getLore();
  80.         lore3.add(ChatColor.GREEN + "This is the leggings of Apollo Crest");
  81.         ApolloLeggingsMeta.setLore(lore3);
  82.        
  83.         ApolloBootsMeta.setDisplayName(ChatColor.AQUA + "Apollo Boots");
  84.         List<String> lore4 = AegisChestMeta.getLore();
  85.         lore4.add(ChatColor.GREEN + "This is the boots of Apollo Crest");
  86.         ApolloBootsMeta.setLore(lore4);
  87.        
  88.         //END
  89.        
  90.         AegisHelmMeta.setDisplayName(ChatColor.GOLD + "Aegis Helmet");
  91.         List<String> lore5 = AegisHelmMeta.getLore();
  92.         lore5.add(ChatColor.GREEN + "This is the helmet of Aegis");
  93.         AegisHelmMeta.setLore(lore5);
  94.        
  95.         AegisChestMeta.setDisplayName(ChatColor.GOLD + "Aegis Chestplate");
  96.         List<String> lore6 = AegisChestMeta.getLore();
  97.         lore6.add(ChatColor.GREEN + "This is the chestplate of Aegis");
  98.         AegisChestMeta.setLore(lore6);
  99.        
  100.         AegisLeggingsMeta.setDisplayName(ChatColor.GOLD + "Aegis Leggings");
  101.         List<String> lore7 = AegisChestMeta.getLore();
  102.         lore7.add(ChatColor.GREEN + "This is the leggings of Aegis");
  103.         AegisLeggingsMeta.setLore(lore7);
  104.        
  105.         AegisBootsMeta.setDisplayName(ChatColor.GOLD + "Aegis Boots");
  106.         List<String> lore8 = AegisChestMeta.getLore();
  107.         lore8.add(ChatColor.GREEN + "This is the boots of Aegis");
  108.         AegisBootsMeta.setLore(lore8);
  109.        
  110.         //END
  111.        
  112.         EtherealsHelmMeta.setDisplayName(ChatColor.AQUA + "Ethereals Helmet");
  113.         List<String> lore9 = AegisHelmMeta.getLore();
  114.         lore9.add(ChatColor.GREEN + "This is the helmet of Ethereals");
  115.         EtherealsHelmMeta.setLore(lore9);
  116.        
  117.         EtherealsChestMeta.setDisplayName(ChatColor.AQUA + "Ethereals Chestplate");
  118.         List<String> lore10 = AegisChestMeta.getLore();
  119.         lore10.add(ChatColor.GREEN + "This is the chestplate of Ethereals");
  120.         EtherealsChestMeta.setLore(lore10);
  121.        
  122.         EtherealsLeggingsMeta.setDisplayName(ChatColor.AQUA + "Ethereals Leggings");
  123.         List<String> lore11 = AegisChestMeta.getLore();
  124.         lore11.add(ChatColor.GREEN + "This is the leggings of Ethereals");
  125.         EtherealsLeggingsMeta.setLore(lore11);
  126.        
  127.         EtherealsBootsMeta.setDisplayName(ChatColor.AQUA + "Ethereals Boots");
  128.         List<String> lore12 = AegisChestMeta.getLore();
  129.         lore12.add(ChatColor.GREEN + "This is the boots of Ethereals");
  130.         EtherealsBootsMeta.setLore(lore12);
  131.        
  132.         //END
  133.        
  134.         HermesHelmMeta.setDisplayName(ChatColor.AQUA + "Hermes Helmet");
  135.         List<String> lore13 = AegisHelmMeta.getLore();
  136.         lore13.add(ChatColor.GREEN + "This is the helmet of Hermes");
  137.         HermesHelmMeta.setLore(lore13);
  138.        
  139.         HermesChestMeta.setDisplayName(ChatColor.AQUA + "Hermes Chestplate");
  140.         List<String> lore14 = AegisChestMeta.getLore();
  141.         lore14.add(ChatColor.GREEN + "This is the chestplate of Hermes");
  142.         HermesChestMeta.setLore(lore14);
  143.        
  144.         HermesLeggingsMeta.setDisplayName(ChatColor.AQUA + "Hermes Leggings");
  145.         List<String> lore15 = AegisChestMeta.getLore();
  146.         lore15.add(ChatColor.GREEN + "This is the leggings of Hermes");
  147.         HermesLeggingsMeta.setLore(lore15);
  148.        
  149.         HermesBootsMeta.setDisplayName(ChatColor.AQUA + "Hermes Boots");
  150.         List<String> lore16 = AegisChestMeta.getLore();
  151.         lore16.add(ChatColor.GREEN + "This is the boots of Hermes");
  152.         HermesBootsMeta.setLore(lore16);
  153.        
  154.        
  155.         if(cmd.getName().equalsIgnoreCase("legend"))
  156.         {
  157.             if(args.length == 0)
  158.             {
  159.                 sender.sendMessage("Please specify what kit you want");
  160.             }
  161.             if(args.length == 1)
  162.             {
  163.                 if (args[1].equalsIgnoreCase("Aegis"))
  164.                 {
  165.                     player.getInventory().addItem(AegisHelm);
  166.                     player.getInventory().addItem(AegisChestPlate);
  167.                     player.getInventory().addItem(AegisLeggings);
  168.                     player.getInventory().addItem(AegisBoots);
  169.                     if(player.getInventory().getChestplate().equals(AegisChestPlate))
  170.                     {
  171.                         player.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, Integer.MAX_VALUE, 2));
  172.                     }
  173.                 }
  174.                
  175.                 if(args[1].equalsIgnoreCase("Crest"))
  176.                 {
  177.                     player.getInventory().addItem(ApolloHelm);
  178.                     player.getInventory().addItem(ApolloChestPlate);
  179.                     player.getInventory().addItem(ApolloLeggings);
  180.                     player.getInventory().addItem(ApolloBoots);
  181.                     if(player.getInventory().getChestplate().equals(ApolloChestPlate))
  182.                     {
  183.                         player.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, Integer.MAX_VALUE, 1));
  184.                     }
  185.                        
  186.                 }
  187.                 if(args[1].equalsIgnoreCase("Ethereals"))
  188.                 {
  189.                     player.getInventory().addItem(EtherealsHelm);
  190.                     player.getInventory().addItem(EtherealsPlate);
  191.                     player.getInventory().addItem(EtherealsLeggings);
  192.                     player.getInventory().addItem(EtherealsBoots);
  193.                     if(player.getInventory().getChestplate().equals(EtherealsPlate))
  194.                     {
  195.                         player.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1));
  196.                     }
  197.                 }
  198.                 if(args[1].equalsIgnoreCase("Hermes"))
  199.                 {
  200.                     player.getInventory().addItem(HermesHelm);
  201.                     player.getInventory().addItem(HermesPlate);
  202.                     player.getInventory().addItem(HermesLeggings);
  203.                     player.getInventory().addItem(ApolloBoots);
  204.                     if(player.getInventory().getChestplate().equals(HermesPlate))
  205.                     {
  206.                         player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 2));
  207.                     }
  208.                 }
  209.             }
  210.         }
  211.  
  212.         return false;
  213. }
  214. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement