diff --git a/TwosideKeeper.jar b/TwosideKeeper.jar index 97487c0..dd3b41d 100644 Binary files a/TwosideKeeper.jar and b/TwosideKeeper.jar differ diff --git a/src/plugin.yml b/src/plugin.yml index dda4277..5d83259 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ name: TwosideKeeper main: sig.plugin.TwosideKeeper.TwosideKeeper -version: 3.7.3cr2 +version: 3.7.3cr3 commands: money: description: Tells the player the amount of money they are holding. diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java index 83ac813..36de9d1 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java @@ -2606,7 +2606,7 @@ public class GenericFunctions { public static void DealDamageToMob(double dmg, LivingEntity target, LivingEntity damager, boolean truedmg) { DealDamageToMob(dmg,target,damager,null,""); } - + public static void DealDamageToMob(double dmg, LivingEntity target, Entity damager) { @@ -2628,11 +2628,15 @@ public class GenericFunctions { aPlugin.API.sendEntityHurtAnimation(target); TwosideKeeper.log("Call event with "+dmg, 5); if (damager!=null) { - TwosideKeeper.log(GenericFunctions.GetEntityDisplayName(damager)+"->"+ + if (!(damager instanceof Monster) || !(target instanceof Monster)) { + TwosideKeeper.log(GenericFunctions.GetEntityDisplayName(damager)+"->"+ GenericFunctions.GetEntityDisplayName(target)+ChatColor.WHITE+": Damage dealt was "+dmg,2); + } } else { - TwosideKeeper.log(reason+"->"+ + if (!(damager instanceof Monster) || !(target instanceof Monster)) { + TwosideKeeper.log(reason+"->"+ GenericFunctions.GetEntityDisplayName(target)+ChatColor.WHITE+": Damage dealt was "+dmg,2); + } } double oldhp=((LivingEntity)target).getHealth(); GenericFunctions.subtractHealth(target, damager, dmg, artifact); @@ -2878,12 +2882,10 @@ public class GenericFunctions { if (pd.last_rejuvenate+TwosideKeeper.REJUVENATE_COOLDOWN<=TwosideKeeper.getServerTickTime()) { player.playSound(player.getLocation(), Sound.ENTITY_ZOMBIE_VILLAGER_CURE, 1.0f, 1.0f); addIFrame(player,40); - aPlugin.API.damageItem(player, player.getEquipment().getItemInMainHand(), 400); player.removePotionEffect(PotionEffectType.REGENERATION); player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION,200,9)); 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(); } } diff --git a/src/sig/plugin/TwosideKeeper/TwosideKeeper.java b/src/sig/plugin/TwosideKeeper/TwosideKeeper.java index aa4aa04..5e0689d 100644 --- a/src/sig/plugin/TwosideKeeper/TwosideKeeper.java +++ b/src/sig/plugin/TwosideKeeper/TwosideKeeper.java @@ -2795,7 +2795,12 @@ public class TwosideKeeper extends JavaPlugin implements Listener { ev.setCancelled(true); if (ev.getPlayer().getEquipment().getItemInMainHand()==null || ev.getPlayer().getEquipment().getItemInMainHand().getType()==Material.AIR) { ev.getPlayer().getEquipment().setItemInMainHand(ev.getItemDrop().getItemStack()); - GenericFunctions.PerformRejuvenate(ev.getPlayer()); + PlayerStructure pd = PlayerStructure.GetPlayerStructure(ev.getPlayer()); + if (pd.last_rejuvenate+TwosideKeeper.REJUVENATE_COOLDOWN<=TwosideKeeper.getServerTickTime()) { + GenericFunctions.PerformRejuvenate(ev.getPlayer()); + pd.last_rejuvenate = TwosideKeeper.getServerTickTime(); + aPlugin.API.damageItem(ev.getPlayer(), ev.getItemDrop().getItemStack(), 400); + } ev.getPlayer().getEquipment().setItemInMainHand(new ItemStack(Material.AIR)); } } @@ -4073,8 +4078,10 @@ public class TwosideKeeper extends JavaPlugin implements Listener { if (!ev.isCancelled()) { if (ev.getEntity() instanceof LivingEntity) { dmg = NewCombat.applyDamage((LivingEntity)ev.getEntity(), ev.getDamager()); - log(GenericFunctions.GetEntityDisplayName(ev.getDamager())+ChatColor.GRAY+"->"+ + if (!(ev.getEntity() instanceof Monster) || !(ev.getDamager() instanceof Monster)) { + log(GenericFunctions.GetEntityDisplayName(ev.getDamager())+ChatColor.GRAY+"->"+ GenericFunctions.GetEntityDisplayName(ev.getEntity())+ChatColor.GRAY+": Damage dealt was "+dmg,2); + } } if (ev.getCause()==DamageCause.THORNS) { if (ev.getEntity() instanceof LivingEntity) { @@ -4108,7 +4115,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener { } Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() { public void run() { - log(ChatColor.BLUE+" "+oldhp+"->"+((LivingEntity)ev.getEntity()).getHealth()+" HP",3); + if (oldhp != ((LivingEntity)ev.getEntity()).getHealth()) { + log(ChatColor.BLUE+" "+oldhp+"->"+((LivingEntity)ev.getEntity()).getHealth()+" HP",3); + } }},1); if (ev.getDamager() instanceof Player) { Player p = (Player)ev.getDamager();