Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void checkKit( final Player p )
- {
- ItemStack[] playerArmor = p.getInventory().getArmorContents();
- if( getCustomName(p.getPlayer().getItemInHand()) != null &&
- getCustomName(p.getPlayer().getItemInHand()).equalsIgnoreCase("Zeroxes Doombringer")
- && getCustomName(playerArmor[3]) != null &&
- getCustomName(playerArmor[3]).equalsIgnoreCase("Zeroxes Bone Visage")
- && getCustomName(playerArmor[2]) != null &&
- getCustomName(playerArmor[2]).equalsIgnoreCase("Zeroxes Shadow Plate")
- && getCustomName(playerArmor[1]) != null &&
- getCustomName(playerArmor[1]).equalsIgnoreCase("Zeroxes Platelegs")
- && getCustomName(playerArmor[0]) != null &&
- getCustomName(playerArmor[0]).equalsIgnoreCase("Zeroxes Battle Boots") )
- {
- p.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, Integer.MAX_VALUE,1));
- // End Zerox Set
- }
- else if( getCustomName(p.getPlayer().getItemInHand()) != null &&
- getCustomName(p.getPlayer().getItemInHand()).equalsIgnoreCase("Tathalyns Windshear")
- && getCustomName(playerArmor[3]) != null &&
- getCustomName(playerArmor[3]).equalsIgnoreCase("Tathalyns Hawk eye")
- && getCustomName(playerArmor[2]) != null &&
- getCustomName(playerArmor[2]).equalsIgnoreCase("Tathalyns Fleece")
- && getCustomName(playerArmor[1]) != null &&
- getCustomName(playerArmor[1]).equalsIgnoreCase("Tathalyns Spiked Stockings")
- && getCustomName(playerArmor[0]) != null &&
- getCustomName(playerArmor[0]).equalsIgnoreCase("Tathalyns Boots of Mobility") )
- {
- p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE,0));
- p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, Integer.MAX_VALUE,0));
- }
- else if( getCustomName(p.getPlayer().getItemInHand()) != null &&
- getCustomName(p.getPlayer().getItemInHand()).equalsIgnoreCase("Mazurels Elegant Blade")
- && getCustomName(playerArmor[3]) != null &&
- getCustomName(playerArmor[3]).equalsIgnoreCase("Mazurels Winged Helmet")
- && getCustomName(playerArmor[2]) != null &&
- getCustomName(playerArmor[2]).equalsIgnoreCase("Mazurels Embossed Plate")
- && getCustomName(playerArmor[1]) != null &&
- getCustomName(playerArmor[1]).equalsIgnoreCase("Mazurels Legs of Swiftness")
- && getCustomName(playerArmor[0]) != null &&
- getCustomName(playerArmor[0]).equalsIgnoreCase("Mazurels Light Plated Boots") )
- {
- p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE,2));
- }
- else // Not wearing the kit or holding the item
- {
- p.removePotionEffect(PotionEffectType.SPEED);
- p.removePotionEffect(PotionEffectType.JUMP);
- p.removePotionEffect(PotionEffectType.DAMAGE_RESISTANCE);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement