Fix Sniping Mode.
This commit is contained in:
parent
2b9c4dec20
commit
05ea2f24ea
Binary file not shown.
@ -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() {
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user