->Fix Rejuvenation to subtract durability from Shields.

->Rejuvenation now costs 400 durability per cast.
This commit is contained in:
sigonasr2 2016-08-01 22:44:30 -05:00
parent fc4d58be72
commit 029275305c
4 changed files with 5 additions and 5 deletions

Binary file not shown.

View File

@ -1,6 +1,6 @@
name: TwosideKeeper name: TwosideKeeper
main: sig.plugin.TwosideKeeper.TwosideKeeper main: sig.plugin.TwosideKeeper.TwosideKeeper
version: 3.7.3ar2 version: 3.7.3ar3
commands: commands:
money: money:
description: Tells the player the amount of money they are holding. description: Tells the player the amount of money they are holding.

View File

@ -2060,7 +2060,7 @@ public class GenericFunctions {
+ ChatColor.WHITE+"->Hitting mobs as a Defender aggros them to you.\n" + ChatColor.WHITE+"->Hitting mobs as a Defender aggros them to you.\n"
+ ChatColor.GRAY+"->Knockback from attacks reduced by 75% while blocking.\n" + ChatColor.GRAY+"->Knockback from attacks reduced by 75% while blocking.\n"
+ ChatColor.WHITE+"- "+ChatColor.BOLD+"Rejuvenation"+ChatColor.RESET+ChatColor.WHITE+"\n" + ChatColor.WHITE+"- "+ChatColor.BOLD+"Rejuvenation"+ChatColor.RESET+ChatColor.WHITE+"\n"
+ ChatColor.GRAY+"->Dropping your shield will give you Regeneration X for 10 seconds and 2 seconds of invulnerability.\n" + ChatColor.GRAY+"->Dropping your shield will give you Regeneration X for 10 seconds and 2 seconds of invulnerability. It also costs 400 shield durability!\n"
; ;
} }
case "striker":{ case "striker":{
@ -2797,7 +2797,6 @@ public class GenericFunctions {
addIFrame(player,40); addIFrame(player,40);
player.removePotionEffect(PotionEffectType.REGENERATION); player.removePotionEffect(PotionEffectType.REGENERATION);
player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION,200,9)); player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION,200,9));
aPlugin.API.damageItem(player, player.getEquipment().getItemInMainHand(), 20);
aPlugin.API.sendCooldownPacket(player, player.getEquipment().getItemInMainHand(), TwosideKeeper.REJUVENATE_COOLDOWN); aPlugin.API.sendCooldownPacket(player, player.getEquipment().getItemInMainHand(), TwosideKeeper.REJUVENATE_COOLDOWN);
aPlugin.API.sendCooldownPacket(player, player.getEquipment().getItemInMainHand(), TwosideKeeper.REJUVENATE_COOLDOWN); aPlugin.API.sendCooldownPacket(player, player.getEquipment().getItemInMainHand(), TwosideKeeper.REJUVENATE_COOLDOWN);
pd.last_rejuvenate = TwosideKeeper.getServerTickTime(); pd.last_rejuvenate = TwosideKeeper.getServerTickTime();

View File

@ -2768,6 +2768,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
ev.setCancelled(true); ev.setCancelled(true);
if (ev.getPlayer().getEquipment().getItemInMainHand()==null || ev.getPlayer().getEquipment().getItemInMainHand().getType()==Material.AIR) { if (ev.getPlayer().getEquipment().getItemInMainHand()==null || ev.getPlayer().getEquipment().getItemInMainHand().getType()==Material.AIR) {
ev.getPlayer().getEquipment().setItemInMainHand(ev.getItemDrop().getItemStack()); ev.getPlayer().getEquipment().setItemInMainHand(ev.getItemDrop().getItemStack());
aPlugin.API.damageItem(ev.getPlayer(), ev.getItemDrop().getItemStack(), 400);
GenericFunctions.PerformRejuvenate(ev.getPlayer()); GenericFunctions.PerformRejuvenate(ev.getPlayer());
ev.getPlayer().getEquipment().setItemInMainHand(new ItemStack(Material.AIR)); ev.getPlayer().getEquipment().setItemInMainHand(new ItemStack(Material.AIR));
} }