fix enchantments and increase arrow amount in gladiators
This commit is contained in:
parent
8dd89d9dea
commit
838cc2ce31
@ -37,16 +37,16 @@ public class OverpoweredGladiators extends Gladiators
|
||||
|
||||
HotbarLayout layout = getHotbarEditor().getLayout(p);
|
||||
|
||||
int enchantMentLevel = 0;
|
||||
switch(type)
|
||||
{
|
||||
case RED: enchantMentLevel = 4;
|
||||
case ORANGE: enchantMentLevel = 3;
|
||||
case YELLOW: enchantMentLevel = 2;
|
||||
case GREEN: enchantMentLevel = 1;
|
||||
}
|
||||
int round = 0;
|
||||
|
||||
System.out.println(enchantMentLevel);
|
||||
if (type == ArenaType.GREEN)
|
||||
round = 1;
|
||||
else if (type == ArenaType.YELLOW)
|
||||
round = 2;
|
||||
else if (type == ArenaType.ORANGE)
|
||||
round = 3;
|
||||
else if(type == ArenaType.RED)
|
||||
round = 4;
|
||||
|
||||
UtilInv.Clear(p);
|
||||
|
||||
@ -55,7 +55,7 @@ public class OverpoweredGladiators extends Gladiators
|
||||
|
||||
p.getInventory().setItem(layout.getRod(), UtilItem.makeUnbreakable(type.getLoadout().getRod()));
|
||||
p.getInventory().setItem(layout.getBow(), type.getLoadout().getBow());
|
||||
p.getInventory().setItem(layout.getArrows(), type.getLoadout().getArrows());
|
||||
p.getInventory().setItem(layout.getArrows(), new ItemStack(Material.ARROW, round * 5));
|
||||
|
||||
ItemStack sword = new ItemStack(Material.DIAMOND_SWORD);
|
||||
|
||||
@ -65,19 +65,13 @@ public class OverpoweredGladiators extends Gladiators
|
||||
ItemStack boots = new ItemStack(Material.DIAMOND_BOOTS);
|
||||
|
||||
|
||||
if(enchantMentLevel != 0)
|
||||
if (round != 0)
|
||||
{
|
||||
sword.addEnchantment(Enchantment.DAMAGE_ALL, enchantMentLevel);
|
||||
helmet.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, enchantMentLevel);
|
||||
chest.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, enchantMentLevel);
|
||||
leggings.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, enchantMentLevel);
|
||||
boots.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, enchantMentLevel);
|
||||
|
||||
if(enchantMentLevel >= 4)
|
||||
{
|
||||
System.out.println("Notch Apple");
|
||||
UtilInv.insert(p, new ItemStack(Material.GOLDEN_APPLE,1 , (short) 1));
|
||||
}
|
||||
sword.addEnchantment(Enchantment.DAMAGE_ALL, round);
|
||||
helmet.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, round);
|
||||
chest.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, round);
|
||||
leggings.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, round);
|
||||
boots.addEnchantment(Enchantment.PROTECTION_ENVIRONMENTAL, round);
|
||||
}
|
||||
|
||||
p.getInventory().setItem(layout.getSword(), UtilItem.makeUnbreakable(sword));
|
||||
@ -86,6 +80,11 @@ public class OverpoweredGladiators extends Gladiators
|
||||
p.getInventory().setChestplate(chest);
|
||||
p.getInventory().setLeggings(leggings);
|
||||
p.getInventory().setBoots(boots);
|
||||
|
||||
if (round >= 4)
|
||||
{
|
||||
UtilInv.insert(p, new ItemStack(Material.GOLDEN_APPLE,1 , (short) 1));
|
||||
}
|
||||
|
||||
p.playSound(p.getLocation(), Sound.LEVEL_UP, 1f, 1f);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user