Ejemplo n.º 1
0
  public void applyInventory(BattlePlayer p) {
    Inventory i = p.getInventory();

    ItemStack HEALTH_POTION = new ItemStack(Material.POTION, 1, (short) 16373);
    ItemStack STEAK = new ItemStack(Material.COOKED_BEEF, 1);
    ItemStack BOW = new ItemStack(Material.BOW, 1);
    ItemStack ARROWS = new ItemStack(Material.ARROW, 64);
    ItemStack IRON_HELMET = new ItemStack(Material.IRON_HELMET, 1);
    ItemStack IRON_CHESTPLATE = new ItemStack(Material.IRON_CHESTPLATE, 1);
    ItemStack IRON_PANTS = new ItemStack(Material.IRON_LEGGINGS, 1);
    ItemStack IRON_BOOTS = new ItemStack(Material.IRON_BOOTS, 1);
    ItemStack IRON_SWORD = new ItemStack(Material.IRON_SWORD, 1);
    ItemStack EXP = new ItemStack(Material.EXP_BOTTLE, 5);
    ItemStack ENDER_PEARL = new ItemStack(Material.ENDER_PEARL, 3);
    IRON_BOOTS.addUnsafeEnchantment(Enchantment.PROTECTION_FALL, 4);

    p.getInventory().setBoots(IRON_BOOTS);
    p.getInventory().setLeggings(IRON_PANTS);
    p.getInventory().setChestplate(IRON_CHESTPLATE);
    p.getInventory().setHelmet(IRON_HELMET);

    i.setItem(0, IRON_SWORD);
    i.setItem(1, BOW);
    i.setItem(2, STEAK);
    i.setItem(3, HEALTH_POTION);
    i.setItem(9, ARROWS);
    i.setItem(4, EXP);
    i.setItem(8, ENDER_PEARL);

    p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 1000 * 20, 2));
  }
Ejemplo n.º 2
0
  public void applyInventory(final BattlePlayer p) {
    Inventory i = p.getInventory();

    ItemStack HEALTH_POTION = new ItemStack(Material.POTION, 1, (short) 16373);
    ItemStack IRON_SWORD = new ItemStack(Material.IRON_SWORD, 1);
    ItemStack BOW = new ItemStack(Material.BOW, 1);
    ItemStack IRON_PICKAXE = new ItemStack(Material.IRON_PICKAXE, 1);
    ItemStack STONE_AXE = new ItemStack(Material.STONE_AXE, 1);
    ItemStack LEATHER_CHESTPLATE = new ItemStack(Material.LEATHER_CHESTPLATE, 1);
    ItemStack LEATHER_BOOTS = new ItemStack(Material.LEATHER_BOOTS, 1);
    ItemStack LEATHER_HELMET = new ItemStack(Material.LEATHER_HELMET, 1);
    ItemStack LEATHER_PANTS = new ItemStack(Material.LEATHER_LEGGINGS, 1);
    ItemStack COOKED_PORKCHOP = new ItemStack(Material.COOKED_BEEF, 4);
    ItemStack BIRCH_LOG = new ItemStack(Material.LOG, 64);
    ItemStack ARROW = new ItemStack(Material.ARROW, 64);

    InvUtils.colourArmourAccordingToTeam(
        p, new ItemStack[] {LEATHER_HELMET, LEATHER_CHESTPLATE, LEATHER_BOOTS, LEATHER_PANTS});

    p.getInventory().setBoots(LEATHER_BOOTS);
    p.getInventory().setLeggings(LEATHER_PANTS);
    p.getInventory().setChestplate(LEATHER_CHESTPLATE);
    p.getInventory().setHelmet(LEATHER_HELMET);

    i.setItem(0, IRON_SWORD);
    i.setItem(1, BOW);
    i.setItem(5, HEALTH_POTION);
    i.setItem(2, IRON_PICKAXE);
    i.setItem(3, STONE_AXE);
    i.setItem(5, COOKED_PORKCHOP);
    i.setItem(6, BIRCH_LOG);
    i.setItem(11, ARROW);
  }