Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 18.41 KB | None | 0 0
  1. package fr.alexousd.pvp;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.Material;
  5. import org.bukkit.SkullType;
  6. import org.bukkit.enchantments.Enchantment;
  7. import org.bukkit.entity.Player;
  8. import org.bukkit.event.EventHandler;
  9. import org.bukkit.event.Listener;
  10. import org.bukkit.event.inventory.InventoryClickEvent;
  11. import org.bukkit.event.player.PlayerDropItemEvent;
  12. import org.bukkit.event.player.PlayerInteractEvent;
  13. import org.bukkit.event.player.PlayerJoinEvent;
  14. import org.bukkit.inventory.Inventory;
  15. import org.bukkit.inventory.ItemStack;
  16. import org.bukkit.inventory.meta.ItemMeta;
  17. import org.bukkit.inventory.meta.SkullMeta;
  18.  
  19. public class pListener implements Listener {
  20.    
  21.     static int task;
  22.    
  23.     @EventHandler
  24.     public void onJoin(PlayerJoinEvent e) {
  25.         Player p = (Player) e.getPlayer();
  26.        
  27.         /*
  28.          * Items quand le joueur rejoint le serveur
  29.          */
  30.        
  31.         ItemStack epee = new ItemStack(Material.IRON_SWORD);
  32.         ItemMeta epeeMeta = epee.getItemMeta();
  33.         epeeMeta.setDisplayName("§6PvP Vanilla");
  34.         epee.setItemMeta(epeeMeta);
  35.        
  36.         ItemStack heal = new ItemStack(Material.POTION, 1, (short) 8261);
  37.         ItemMeta healMeta = heal.getItemMeta();
  38.         healMeta.setDisplayName("§6PvP Potion");
  39.         heal.setItemMeta(healMeta);
  40.        
  41.         ItemStack head = new ItemStack(Material.SKULL_ITEM, 1, (short)SkullType.PLAYER.ordinal());
  42.         SkullMeta meta = (SkullMeta)head.getItemMeta();
  43.         meta.setOwner(p.getName());
  44.         meta.setDisplayName("§6Statistiques");
  45.         head.setItemMeta(meta);
  46.        
  47.         ItemStack soup = new ItemStack(Material.MUSHROOM_SOUP);
  48.         ItemMeta soupMeta = soup.getItemMeta();
  49.         soupMeta.setDisplayName("§6PvP Soupe");
  50.         soup.setItemMeta(soupMeta);
  51.        
  52.         ItemStack golden_apple = new ItemStack(Material.GOLDEN_APPLE);
  53.         ItemMeta golden_appleMeta = golden_apple.getItemMeta();
  54.         golden_appleMeta.setDisplayName("§6PvP Hardcore");
  55.         golden_apple.setItemMeta(golden_appleMeta);
  56.        
  57.         p.getInventory().setItem(0, epee);
  58.         p.getInventory().setItem(2, heal);
  59.         p.getInventory().setItem(4, head);
  60.         p.getInventory().setItem(6, soup);
  61.         p.getInventory().setItem(8, golden_apple);
  62.     }
  63.    
  64.     @EventHandler
  65.     public void onDrop(PlayerDropItemEvent e) {
  66.         /*
  67.          * Supprime les drops
  68.          */
  69.         if (e.getItemDrop().getItemStack().getItemMeta().getDisplayName().equalsIgnoreCase("§6PvP Vanilla")) {
  70.             e.setCancelled(true);
  71.         }
  72.         if (e.getItemDrop().getItemStack().getItemMeta().getDisplayName().equalsIgnoreCase("§6PvP Potion")) {
  73.             e.setCancelled(true);
  74.         }
  75.         if (e.getItemDrop().getItemStack().getItemMeta().getDisplayName().equalsIgnoreCase("§6Statistiques")) {
  76.             e.setCancelled(true);
  77.         }
  78.         if (e.getItemDrop().getItemStack().getItemMeta().getDisplayName().equalsIgnoreCase("§6PvP Soupe")) {
  79.             e.setCancelled(true);
  80.         }
  81.         if (e.getItemDrop().getItemStack().getItemMeta().getDisplayName().equalsIgnoreCase("§6PvP Hardcore")) {
  82.             e.setCancelled(true);
  83.         }
  84.     }
  85.    
  86.     @EventHandler
  87.     public void onInventoryClick(InventoryClickEvent e) {
  88.         Player p = (Player) e.getWhoClicked();
  89.         switch (e.getCurrentItem().getType()) {
  90.         case IRON_SWORD:
  91.             if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§6PvP Vanilla")) {
  92.                 e.setCancelled(true);
  93.                 menu(p);
  94.                 /*
  95.                  * En cliquant sur l'épée en fer, le menu principal s'ouvre
  96.                  * (Mis en place)
  97.                  */
  98.             }
  99.             break;
  100.            default:
  101.             break;
  102.         }
  103.         switch (e.getCurrentItem().getType()) {
  104.         case POTION:
  105.             if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§6PvP Potion")) {
  106.                 e.setCancelled(true);
  107.                 menu(p);
  108.                 /*
  109.                  * En cliquant sur la potion de heal, le menu principal s'ouvre
  110.                  * (Mis en place)
  111.                  */
  112.             }
  113.             break;
  114.            default:
  115.             break;
  116.         }
  117.         switch (e.getCurrentItem().getType()) {
  118.         case SKULL_ITEM:
  119.             if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§a1vs1")) {
  120.                 e.setCancelled(true);
  121.                 menu1vs1(p);
  122.                 /*
  123.                  * Le menu 1vs1 s'ouvre
  124.                  * (Mis en place)
  125.                  */
  126.             }
  127.             if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§a2vs2")) {
  128.                 e.setCancelled(true);
  129.                 menu2vs2(p);
  130.                 /*
  131.                  * Le menu 2vs2 s'ouvre
  132.                  * (Mis en place)
  133.                  */
  134.             }
  135.             if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§a3vs3")) {
  136.                 e.setCancelled(true);
  137.                 menu3vs3(p);
  138.                 /*
  139.                  * Le menu 3vs3 s'ouvre
  140.                  * (Mis en place)
  141.                  */
  142.             }
  143.             if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§6Statistiques")) {
  144.                 e.setCancelled(true);
  145.                 p.closeInventory();
  146.                 p.sendMessage("§c§oLes statistiques ne sont pas encore mis en place...");
  147.                 /*
  148.                  * En cliquant sur la tête statistiques, ça lui dit dans le chat combien de coins il a, combien de kills il a fait
  149.                  * (Pas mis en place)
  150.                  */
  151.             }
  152.             break;
  153.            default:
  154.             break;
  155.         }
  156.         switch (e.getCurrentItem().getType()) {
  157.         case MUSHROOM_SOUP:
  158.             if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§6PvP Soupe")) {
  159.                 e.setCancelled(true);
  160.                 menu(p);
  161.                 /*
  162.                  * En cliquant sur la soupe, le menu principal s'ouvre
  163.                  * (Mis en place)
  164.                  */
  165.             }
  166.             break;
  167.            default:
  168.             break;
  169.         }
  170.         switch (e.getCurrentItem().getType()) {
  171.         case GOLDEN_APPLE:
  172.             if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§6PvP Hardcore")) {
  173.                 e.setCancelled(true);
  174.                 menu(p);
  175.                 /*
  176.                  * En cliquant sur la golden apple, le menu principal s'ouvre
  177.                  * (Mis en place)
  178.                  */
  179.             }
  180.             break;
  181.            default:
  182.             break;
  183.         }
  184.         switch (e.getCurrentItem().getType()) {
  185.         case BOW:
  186.             if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§bBowPvP §7(1vs1)")) {
  187.                 e.setCancelled(true);
  188.                 p.closeInventory();
  189.                 /*
  190.                  * Le joueur rejoint la file d'attente en cliquant sur l'arc "BowPvP"
  191.                  * (Pas mis en place)
  192.                  */
  193.                
  194.             }
  195.             break;
  196.            default:
  197.             break;
  198.         }
  199.     }
  200.    
  201.     public static void fileAttente(Player p) {
  202.         task = Bukkit.getScheduler().scheduleSyncRepeatingTask(Bukkit.getPluginManager().getPlugin("AscensionPvP"), new Runnable() {
  203.            
  204.             @Override
  205.             public void run() {
  206.                 // TODO Auto-generated method stub
  207.                
  208.             }
  209.         }, 20, 20);
  210.     }
  211.    
  212.     @EventHandler
  213.     public void onInteract(PlayerInteractEvent e) {
  214.         Player p = (Player) e.getPlayer();
  215.        
  216.         if (e.getItem().getItemMeta().getDisplayName().equalsIgnoreCase("§6PvP Vanilla")) {
  217.             e.setCancelled(true);
  218.             menu(p);
  219.             /*
  220.              * En interagissant avec l'item nommé "PvP Vanilla" le menu principal s'ouvre.
  221.              */
  222.         }
  223.         if (e.getItem().getItemMeta().getDisplayName().equalsIgnoreCase("§6PvP Potion")) {
  224.             e.setCancelled(true);
  225.             menu(p);
  226.             /*
  227.              * En interagissant avec l'item nommé "PvP Potion" le menu principal s'ouvre.
  228.              */
  229.         }
  230.         if (e.getItem().getItemMeta().getDisplayName().equalsIgnoreCase("§6PvP Soupe")) {
  231.             e.setCancelled(true);
  232.             menu(p);
  233.             /*
  234.              * En interagissant avec l'item nommé "PvP Soupe" le menu principal s'ouvre.
  235.              */
  236.         }
  237.         if (e.getItem().getItemMeta().getDisplayName().equalsIgnoreCase("§6PvP Hardcore")) {
  238.             e.setCancelled(true);
  239.             menu(p);
  240.             /*
  241.              * En interagissant avec l'item nommé "PvP Hardcore" le menu principal s'ouvre.
  242.              */
  243.         }
  244.         if (e.getItem().getItemMeta().getDisplayName().equalsIgnoreCase("§6Statistiques")) {
  245.             e.setCancelled(true);
  246.             p.sendMessage("§c§oLes statistiques ne sont pas encore mis en place...");
  247.             /*
  248.              * En interagissant avec l'item nommé "Statistiques" un message est envoyé au joueur qui lui dit son nombre de kills ainsi que ses coins et ses victoires.
  249.              */
  250.         }
  251.     }
  252.    
  253.     public void menu(Player p) {
  254.         /*
  255.          *  Menu principal
  256.          */
  257.         Inventory menu = Bukkit.createInventory(null, 27, "");
  258.        
  259.         /*
  260.          * 1vs1
  261.          */
  262.         ItemStack vs1 = new ItemStack(Material.SKULL_ITEM, 1, (short)SkullType.PLAYER.ordinal());
  263.         SkullMeta meta = (SkullMeta)vs1.getItemMeta();
  264.         meta.setOwner(p.getName());
  265.         meta.setDisplayName("§a1vs1");
  266.         vs1.setItemMeta(meta);
  267.         menu.setItem(11, vs1);
  268.        
  269.         /*
  270.          * 2vs2
  271.          */
  272.         ItemStack vs2 = new ItemStack(Material.SKULL_ITEM, 2, (short)SkullType.PLAYER.ordinal());
  273.         SkullMeta meta2 = (SkullMeta)vs2.getItemMeta();
  274.         meta2.setOwner(p.getName());
  275.         meta2.setDisplayName("§a2vs2");
  276.         vs2.setItemMeta(meta2);
  277.         menu.setItem(13, vs2);
  278.        
  279.         /*
  280.          * 3vs3
  281.          */
  282.         ItemStack vs3 = new ItemStack(Material.SKULL_ITEM, 3, (short)SkullType.PLAYER.ordinal());
  283.         SkullMeta meta3 = (SkullMeta)vs3.getItemMeta();
  284.         meta3.setOwner(p.getName());
  285.         meta3.setDisplayName("§a3vs3");
  286.         vs3.setItemMeta(meta3);
  287.         menu.setItem(15, vs3);
  288.        
  289.         p.openInventory(menu);
  290.     }
  291.    
  292.     public void menu1vs1(Player p) {
  293.         /*
  294.          * Menu du 1vs1
  295.          */
  296.         Inventory menu1vs1 = Bukkit.createInventory(null, 27, "");
  297.        
  298.         ItemStack bowpvp = new ItemStack(Material.BOW);
  299.         ItemMeta bowpvpMeta = bowpvp.getItemMeta();
  300.         bowpvpMeta.setDisplayName("§bBowPvP §7(1vs1)");
  301.         bowpvp.setItemMeta(bowpvpMeta);
  302.         menu1vs1.setItem(0, bowpvp);
  303.        
  304.         ItemStack axepvp = new ItemStack(Material.IRON_AXE);
  305.         ItemMeta axepvpMeta = axepvp.getItemMeta();
  306.         axepvpMeta.setDisplayName("§bAxe PvP §7(1vs1)");
  307.         axepvp.setItemMeta(axepvpMeta);
  308.         menu1vs1.setItem(1, axepvp);
  309.        
  310.         ItemStack ironpvp = new ItemStack(Material.IRON_CHESTPLATE);
  311.         ironpvp.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 2);
  312.         ItemMeta ironpvpMeta = ironpvp.getItemMeta();
  313.         ironpvpMeta.setDisplayName("§bIron PvP §7(1vs1)");
  314.         ironpvp.setItemMeta(ironpvpMeta);
  315.         menu1vs1.setItem(2, ironpvp);
  316.        
  317.         ItemStack ironpvpno = new ItemStack(Material.IRON_CHESTPLATE);
  318.         ItemMeta ironpvpnoMeta = ironpvpno.getItemMeta();
  319.         ironpvpnoMeta.setDisplayName("§bIron PvP (No Enchant) §7(1vs1)");
  320.         ironpvpno.setItemMeta(ironpvpnoMeta);
  321.         menu1vs1.setItem(3, ironpvpno);
  322.        
  323.         ItemStack diamondpvp = new ItemStack(Material.DIAMOND_CHESTPLATE);
  324.         diamondpvp.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 1);
  325.         ItemMeta diamondpvpMeta = diamondpvp.getItemMeta();
  326.         diamondpvpMeta.setDisplayName("§bDiamond PvP §7(1vs1)");
  327.         diamondpvp.setItemMeta(diamondpvpMeta);
  328.         menu1vs1.setItem(4, diamondpvp);
  329.        
  330.         ItemStack diamondpvpno = new ItemStack(Material.DIAMOND_CHESTPLATE);
  331.         ItemMeta diamondpvpnoMeta = diamondpvpno.getItemMeta();
  332.         diamondpvpnoMeta.setDisplayName("§bDiamond PvP (No Enchant) §7(1vs1)");
  333.         diamondpvpno.setItemMeta(diamondpvpnoMeta);
  334.         menu1vs1.setItem(5, diamondpvpno);
  335.        
  336.         ItemStack diamondcheat = new ItemStack(Material.DIAMOND_SWORD);
  337.         diamondcheat.addEnchantment(Enchantment.DAMAGE_ALL, 2);
  338.         ItemMeta diamondcheatMeta = diamondcheat.getItemMeta();
  339.         diamondcheatMeta.setDisplayName("§bDiamond Cheat §7(1vs1)");
  340.         diamondcheat.setItemMeta(diamondcheatMeta);
  341.         menu1vs1.setItem(6, diamondcheat);
  342.        
  343.         ItemStack ironcheat = new ItemStack(Material.IRON_SWORD);
  344.         ironcheat.addEnchantment(Enchantment.DAMAGE_ALL, 2);
  345.         ItemMeta ironcheatMeta = ironcheat.getItemMeta();
  346.         ironcheatMeta.setDisplayName("§bIron Cheat §7(1vs1)");
  347.         ironcheat.setItemMeta(ironcheatMeta);
  348.         menu1vs1.setItem(7, ironcheat);
  349.        
  350.         ItemStack pvpcheat = new ItemStack(Material.DIAMOND_BLOCK);
  351.         ItemMeta pvpcheatMeta = pvpcheat.getItemMeta();
  352.         pvpcheatMeta.setDisplayName("§bIron Cheat §7(1vs1)");
  353.         pvpcheat.setItemMeta(pvpcheatMeta);
  354.         menu1vs1.setItem(8, pvpcheat);
  355.        
  356.         ItemStack oneshot = new ItemStack(Material.BOW);
  357.         oneshot.addEnchantment(Enchantment.ARROW_INFINITE, 1);
  358.         ItemMeta oneshotMeta = oneshot.getItemMeta();
  359.         oneshotMeta.setDisplayName("§bOne Shot §7(1vs1)");
  360.         oneshot.setItemMeta(oneshotMeta);
  361.         menu1vs1.setItem(9, oneshot);
  362.        
  363.         ItemStack mortsubite = new ItemStack(Material.IRON_SWORD);
  364.         mortsubite.addEnchantment(Enchantment.DAMAGE_ALL, 1);
  365.         ItemMeta mortsubiteMeta = mortsubite.getItemMeta();
  366.         mortsubiteMeta.setDisplayName("§bMort Subite §7(1vs1)");
  367.         mortsubite.setItemMeta(mortsubiteMeta);
  368.         menu1vs1.setItem(10, mortsubite);
  369.        
  370.         p.openInventory(menu1vs1);
  371.     }
  372.    
  373.     public void menu2vs2(Player p) {
  374.         /*
  375.          * Menu du 2vs2
  376.          */
  377.         Inventory menu2vs2 = Bukkit.createInventory(null, 27, "");
  378.        
  379.         ItemStack bowpvp = new ItemStack(Material.BOW);
  380.         ItemMeta bowpvpMeta = bowpvp.getItemMeta();
  381.         bowpvpMeta.setDisplayName("§bBowPvP §7(2vs2)");
  382.         bowpvp.setItemMeta(bowpvpMeta);
  383.         menu2vs2.setItem(0, bowpvp);
  384.        
  385.         ItemStack axepvp = new ItemStack(Material.IRON_AXE);
  386.         ItemMeta axepvpMeta = axepvp.getItemMeta();
  387.         axepvpMeta.setDisplayName("§bAxe PvP §7(2vs2)");
  388.         axepvp.setItemMeta(axepvpMeta);
  389.         menu2vs2.setItem(1, axepvp);
  390.        
  391.         ItemStack ironpvp = new ItemStack(Material.IRON_CHESTPLATE);
  392.         ironpvp.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 2);
  393.         ItemMeta ironpvpMeta = ironpvp.getItemMeta();
  394.         ironpvpMeta.setDisplayName("§bIron PvP §7(2vs2)");
  395.         ironpvp.setItemMeta(ironpvpMeta);
  396.         menu2vs2.setItem(2, ironpvp);
  397.        
  398.         ItemStack ironpvpno = new ItemStack(Material.IRON_CHESTPLATE);
  399.         ItemMeta ironpvpnoMeta = ironpvpno.getItemMeta();
  400.         ironpvpnoMeta.setDisplayName("§bIron PvP (No Enchant) §7(2vs2)");
  401.         ironpvpno.setItemMeta(ironpvpnoMeta);
  402.         menu2vs2.setItem(3, ironpvpno);
  403.        
  404.         ItemStack diamondpvp = new ItemStack(Material.DIAMOND_CHESTPLATE);
  405.         diamondpvp.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 1);
  406.         ItemMeta diamondpvpMeta = diamondpvp.getItemMeta();
  407.         diamondpvpMeta.setDisplayName("§bDiamond PvP §7(2vs2)");
  408.         diamondpvp.setItemMeta(diamondpvpMeta);
  409.         menu2vs2.setItem(4, diamondpvp);
  410.        
  411.         ItemStack diamondpvpno = new ItemStack(Material.DIAMOND_CHESTPLATE);
  412.         ItemMeta diamondpvpnoMeta = diamondpvpno.getItemMeta();
  413.         diamondpvpnoMeta.setDisplayName("§bDiamond PvP (No Enchant) §7(2vs2)");
  414.         diamondpvpno.setItemMeta(diamondpvpnoMeta);
  415.         menu2vs2.setItem(5, diamondpvpno);
  416.        
  417.         ItemStack diamondcheat = new ItemStack(Material.DIAMOND_SWORD);
  418.         diamondcheat.addEnchantment(Enchantment.DAMAGE_ALL, 2);
  419.         ItemMeta diamondcheatMeta = diamondcheat.getItemMeta();
  420.         diamondcheatMeta.setDisplayName("§bDiamond Cheat §7(2vs2)");
  421.         diamondcheat.setItemMeta(diamondcheatMeta);
  422.         menu2vs2.setItem(6, diamondcheat);
  423.        
  424.         ItemStack ironcheat = new ItemStack(Material.IRON_SWORD);
  425.         ironcheat.addEnchantment(Enchantment.DAMAGE_ALL, 2);
  426.         ItemMeta ironcheatMeta = ironcheat.getItemMeta();
  427.         ironcheatMeta.setDisplayName("§bIron Cheat §7(2vs2)");
  428.         ironcheat.setItemMeta(ironcheatMeta);
  429.         menu2vs2.setItem(7, ironcheat);
  430.        
  431.         ItemStack pvpcheat = new ItemStack(Material.DIAMOND_BLOCK);
  432.         ItemMeta pvpcheatMeta = pvpcheat.getItemMeta();
  433.         pvpcheatMeta.setDisplayName("§bIron Cheat §7(2vs2)");
  434.         pvpcheat.setItemMeta(pvpcheatMeta);
  435.         menu2vs2.setItem(8, pvpcheat);
  436.        
  437.         ItemStack oneshot = new ItemStack(Material.BOW);
  438.         oneshot.addEnchantment(Enchantment.ARROW_INFINITE, 1);
  439.         ItemMeta oneshotMeta = oneshot.getItemMeta();
  440.         oneshotMeta.setDisplayName("§bOne Shot §7(2vs2)");
  441.         oneshot.setItemMeta(oneshotMeta);
  442.         menu2vs2.setItem(9, oneshot);
  443.        
  444.         ItemStack mortsubite = new ItemStack(Material.IRON_SWORD);
  445.         mortsubite.addEnchantment(Enchantment.DAMAGE_ALL, 1);
  446.         ItemMeta mortsubiteMeta = mortsubite.getItemMeta();
  447.         mortsubiteMeta.setDisplayName("§bMort Subite §7(2vs2)");
  448.         mortsubite.setItemMeta(mortsubiteMeta);
  449.         menu2vs2.setItem(10, mortsubite);
  450.        
  451.         p.openInventory(menu2vs2);
  452.     }
  453.    
  454.     public void menu3vs3(Player p) {
  455.         /*
  456.          * Menu du 3vs3
  457.          */
  458.         Inventory menu3vs3 = Bukkit.createInventory(null, 27, "");
  459.        
  460.         ItemStack bowpvp = new ItemStack(Material.BOW);
  461.         ItemMeta bowpvpMeta = bowpvp.getItemMeta();
  462.         bowpvpMeta.setDisplayName("§bBowPvP §7(3vs3)");
  463.         bowpvp.setItemMeta(bowpvpMeta);
  464.         menu3vs3.setItem(0, bowpvp);
  465.        
  466.         ItemStack axepvp = new ItemStack(Material.IRON_AXE);
  467.         ItemMeta axepvpMeta = axepvp.getItemMeta();
  468.         axepvpMeta.setDisplayName("§bAxe PvP §7(3vs3)");
  469.         axepvp.setItemMeta(axepvpMeta);
  470.         menu3vs3.setItem(1, axepvp);
  471.        
  472.         ItemStack ironpvp = new ItemStack(Material.IRON_CHESTPLATE);
  473.         ironpvp.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 2);
  474.         ItemMeta ironpvpMeta = ironpvp.getItemMeta();
  475.         ironpvpMeta.setDisplayName("§bIron PvP §7(3vs3)");
  476.         ironpvp.setItemMeta(ironpvpMeta);
  477.         menu3vs3.setItem(2, ironpvp);
  478.        
  479.         ItemStack ironpvpno = new ItemStack(Material.IRON_CHESTPLATE);
  480.         ItemMeta ironpvpnoMeta = ironpvpno.getItemMeta();
  481.         ironpvpnoMeta.setDisplayName("§bIron PvP (No Enchant) §7(3vs3)");
  482.         ironpvpno.setItemMeta(ironpvpnoMeta);
  483.         menu3vs3.setItem(3, ironpvpno);
  484.        
  485.         ItemStack diamondpvp = new ItemStack(Material.DIAMOND_CHESTPLATE);
  486.         diamondpvp.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, 1);
  487.         ItemMeta diamondpvpMeta = diamondpvp.getItemMeta();
  488.         diamondpvpMeta.setDisplayName("§bDiamond PvP §7(3vs3)");
  489.         diamondpvp.setItemMeta(diamondpvpMeta);
  490.         menu3vs3.setItem(4, diamondpvp);
  491.        
  492.         ItemStack diamondpvpno = new ItemStack(Material.DIAMOND_CHESTPLATE);
  493.         ItemMeta diamondpvpnoMeta = diamondpvpno.getItemMeta();
  494.         diamondpvpnoMeta.setDisplayName("§bDiamond PvP (No Enchant) §7(3vs3)");
  495.         diamondpvpno.setItemMeta(diamondpvpnoMeta);
  496.         menu3vs3.setItem(5, diamondpvpno);
  497.        
  498.         ItemStack diamondcheat = new ItemStack(Material.DIAMOND_SWORD);
  499.         diamondcheat.addEnchantment(Enchantment.DAMAGE_ALL, 2);
  500.         ItemMeta diamondcheatMeta = diamondcheat.getItemMeta();
  501.         diamondcheatMeta.setDisplayName("§bDiamond Cheat §7(3vs3)");
  502.         diamondcheat.setItemMeta(diamondcheatMeta);
  503.         menu3vs3.setItem(6, diamondcheat);
  504.        
  505.         ItemStack ironcheat = new ItemStack(Material.IRON_SWORD);
  506.         ironcheat.addEnchantment(Enchantment.DAMAGE_ALL, 2);
  507.         ItemMeta ironcheatMeta = ironcheat.getItemMeta();
  508.         ironcheatMeta.setDisplayName("§bIron Cheat §7(3vs3)");
  509.         ironcheat.setItemMeta(ironcheatMeta);
  510.         menu3vs3.setItem(7, ironcheat);
  511.        
  512.         ItemStack pvpcheat = new ItemStack(Material.DIAMOND_BLOCK);
  513.         ItemMeta pvpcheatMeta = pvpcheat.getItemMeta();
  514.         pvpcheatMeta.setDisplayName("§bIron Cheat §7(3vs3)");
  515.         pvpcheat.setItemMeta(pvpcheatMeta);
  516.         menu3vs3.setItem(8, pvpcheat);
  517.        
  518.         ItemStack oneshot = new ItemStack(Material.BOW);
  519.         oneshot.addEnchantment(Enchantment.ARROW_INFINITE, 1);
  520.         ItemMeta oneshotMeta = oneshot.getItemMeta();
  521.         oneshotMeta.setDisplayName("§bOne Shot §7(3vs3)");
  522.         oneshot.setItemMeta(oneshotMeta);
  523.         menu3vs3.setItem(9, oneshot);
  524.        
  525.         ItemStack mortsubite = new ItemStack(Material.IRON_SWORD);
  526.         mortsubite.addEnchantment(Enchantment.DAMAGE_ALL, 1);
  527.         ItemMeta mortsubiteMeta = mortsubite.getItemMeta();
  528.         mortsubiteMeta.setDisplayName("§bMort Subite §7(3vs3)");
  529.         mortsubite.setItemMeta(mortsubiteMeta);
  530.         menu3vs3.setItem(10, mortsubite);
  531.        
  532.         p.openInventory(menu3vs3);
  533.     }
  534. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement