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:
StrangeOne101 2016-09-29 14:05:48 +13:00 committed by Christopher Martin
parent 3d4a779514
commit e56a53a008
3 changed files with 12 additions and 9 deletions

View file

@ -62,6 +62,7 @@ import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerToggleFlightEvent; import org.bukkit.event.player.PlayerToggleFlightEvent;
import org.bukkit.event.player.PlayerToggleSneakEvent; import org.bukkit.event.player.PlayerToggleSneakEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -1014,10 +1015,12 @@ public class PKListener implements Listener {
} }
}.runTaskLater(plugin, 5); }.runTaskLater(plugin, 5);
if (event.getClickedBlock() != null) { if (event.getHand() == EquipmentSlot.HAND) {
ComboManager.addComboAbility(player, ClickType.RIGHT_CLICK_BLOCK); if (event.getClickedBlock() != null) {
} else { ComboManager.addComboAbility(player, ClickType.RIGHT_CLICK_BLOCK);
ComboManager.addComboAbility(player, ClickType.RIGHT_CLICK); } else {
ComboManager.addComboAbility(player, ClickType.RIGHT_CLICK);
}
} }
if (bPlayer.getBoundAbilityName().equalsIgnoreCase("EarthSmash")) { if (bPlayer.getBoundAbilityName().equalsIgnoreCase("EarthSmash")) {

View file

@ -446,7 +446,7 @@ public enum ParticleEffect {
* <li>Has a downwards motion by default * <li>Has a downwards motion by default
* </ul> * </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<String, ParticleEffect> NAME_MAP = new HashMap<String, ParticleEffect>();
private static final Map<Integer, ParticleEffect> ID_MAP = new HashMap<Integer, ParticleEffect>(); private static final Map<Integer, ParticleEffect> ID_MAP = new HashMap<Integer, ParticleEffect>();

View file

@ -58,14 +58,14 @@ public class PassiveHandler implements Runnable {
EarthArmor abil = CoreAbility.getAbility(player, EarthArmor.class); EarthArmor abil = CoreAbility.getAbility(player, EarthArmor.class);
if (abil.isFormed()) { if (abil.isFormed()) {
int strength = abil.getStrength(); 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)) { if (CoreAbility.hasAbility(player, PlantArmor.class)) {
PlantArmor abil = CoreAbility.getAbility(player, PlantArmor.class); PlantArmor abil = CoreAbility.getAbility(player, PlantArmor.class);
if (abil.isFormed()) { if (abil.isFormed()) {
int strength = abil.getResistance(); 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) { 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) { 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);
} }
} }