mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-22 16:05:01 +00:00
More 1.9/1.10 fixes (#585)
• Fixed Earth/PlantArmor potion effects blinking • Fixed FallingDust particle having the wrong properties • Fixed combos recording 2 right clicks when right clicking with nothing in your hand (fixes FireWheel combo issue)
This commit is contained in:
parent
3d4a779514
commit
e56a53a008
3 changed files with 12 additions and 9 deletions
|
@ -62,6 +62,7 @@ import org.bukkit.event.player.PlayerMoveEvent;
|
|||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.event.player.PlayerToggleFlightEvent;
|
||||
import org.bukkit.event.player.PlayerToggleSneakEvent;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.bukkit.util.Vector;
|
||||
|
@ -1014,10 +1015,12 @@ public class PKListener implements Listener {
|
|||
}
|
||||
}.runTaskLater(plugin, 5);
|
||||
|
||||
if (event.getClickedBlock() != null) {
|
||||
ComboManager.addComboAbility(player, ClickType.RIGHT_CLICK_BLOCK);
|
||||
} else {
|
||||
ComboManager.addComboAbility(player, ClickType.RIGHT_CLICK);
|
||||
if (event.getHand() == EquipmentSlot.HAND) {
|
||||
if (event.getClickedBlock() != null) {
|
||||
ComboManager.addComboAbility(player, ClickType.RIGHT_CLICK_BLOCK);
|
||||
} else {
|
||||
ComboManager.addComboAbility(player, ClickType.RIGHT_CLICK);
|
||||
}
|
||||
}
|
||||
|
||||
if (bPlayer.getBoundAbilityName().equalsIgnoreCase("EarthSmash")) {
|
||||
|
|
|
@ -446,7 +446,7 @@ public enum ParticleEffect {
|
|||
* <li>Has a downwards motion by default
|
||||
* </ul>
|
||||
*/
|
||||
FALLING_DUST("fallingDust", 46, 10);
|
||||
FALLING_DUST("fallingDust", 46, 10, true);
|
||||
|
||||
private static final Map<String, ParticleEffect> NAME_MAP = new HashMap<String, ParticleEffect>();
|
||||
private static final Map<Integer, ParticleEffect> ID_MAP = new HashMap<Integer, ParticleEffect>();
|
||||
|
|
|
@ -58,14 +58,14 @@ public class PassiveHandler implements Runnable {
|
|||
EarthArmor abil = CoreAbility.getAbility(player, EarthArmor.class);
|
||||
if (abil.isFormed()) {
|
||||
int strength = abil.getStrength();
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 3, strength - 1), false);
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 20, strength - 1), false);
|
||||
}
|
||||
}
|
||||
if (CoreAbility.hasAbility(player, PlantArmor.class)) {
|
||||
PlantArmor abil = CoreAbility.getAbility(player, PlantArmor.class);
|
||||
if (abil.isFormed()) {
|
||||
int strength = abil.getResistance();
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 3, strength - 1), false);
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 20, strength - 1), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ public class PassiveHandler implements Runnable {
|
|||
}
|
||||
}
|
||||
if (b) {
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 3, max-1, true, false), false);
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 15, max-1, true, false), false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -192,7 +192,7 @@ public class PassiveHandler implements Runnable {
|
|||
}
|
||||
}
|
||||
if (b) {
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 3, max-1, true, false), false);
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 15, max-1, true, false), false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue