Advertisement
Guest User

Untitled

a guest
Sep 16th, 2013
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.66 KB | None | 0 0
  1.     public void checkKit( final Player p )
  2.     {
  3.    
  4.             ItemStack[] playerArmor = p.getInventory().getArmorContents();
  5.     if( getCustomName(p.getPlayer().getItemInHand()) != null &&
  6.             getCustomName(p.getPlayer().getItemInHand()).equalsIgnoreCase("Zeroxes Doombringer")
  7.             && getCustomName(playerArmor[3]) != null &&
  8.             getCustomName(playerArmor[3]).equalsIgnoreCase("Zeroxes Bone Visage")
  9.             && getCustomName(playerArmor[2]) != null &&
  10.             getCustomName(playerArmor[2]).equalsIgnoreCase("Zeroxes Shadow Plate")
  11.             && getCustomName(playerArmor[1]) != null &&
  12.             getCustomName(playerArmor[1]).equalsIgnoreCase("Zeroxes Platelegs")
  13.             && getCustomName(playerArmor[0]) != null &&
  14.             getCustomName(playerArmor[0]).equalsIgnoreCase("Zeroxes Battle Boots") )
  15.     {
  16.        
  17.     p.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, Integer.MAX_VALUE,1));
  18.  
  19.     // End Zerox Set
  20.     }
  21.     else if( getCustomName(p.getPlayer().getItemInHand()) != null &&
  22.             getCustomName(p.getPlayer().getItemInHand()).equalsIgnoreCase("Tathalyns Windshear")
  23.             && getCustomName(playerArmor[3]) != null &&
  24.             getCustomName(playerArmor[3]).equalsIgnoreCase("Tathalyns Hawk eye")
  25.             && getCustomName(playerArmor[2]) != null &&
  26.             getCustomName(playerArmor[2]).equalsIgnoreCase("Tathalyns Fleece")
  27.         && getCustomName(playerArmor[1]) != null &&
  28.         getCustomName(playerArmor[1]).equalsIgnoreCase("Tathalyns Spiked Stockings")
  29.         && getCustomName(playerArmor[0]) != null &&
  30.         getCustomName(playerArmor[0]).equalsIgnoreCase("Tathalyns Boots of Mobility") )
  31.     {
  32.        
  33.                
  34.     p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE,0));
  35.     p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, Integer.MAX_VALUE,0));
  36.    
  37.    
  38.     }
  39.  
  40.    
  41.     else if( getCustomName(p.getPlayer().getItemInHand()) != null &&
  42.             getCustomName(p.getPlayer().getItemInHand()).equalsIgnoreCase("Mazurels Elegant Blade")
  43.             && getCustomName(playerArmor[3]) != null &&
  44.             getCustomName(playerArmor[3]).equalsIgnoreCase("Mazurels Winged Helmet")
  45.             && getCustomName(playerArmor[2]) != null &&
  46.             getCustomName(playerArmor[2]).equalsIgnoreCase("Mazurels Embossed Plate")
  47.         && getCustomName(playerArmor[1]) != null &&
  48.         getCustomName(playerArmor[1]).equalsIgnoreCase("Mazurels Legs of Swiftness")
  49.         && getCustomName(playerArmor[0]) != null &&
  50.         getCustomName(playerArmor[0]).equalsIgnoreCase("Mazurels Light Plated Boots") )
  51.     {
  52.        
  53.                
  54.     p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE,2));
  55.     }
  56.     else // Not wearing the kit or holding the item
  57.     {
  58.     p.removePotionEffect(PotionEffectType.SPEED);
  59.     p.removePotionEffect(PotionEffectType.JUMP);
  60.     p.removePotionEffect(PotionEffectType.DAMAGE_RESISTANCE);
  61.     }
  62.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement