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");
|
p.sendMessage(ChatColor.DARK_RED+"Headshot! x"+(headshotincrease)+" Damage");
|
||||||
if (p.hasPotionEffect(PotionEffectType.SLOW)) {
|
if (p.hasPotionEffect(PotionEffectType.SLOW)) {
|
||||||
//Add to the current stack of SLOW.
|
//Add to the current stack of SLOW.
|
||||||
for (PotionEffect pe : p.getActivePotionEffects()) {
|
/*for (PotionEffect pe : p.getActivePotionEffects()) {
|
||||||
if (pe.getType().equals(PotionEffectType.SLOW)) {
|
if (pe.getType().equals(PotionEffectType.SLOW)) {
|
||||||
int lv = pe.getAmplifier();
|
int lv = pe.getAmplifier();
|
||||||
TwosideKeeper.log("New Slowness level: "+lv,5);
|
TwosideKeeper.log("New Slowness level: "+lv,5);
|
||||||
@ -1450,12 +1450,12 @@ public class CustomDamage {
|
|||||||
GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.DAMAGE_RESISTANCE,99,lv+1,p);
|
GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.DAMAGE_RESISTANCE,99,lv+1,p);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
GenericFunctions.addStackingPotionEffect(p, PotionEffectType.SLOW, 99, 7);
|
||||||
|
GenericFunctions.addStackingPotionEffect(p, PotionEffectType.DAMAGE_RESISTANCE, 99, 7);
|
||||||
} else {
|
} else {
|
||||||
GenericFunctions.logAndRemovePotionEffectFromPlayer(PotionEffectType.SLOW,p);
|
GenericFunctions.addStackingPotionEffect(p, PotionEffectType.SLOW, 99, 7);
|
||||||
GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.SLOW,99,0,p);
|
GenericFunctions.addStackingPotionEffect(p, PotionEffectType.DAMAGE_RESISTANCE, 99, 7);
|
||||||
GenericFunctions.logAndRemovePotionEffectFromPlayer(PotionEffectType.DAMAGE_RESISTANCE,p);
|
|
||||||
GenericFunctions.logAndApplyPotionEffectToPlayer(PotionEffectType.DAMAGE_RESISTANCE,99,0,p);
|
|
||||||
}
|
}
|
||||||
final Player pl = p;
|
final Player pl = p;
|
||||||
Bukkit.getScheduler().scheduleSyncDelayedTask(Bukkit.getPluginManager().getPlugin("TwosideKeeper"), new Runnable() {
|
Bukkit.getScheduler().scheduleSyncDelayedTask(Bukkit.getPluginManager().getPlugin("TwosideKeeper"), new Runnable() {
|
||||||
|
@ -3730,7 +3730,7 @@ public class GenericFunctions {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
PotionEffect neweffect = new PotionEffect(type,tick_duration,0);
|
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