diff --git a/TwosideKeeper.jar b/TwosideKeeper.jar index e2bf82f..b6a5c64 100644 Binary files a/TwosideKeeper.jar and b/TwosideKeeper.jar differ diff --git a/src/sig/plugin/TwosideKeeper/CustomDamage.java b/src/sig/plugin/TwosideKeeper/CustomDamage.java index 1bdea02..6dbc7b9 100644 --- a/src/sig/plugin/TwosideKeeper/CustomDamage.java +++ b/src/sig/plugin/TwosideKeeper/CustomDamage.java @@ -1440,7 +1440,7 @@ public class CustomDamage { p.sendMessage(ChatColor.DARK_RED+"Headshot! x"+(headshotincrease)+" Damage"); if (p.hasPotionEffect(PotionEffectType.SLOW)) { //Add to the current stack of SLOW. - for (PotionEffect pe : p.getActivePotionEffects()) { + /*for (PotionEffect pe : p.getActivePotionEffects()) { if (pe.getType().equals(PotionEffectType.SLOW)) { int lv = pe.getAmplifier(); TwosideKeeper.log("New Slowness level: "+lv,5); @@ -1450,12 +1450,12 @@ public class CustomDamage { GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.DAMAGE_RESISTANCE,99,lv+1,p); break; } - } + }*/ + GenericFunctions.addStackingPotionEffect(p, PotionEffectType.SLOW, 99, 7); + GenericFunctions.addStackingPotionEffect(p, PotionEffectType.DAMAGE_RESISTANCE, 99, 7); } else { - GenericFunctions.logAndRemovePotionEffectFromPlayer(PotionEffectType.SLOW,p); - GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.SLOW,99,0,p); - GenericFunctions.logAndRemovePotionEffectFromPlayer(PotionEffectType.DAMAGE_RESISTANCE,p); - GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.DAMAGE_RESISTANCE,99,0,p); + GenericFunctions.addStackingPotionEffect(p, PotionEffectType.SLOW, 99, 7); + GenericFunctions.addStackingPotionEffect(p, PotionEffectType.DAMAGE_RESISTANCE, 99, 7); } final Player pl = p; Bukkit.getScheduler().scheduleSyncDelayedTask(Bukkit.getPluginManager().getPlugin("TwosideKeeper"), new Runnable() { diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java index d3194b2..323c6ed 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java @@ -2755,7 +2755,7 @@ public class GenericFunctions { stack.append("\n"+stacktrace[i].getClassName()+": **"+stacktrace[i].getFileName()+"** "+stacktrace[i].getMethodName()+"():"+stacktrace[i].getLineNumber()); } //DiscordMessageSender.sendToSpam(stack.toString()); - } + } } public static void logAndRemovePotionEffectFromPlayer(PotionEffectType type, Player p) { @@ -3730,7 +3730,7 @@ public class GenericFunctions { } } else { PotionEffect neweffect = new PotionEffect(type,tick_duration,0); - logAndApplyPotionEffectToPlayer(neweffect.getType(), neweffect.getDuration(),neweffect.getAmplifier(), p); + logAndApplyPotionEffectToPlayer(neweffect.getType(), neweffect.getDuration(),neweffect.getAmplifier(), p, true); } }