Created
October 11, 2015 08:12
-
-
Save phase/df075297f24855bce2b7 to your computer and use it in GitHub Desktop.
pirates vs ninjas.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void giveNinjaInv(Player p) { | |
p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 2, false)); | |
p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, Integer.MAX_VALUE, 1, false)); | |
ItemStack helm = new ItemStack(Material.LEATHER_HELMET, 1); | |
LeatherArmorMeta mh = (LeatherArmorMeta) helm.getItemMeta(); | |
mh.setColor(Color.fromRGB(68, 68, 68)); | |
helm.setItemMeta(mh); | |
ItemStack chest = new ItemStack(Material.LEATHER_CHESTPLATE, 1); | |
LeatherArmorMeta mc = (LeatherArmorMeta) chest.getItemMeta(); | |
mc.setColor(Color.fromRGB(68, 68, 68)); | |
chest.setItemMeta(mc); | |
ItemStack leg = new ItemStack(Material.LEATHER_LEGGINGS, 1); | |
LeatherArmorMeta ml = (LeatherArmorMeta) leg.getItemMeta(); | |
ml.setColor(Color.fromRGB(68, 68, 68)); | |
leg.setItemMeta(ml); | |
ItemStack boot = new ItemStack(Material.LEATHER_BOOTS, 1); | |
LeatherArmorMeta mb = (LeatherArmorMeta) boot.getItemMeta(); | |
mb.setColor(Color.fromRGB(68, 68, 68)); | |
boot.setItemMeta(mb); | |
p.getInventory().setArmorContents(new ItemStack[] { boot, leg, chest, helm }); | |
p.getInventory().addItem(createItem(Material.STONE_SWORD, 1, "Katana", "This sword is as old as", "the sun!")); | |
} | |
public void givePirateInv(Player p) { | |
p.addPotionEffect(new PotionEffect(PotionEffectType.WATER_BREATHING, Integer.MAX_VALUE, 2, false)); | |
p.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, Integer.MAX_VALUE, 1, false)); | |
ItemStack helm = new ItemStack(Material.LEATHER_HELMET, 1); | |
LeatherArmorMeta mh = (LeatherArmorMeta) helm.getItemMeta(); | |
mh.setColor(Color.fromRGB(0, 0, 0)); | |
helm.setItemMeta(mh); | |
ItemStack chest = new ItemStack(Material.LEATHER_CHESTPLATE, 1); | |
LeatherArmorMeta mc = (LeatherArmorMeta) chest.getItemMeta(); | |
mc.setColor(Color.fromRGB(85, 85, 201)); | |
chest.setItemMeta(mc); | |
ItemStack leg = new ItemStack(Material.LEATHER_LEGGINGS, 1); | |
LeatherArmorMeta ml = (LeatherArmorMeta) leg.getItemMeta(); | |
ml.setColor(Color.fromRGB(108, 63, 61)); | |
leg.setItemMeta(ml); | |
ItemStack boot = new ItemStack(Material.LEATHER_BOOTS, 1); | |
LeatherArmorMeta mb = (LeatherArmorMeta) boot.getItemMeta(); | |
mb.setColor(Color.fromRGB(68, 68, 68)); | |
boot.setItemMeta(mb); | |
p.getInventory() | |
.setArmorContents(new ItemStack[] { boot, leg, chest, PVN.getRandom().nextInt(2) == 1 ? helm : null }); | |
p.getInventory().addItem(createItem(Material.STONE_SWORD, 1, "Pirate Sword", "This sword has been used", | |
"by thousands of pirates!")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment