TF-ProjectKorra/src/com/projectkorra/projectkorra/PKListener.java

2057 lines
80 KiB
Java
Raw Normal View History

package com.projectkorra.projectkorra;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Statistic;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockFadeEvent;
import org.bukkit.event.block.BlockFormEvent;
import org.bukkit.event.block.BlockFromToEvent;
import org.bukkit.event.block.BlockIgniteEvent;
import org.bukkit.event.block.BlockPhysicsEvent;
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
import org.bukkit.event.block.BlockPistonExtendEvent;
import org.bukkit.event.block.BlockPistonRetractEvent;
import org.bukkit.event.block.BlockPlaceEvent;
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
import org.bukkit.event.block.FluidLevelChangeEvent;
import org.bukkit.event.entity.EntityChangeBlockEvent;
import org.bukkit.event.entity.EntityCombustEvent;
import org.bukkit.event.entity.EntityDamageByBlockEvent;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
import org.bukkit.event.entity.EntityDamageEvent.DamageModifier;
import org.bukkit.event.entity.EntityDeathEvent;
import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.event.entity.EntityInteractEvent;
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
import org.bukkit.event.entity.EntityPickupItemEvent;
import org.bukkit.event.entity.EntityShootBowEvent;
import org.bukkit.event.entity.EntityTargetEvent;
import org.bukkit.event.entity.EntityTargetLivingEntityEvent;
import org.bukkit.event.entity.EntityTeleportEvent;
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
import org.bukkit.event.entity.EntityToggleGlideEvent;
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
import org.bukkit.event.entity.ItemMergeEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.entity.ProjectileHitEvent;
import org.bukkit.event.entity.ProjectileLaunchEvent;
import org.bukkit.event.entity.SlimeSplitEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
import org.bukkit.event.inventory.InventoryPickupItemEvent;
import org.bukkit.event.player.AsyncPlayerChatEvent;
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
import org.bukkit.event.player.PlayerBucketEmptyEvent;
import org.bukkit.event.player.PlayerChangedWorldEvent;
import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerGameModeChangeEvent;
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
import org.bukkit.event.player.PlayerInteractAtEntityEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerItemDamageEvent;
import org.bukkit.event.player.PlayerItemHeldEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerKickEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerQuitEvent;
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
import org.bukkit.event.player.PlayerSwapHandItemsEvent;
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;
2017-01-16 03:37:21 +00:00
import com.projectkorra.projectkorra.Element.SubElement;
import com.projectkorra.projectkorra.ability.Ability;
2016-01-13 21:14:34 +00:00
import com.projectkorra.projectkorra.ability.AddonAbility;
import com.projectkorra.projectkorra.ability.AirAbility;
2017-01-06 01:57:39 +00:00
import com.projectkorra.projectkorra.ability.AvatarAbility;
2016-01-13 21:14:34 +00:00
import com.projectkorra.projectkorra.ability.ChiAbility;
import com.projectkorra.projectkorra.ability.CoreAbility;
import com.projectkorra.projectkorra.ability.EarthAbility;
import com.projectkorra.projectkorra.ability.ElementalAbility;
import com.projectkorra.projectkorra.ability.FireAbility;
import com.projectkorra.projectkorra.ability.WaterAbility;
import com.projectkorra.projectkorra.ability.util.ComboManager;
import com.projectkorra.projectkorra.ability.util.MultiAbilityManager;
import com.projectkorra.projectkorra.ability.util.PassiveManager;
import com.projectkorra.projectkorra.airbending.AirBlast;
import com.projectkorra.projectkorra.airbending.AirBurst;
import com.projectkorra.projectkorra.airbending.AirScooter;
import com.projectkorra.projectkorra.airbending.AirShield;
import com.projectkorra.projectkorra.airbending.AirSpout;
import com.projectkorra.projectkorra.airbending.AirSuction;
import com.projectkorra.projectkorra.airbending.AirSwipe;
import com.projectkorra.projectkorra.airbending.Suffocate;
import com.projectkorra.projectkorra.airbending.Tornado;
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
import com.projectkorra.projectkorra.airbending.flight.FlightMultiAbility;
import com.projectkorra.projectkorra.airbending.passive.GracefulDescent;
2016-01-13 21:14:34 +00:00
import com.projectkorra.projectkorra.avatar.AvatarState;
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
import com.projectkorra.projectkorra.board.BendingBoardManager;
import com.projectkorra.projectkorra.chiblocking.AcrobatStance;
import com.projectkorra.projectkorra.chiblocking.HighJump;
import com.projectkorra.projectkorra.chiblocking.Paralyze;
import com.projectkorra.projectkorra.chiblocking.QuickStrike;
import com.projectkorra.projectkorra.chiblocking.RapidPunch;
import com.projectkorra.projectkorra.chiblocking.Smokescreen;
import com.projectkorra.projectkorra.chiblocking.SwiftKick;
import com.projectkorra.projectkorra.chiblocking.WarriorStance;
import com.projectkorra.projectkorra.chiblocking.passive.Acrobatics;
import com.projectkorra.projectkorra.chiblocking.passive.ChiPassive;
import com.projectkorra.projectkorra.command.Commands;
import com.projectkorra.projectkorra.configuration.ConfigManager;
import com.projectkorra.projectkorra.earthbending.Catapult;
import com.projectkorra.projectkorra.earthbending.Collapse;
2016-01-13 21:14:34 +00:00
import com.projectkorra.projectkorra.earthbending.CollapseWall;
import com.projectkorra.projectkorra.earthbending.EarthArmor;
import com.projectkorra.projectkorra.earthbending.EarthBlast;
import com.projectkorra.projectkorra.earthbending.EarthGrab;
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
import com.projectkorra.projectkorra.earthbending.EarthGrab.GrabMode;
import com.projectkorra.projectkorra.earthbending.EarthSmash;
import com.projectkorra.projectkorra.earthbending.EarthTunnel;
2016-01-13 21:14:34 +00:00
import com.projectkorra.projectkorra.earthbending.RaiseEarth;
import com.projectkorra.projectkorra.earthbending.RaiseEarthWall;
import com.projectkorra.projectkorra.earthbending.Shockwave;
import com.projectkorra.projectkorra.earthbending.Tremorsense;
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
import com.projectkorra.projectkorra.earthbending.combo.EarthPillars;
import com.projectkorra.projectkorra.earthbending.lava.LavaFlow;
import com.projectkorra.projectkorra.earthbending.lava.LavaFlow.AbilityType;
2017-01-16 03:37:21 +00:00
import com.projectkorra.projectkorra.earthbending.lava.LavaSurge;
import com.projectkorra.projectkorra.earthbending.metal.Extraction;
import com.projectkorra.projectkorra.earthbending.metal.MetalClips;
import com.projectkorra.projectkorra.earthbending.passive.DensityShift;
import com.projectkorra.projectkorra.earthbending.passive.EarthPassive;
import com.projectkorra.projectkorra.earthbending.passive.FerroControl;
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
import com.projectkorra.projectkorra.event.BendingPlayerCreationEvent;
import com.projectkorra.projectkorra.event.EntityBendingDeathEvent;
import com.projectkorra.projectkorra.event.HorizontalVelocityChangeEvent;
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
import com.projectkorra.projectkorra.event.PlayerBindChangeEvent;
2015-09-26 16:17:45 +00:00
import com.projectkorra.projectkorra.event.PlayerChangeElementEvent;
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
import com.projectkorra.projectkorra.event.PlayerChangeSubElementEvent;
import com.projectkorra.projectkorra.event.PlayerCooldownChangeEvent;
import com.projectkorra.projectkorra.event.PlayerJumpEvent;
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
import com.projectkorra.projectkorra.event.PlayerStanceChangeEvent;
2016-01-13 21:14:34 +00:00
import com.projectkorra.projectkorra.firebending.Blaze;
import com.projectkorra.projectkorra.firebending.BlazeRing;
import com.projectkorra.projectkorra.firebending.FireBlast;
2016-01-13 21:14:34 +00:00
import com.projectkorra.projectkorra.firebending.FireBlastCharged;
import com.projectkorra.projectkorra.firebending.FireBurst;
import com.projectkorra.projectkorra.firebending.FireJet;
1.8.4 (#769) * Fix OctopusForm (#734) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Attribute System + FireBlast example (#735) * Attribute System + FireBlast example * Removed PK jar :smiley: :dancer: * Fixes Chi Descriptions/Instructions, Removes Fire Passive (#737) * Fixes missing Chi ability descriptions and instructions https://trello.com/c/3vto7SEn/734-re-add-paralyze-and-rapidpunch-descrip tions-and-instructions * Removes FirePassive Was discussed in CD chat https://trello.com/c/skKfHiwR/733-convert-firebending-passive-to-the-new -passive-system * Change Octoform freezing (#741) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Change Octoform Freezing * Revert "Change Octoform Freezing" This reverts commit d5745fe3171b0e24682631889322d81f153d73bd. * Revert "Revert "Change Octoform Freezing"" This reverts commit 9a91730e0fec7c428f619ffca14e4ea467298b37. * Changed attributes to use plain reflection rather than annotations (#743) * should fix some issues with octopusform (#742) when this .remove() is called nothing has happened with this instance, so the old tempblocks/phasechange never actually get removed, and we get nullpointers trying to remove the ones for this instance since they were never even created * Fixed external elements, subelements and abilities not loading (#745) Due to plugins that depend on ProjectKorra loading in AFTER pk, when a BendingPlayer object is created, all the external elements, subelements or abilities they may have are lost because they are caught in the null checks. To work around this, we will continuously loop every second for 30 seconds until the request times out. If any elements/abilities the user has haven't loaded in, in that time (the side plugin has taken longer than 30 seconds to load), then it will time out and report it in the console. * New Attribute System (#746) • New Attribute System (WIP) • Fields should now be marked with @Attribute(Attribute.DAMAGE) or whatever the relevant attribute is. • If the Attribute you want is not there, you can provide a string instead • At runtime, these Attributes can be changed with Attributes.modify(ability/element, attribute, modifier) • Air and Chi have all been marked with @Attribute annotations • Updated Particlelib - Fixed bug with dragonbreath and endRod particles being wrong. AND added new 1.11 particles. * Adding blocks to the world async is not allowed (#744) * Wip (#748) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Plant block removal and /b add all feature (#749) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Fixed: Surge and WaterArms not removing plant block * New Feature: /bend add all [player] * fixed passives not enabling on /bend toggle all (#751) * fixed passives not enabling on /bend toggle all * Correct/Update comment to act as a TODO note. * Fix spectator target (#753) * Don't target spectators * Remove debug code - Remove stick debug code that was causing a NullPointerException. * Change block set order when moving earth (#754) - Set the source block to air after setting the target block to the new type. This will eliminate temporary holes, which minimizes major lighting updates. * Fix exceptions (#752) * Fix world check when sending particles - Check by World reference rather than string name comparison. The following Location distanceSquared call will throw an exception if the World names are the same but references aren't. * Fix several exceptions - Destroy LavaFlow instance when the Player leaves the World. - Destroy Torrent instance when the Player leaves the World. - Fix cooldown exception when Player is null. * PhaseChange Speed option added (#756) • Delay option changed to speed • Fixed EarthArmor breaking when a player is paralyzed. * FireManip, WaterBubble & 1.12 (#757) • Added basic FireManipulation. Still needs lots of improving, but that's for another commit. • Redone WaterBubble. Now has a click version and an expand/shrink animation. • Removed AirBubble • Updated Spigot to 1.12 • Fixed Octopus NPE • Fixed EarthArmor remaining after TPs to other worlds * EarthTunnel - DropLootIfNotRevert (#759) * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * Bug Fixes (Catapult, Illumination, Config) (#760) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * Fix LavaFlow (#755) Fixed "AllowNaturalFlow" * Updated to 1.12 with for days (#761) • Redone the (core) ability load system - The old one broke with the Guava update in 1.12 • Fixed some WaterBubble floods • Fixed PhaseChange melting snow super duper fast • Fixed some other misc bugs • Added 1.12 Spigot to classpath * 1.12 Bug Fixes (#762) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 fixes (#763) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 Fixes * Collision fixes, Air sound change, * Tried Fixing Collisions Currently the loops in CollisionInitializer#initializeDefaultCollisions() don't work * 1.8.4 Fixes (#764) * Small 1.8.4 fixes • Fixed selecting snow blocks as a water source not working when they are more than 3 blocks away • Fixed DensityShift turning lava into sand when you land softly • Fixed IceBlast not working on TempBlocks * Added FireManip particle options to config Also removed a sneaky debug message * 1.8.4 Fixes (#765) * Redone Fire Combos (#766) * Finalize Fire Combo split (#767) * 1.8.4 Fixes * Correct Fire Combos * Remove unused imports
2017-06-13 07:54:30 +00:00
import com.projectkorra.projectkorra.firebending.FireManipulation;
import com.projectkorra.projectkorra.firebending.FireManipulation.FireManipulationType;
import com.projectkorra.projectkorra.firebending.FireShield;
import com.projectkorra.projectkorra.firebending.HeatControl;
import com.projectkorra.projectkorra.firebending.HeatControl.HeatControlType;
2017-01-16 03:37:21 +00:00
import com.projectkorra.projectkorra.firebending.Illumination;
import com.projectkorra.projectkorra.firebending.WallOfFire;
import com.projectkorra.projectkorra.firebending.combustion.Combustion;
import com.projectkorra.projectkorra.firebending.lightning.Lightning;
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
import com.projectkorra.projectkorra.firebending.passive.FirePassive;
import com.projectkorra.projectkorra.firebending.util.FireDamageTimer;
import com.projectkorra.projectkorra.object.HorizontalVelocityTracker;
import com.projectkorra.projectkorra.object.Preset;
2016-01-13 21:14:34 +00:00
import com.projectkorra.projectkorra.util.BlockSource;
import com.projectkorra.projectkorra.util.ClickType;
import com.projectkorra.projectkorra.util.DamageHandler;
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
import com.projectkorra.projectkorra.util.FlightHandler;
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
import com.projectkorra.projectkorra.util.FlightHandler.Flight;
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
import com.projectkorra.projectkorra.util.MovementHandler;
import com.projectkorra.projectkorra.util.PassiveHandler;
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
import com.projectkorra.projectkorra.util.StatisticsManager;
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
import com.projectkorra.projectkorra.util.StatisticsMethods;
import com.projectkorra.projectkorra.util.TempArmor;
import com.projectkorra.projectkorra.util.TempBlock;
import com.projectkorra.projectkorra.waterbending.OctopusForm;
2017-01-16 03:37:21 +00:00
import com.projectkorra.projectkorra.waterbending.SurgeWall;
import com.projectkorra.projectkorra.waterbending.SurgeWave;
import com.projectkorra.projectkorra.waterbending.Torrent;
1.8.4 (#769) * Fix OctopusForm (#734) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Attribute System + FireBlast example (#735) * Attribute System + FireBlast example * Removed PK jar :smiley: :dancer: * Fixes Chi Descriptions/Instructions, Removes Fire Passive (#737) * Fixes missing Chi ability descriptions and instructions https://trello.com/c/3vto7SEn/734-re-add-paralyze-and-rapidpunch-descrip tions-and-instructions * Removes FirePassive Was discussed in CD chat https://trello.com/c/skKfHiwR/733-convert-firebending-passive-to-the-new -passive-system * Change Octoform freezing (#741) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Change Octoform Freezing * Revert "Change Octoform Freezing" This reverts commit d5745fe3171b0e24682631889322d81f153d73bd. * Revert "Revert "Change Octoform Freezing"" This reverts commit 9a91730e0fec7c428f619ffca14e4ea467298b37. * Changed attributes to use plain reflection rather than annotations (#743) * should fix some issues with octopusform (#742) when this .remove() is called nothing has happened with this instance, so the old tempblocks/phasechange never actually get removed, and we get nullpointers trying to remove the ones for this instance since they were never even created * Fixed external elements, subelements and abilities not loading (#745) Due to plugins that depend on ProjectKorra loading in AFTER pk, when a BendingPlayer object is created, all the external elements, subelements or abilities they may have are lost because they are caught in the null checks. To work around this, we will continuously loop every second for 30 seconds until the request times out. If any elements/abilities the user has haven't loaded in, in that time (the side plugin has taken longer than 30 seconds to load), then it will time out and report it in the console. * New Attribute System (#746) • New Attribute System (WIP) • Fields should now be marked with @Attribute(Attribute.DAMAGE) or whatever the relevant attribute is. • If the Attribute you want is not there, you can provide a string instead • At runtime, these Attributes can be changed with Attributes.modify(ability/element, attribute, modifier) • Air and Chi have all been marked with @Attribute annotations • Updated Particlelib - Fixed bug with dragonbreath and endRod particles being wrong. AND added new 1.11 particles. * Adding blocks to the world async is not allowed (#744) * Wip (#748) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Plant block removal and /b add all feature (#749) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Fixed: Surge and WaterArms not removing plant block * New Feature: /bend add all [player] * fixed passives not enabling on /bend toggle all (#751) * fixed passives not enabling on /bend toggle all * Correct/Update comment to act as a TODO note. * Fix spectator target (#753) * Don't target spectators * Remove debug code - Remove stick debug code that was causing a NullPointerException. * Change block set order when moving earth (#754) - Set the source block to air after setting the target block to the new type. This will eliminate temporary holes, which minimizes major lighting updates. * Fix exceptions (#752) * Fix world check when sending particles - Check by World reference rather than string name comparison. The following Location distanceSquared call will throw an exception if the World names are the same but references aren't. * Fix several exceptions - Destroy LavaFlow instance when the Player leaves the World. - Destroy Torrent instance when the Player leaves the World. - Fix cooldown exception when Player is null. * PhaseChange Speed option added (#756) • Delay option changed to speed • Fixed EarthArmor breaking when a player is paralyzed. * FireManip, WaterBubble & 1.12 (#757) • Added basic FireManipulation. Still needs lots of improving, but that's for another commit. • Redone WaterBubble. Now has a click version and an expand/shrink animation. • Removed AirBubble • Updated Spigot to 1.12 • Fixed Octopus NPE • Fixed EarthArmor remaining after TPs to other worlds * EarthTunnel - DropLootIfNotRevert (#759) * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * Bug Fixes (Catapult, Illumination, Config) (#760) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * Fix LavaFlow (#755) Fixed "AllowNaturalFlow" * Updated to 1.12 with for days (#761) • Redone the (core) ability load system - The old one broke with the Guava update in 1.12 • Fixed some WaterBubble floods • Fixed PhaseChange melting snow super duper fast • Fixed some other misc bugs • Added 1.12 Spigot to classpath * 1.12 Bug Fixes (#762) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 fixes (#763) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 Fixes * Collision fixes, Air sound change, * Tried Fixing Collisions Currently the loops in CollisionInitializer#initializeDefaultCollisions() don't work * 1.8.4 Fixes (#764) * Small 1.8.4 fixes • Fixed selecting snow blocks as a water source not working when they are more than 3 blocks away • Fixed DensityShift turning lava into sand when you land softly • Fixed IceBlast not working on TempBlocks * Added FireManip particle options to config Also removed a sneaky debug message * 1.8.4 Fixes (#765) * Redone Fire Combos (#766) * Finalize Fire Combo split (#767) * 1.8.4 Fixes * Correct Fire Combos * Remove unused imports
2017-06-13 07:54:30 +00:00
import com.projectkorra.projectkorra.waterbending.WaterBubble;
2017-01-16 03:37:21 +00:00
import com.projectkorra.projectkorra.waterbending.WaterManipulation;
import com.projectkorra.projectkorra.waterbending.WaterSpout;
Include outstanding PR's and fix outstanding issues (#1069) This PR moves over some outstanding PR's to the proper branch and resolves some extra issues. Thanks @xNuminousx! ## Additions * Adds Surge interactions with Lava * Surge Wave and Surge Wall will both cause Lava to turn into TempBlock Cobblestone / Obsidian * Enabled via the new `Abilities.Water.Surge.Wave.SolidifyLava.Enabled` and `Abilities.Water.Surge.Wall.SolidifyLava.Enabled` config options. They both default to `true` * Duration of the created TempBlocks is set via the new `Abilities.Water.Surge.Wave.SolidifyLava.Duration` and `Abilities.Water.Surge.Wall.SolidifyLava.Duration` config options. They both default to `36000` ## Fixes * Fixes DensityShift turning non-full blocks into Sand causing the player to get stuck in the ground. Now it will still prevent fall damage on non-full earthbendable blocks but will not turn them to Sand. * Fixes EarthDome and potentially other combos from not respecting their `Enabled` config option * Fixes players with usernames the same as ability names getting incorrect cooldowns applied. Resolves #1068 ## Misc. Changes * Changes Water abilities that require sources to deactivate if their source is destroyed after selection occurs but before the ability starts * Changes AirSuction origin selection to remove if the player gets too far away * Changes AirSwipe streams to be independent of one another (i.e. one hitting a wall won't cause them all to stop) * Reduces the default collision radius of AirSwipe and prevents entities from getting hit through corners * Bumps the Spigot API version to 1.16
2020-07-19 23:37:50 +00:00
import com.projectkorra.projectkorra.waterbending.WaterSpoutWave;
import com.projectkorra.projectkorra.waterbending.blood.Bloodbending;
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
import com.projectkorra.projectkorra.waterbending.combo.IceBullet;
import com.projectkorra.projectkorra.waterbending.healing.HealingWaters;
import com.projectkorra.projectkorra.waterbending.ice.IceBlast;
import com.projectkorra.projectkorra.waterbending.ice.IceSpikeBlast;
import com.projectkorra.projectkorra.waterbending.ice.PhaseChange;
import com.projectkorra.projectkorra.waterbending.ice.PhaseChange.PhaseChangeType;
import com.projectkorra.projectkorra.waterbending.multiabilities.WaterArms;
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
import com.projectkorra.projectkorra.waterbending.passive.FastSwim;
import com.projectkorra.projectkorra.waterbending.passive.HydroSink;
2016-01-13 21:14:34 +00:00
import co.aikar.timings.lib.MCTiming;
public class PKListener implements Listener {
ProjectKorra plugin;
1.8.4 (#769) * Fix OctopusForm (#734) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Attribute System + FireBlast example (#735) * Attribute System + FireBlast example * Removed PK jar :smiley: :dancer: * Fixes Chi Descriptions/Instructions, Removes Fire Passive (#737) * Fixes missing Chi ability descriptions and instructions https://trello.com/c/3vto7SEn/734-re-add-paralyze-and-rapidpunch-descrip tions-and-instructions * Removes FirePassive Was discussed in CD chat https://trello.com/c/skKfHiwR/733-convert-firebending-passive-to-the-new -passive-system * Change Octoform freezing (#741) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Change Octoform Freezing * Revert "Change Octoform Freezing" This reverts commit d5745fe3171b0e24682631889322d81f153d73bd. * Revert "Revert "Change Octoform Freezing"" This reverts commit 9a91730e0fec7c428f619ffca14e4ea467298b37. * Changed attributes to use plain reflection rather than annotations (#743) * should fix some issues with octopusform (#742) when this .remove() is called nothing has happened with this instance, so the old tempblocks/phasechange never actually get removed, and we get nullpointers trying to remove the ones for this instance since they were never even created * Fixed external elements, subelements and abilities not loading (#745) Due to plugins that depend on ProjectKorra loading in AFTER pk, when a BendingPlayer object is created, all the external elements, subelements or abilities they may have are lost because they are caught in the null checks. To work around this, we will continuously loop every second for 30 seconds until the request times out. If any elements/abilities the user has haven't loaded in, in that time (the side plugin has taken longer than 30 seconds to load), then it will time out and report it in the console. * New Attribute System (#746) • New Attribute System (WIP) • Fields should now be marked with @Attribute(Attribute.DAMAGE) or whatever the relevant attribute is. • If the Attribute you want is not there, you can provide a string instead • At runtime, these Attributes can be changed with Attributes.modify(ability/element, attribute, modifier) • Air and Chi have all been marked with @Attribute annotations • Updated Particlelib - Fixed bug with dragonbreath and endRod particles being wrong. AND added new 1.11 particles. * Adding blocks to the world async is not allowed (#744) * Wip (#748) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Plant block removal and /b add all feature (#749) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Fixed: Surge and WaterArms not removing plant block * New Feature: /bend add all [player] * fixed passives not enabling on /bend toggle all (#751) * fixed passives not enabling on /bend toggle all * Correct/Update comment to act as a TODO note. * Fix spectator target (#753) * Don't target spectators * Remove debug code - Remove stick debug code that was causing a NullPointerException. * Change block set order when moving earth (#754) - Set the source block to air after setting the target block to the new type. This will eliminate temporary holes, which minimizes major lighting updates. * Fix exceptions (#752) * Fix world check when sending particles - Check by World reference rather than string name comparison. The following Location distanceSquared call will throw an exception if the World names are the same but references aren't. * Fix several exceptions - Destroy LavaFlow instance when the Player leaves the World. - Destroy Torrent instance when the Player leaves the World. - Fix cooldown exception when Player is null. * PhaseChange Speed option added (#756) • Delay option changed to speed • Fixed EarthArmor breaking when a player is paralyzed. * FireManip, WaterBubble & 1.12 (#757) • Added basic FireManipulation. Still needs lots of improving, but that's for another commit. • Redone WaterBubble. Now has a click version and an expand/shrink animation. • Removed AirBubble • Updated Spigot to 1.12 • Fixed Octopus NPE • Fixed EarthArmor remaining after TPs to other worlds * EarthTunnel - DropLootIfNotRevert (#759) * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * Bug Fixes (Catapult, Illumination, Config) (#760) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * Fix LavaFlow (#755) Fixed "AllowNaturalFlow" * Updated to 1.12 with for days (#761) • Redone the (core) ability load system - The old one broke with the Guava update in 1.12 • Fixed some WaterBubble floods • Fixed PhaseChange melting snow super duper fast • Fixed some other misc bugs • Added 1.12 Spigot to classpath * 1.12 Bug Fixes (#762) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 fixes (#763) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 Fixes * Collision fixes, Air sound change, * Tried Fixing Collisions Currently the loops in CollisionInitializer#initializeDefaultCollisions() don't work * 1.8.4 Fixes (#764) * Small 1.8.4 fixes • Fixed selecting snow blocks as a water source not working when they are more than 3 blocks away • Fixed DensityShift turning lava into sand when you land softly • Fixed IceBlast not working on TempBlocks * Added FireManip particle options to config Also removed a sneaky debug message * 1.8.4 Fixes (#765) * Redone Fire Combos (#766) * Finalize Fire Combo split (#767) * 1.8.4 Fixes * Correct Fire Combos * Remove unused imports
2017-06-13 07:54:30 +00:00
private static final HashMap<Entity, Ability> BENDING_ENTITY_DEATH = new HashMap<>(); // Entities killed by Bending.
private static final HashMap<Player, String> BENDING_PLAYER_DEATH = new HashMap<>(); // Player killed by Bending.
private static final List<UUID> RIGHT_CLICK_INTERACT = new ArrayList<UUID>(); // Player right click block.
private static final ArrayList<UUID> TOGGLED_OUT = new ArrayList<>(); // Stands for toggled = false while logging out.
private static final List<Player> PLAYER_DROPPED_ITEM = new ArrayList<>(); // Player dropped an item.
private static final Map<Player, Integer> JUMPS = new HashMap<>();
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
private static MCTiming TimingPhysicsWaterManipulationCheck, TimingPhysicsEarthPassiveCheck, TimingPhysicsIlluminationTorchCheck, TimingPhysicsEarthAbilityCheck, TimingPhysicsAirTempBlockBelowFallingBlockCheck;
private static MCTiming TimingPlayerMoveMovementHandlerCheck, TimingPlayerMoveSpoutCheck, TimingPlayerMoveBloodbentCheck, TimingPlayerMoveAirChiPassiveCheck, TimingPlayerMoveFirePassiveCheck, TimingPlayerMoveJumpCheck;
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public PKListener(final ProjectKorra plugin) {
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
this.plugin = plugin;
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
TimingPhysicsWaterManipulationCheck = ProjectKorra.timing("PhysicsWaterManipulationCheck");
TimingPhysicsEarthPassiveCheck = ProjectKorra.timing("PhysicsEarthPassiveCheck");
TimingPhysicsIlluminationTorchCheck = ProjectKorra.timing("PhysicsIlluminationTorchCheck");
TimingPhysicsEarthAbilityCheck = ProjectKorra.timing("PhysicsEarthAbilityCheck");
TimingPhysicsAirTempBlockBelowFallingBlockCheck = ProjectKorra.timing("PhysicsAirTempBlockBelowFallingBlockCheck");
TimingPlayerMoveMovementHandlerCheck = ProjectKorra.timing("PlayerMoveMovementHandlerCheck");
TimingPlayerMoveSpoutCheck = ProjectKorra.timing("PlayerMoveSpoutCheck");
TimingPlayerMoveBloodbentCheck = ProjectKorra.timing("PlayerMoveBloodbentCheck");
TimingPlayerMoveAirChiPassiveCheck = ProjectKorra.timing("PlayerMoveAirChiPassiveCheck");
TimingPlayerMoveFirePassiveCheck = ProjectKorra.timing("PlayerMoveFirePassiveCheck");
TimingPlayerMoveJumpCheck = ProjectKorra.timing("PlayerMoveJumpCheck");
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onBlockBreak(final BlockBreakEvent event) {
final Block block = event.getBlock();
final Player player = event.getPlayer();
final BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
final String abil = bPlayer.getBoundAbilityName();
CoreAbility ability = null;
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (Illumination.isIlluminationTorch(block.getRelative(BlockFace.UP))) {
TempBlock torch = TempBlock.get(block.getRelative(BlockFace.UP));
Player user = Illumination.getBlocks().get(torch);
Illumination illumination = CoreAbility.getAbility(user, Illumination.class);
if (illumination != null) {
illumination.remove();
}
}
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
if (bPlayer.isElementToggled(Element.WATER) && bPlayer.isToggled()) {
if (abil != null && abil.equalsIgnoreCase("Surge")) {
ability = CoreAbility.getAbility(SurgeWall.class);
} else if (abil != null && abil.equalsIgnoreCase("Torrent")) {
ability = CoreAbility.getAbility(Torrent.class);
Include outstanding PR's and fix outstanding issues (#1069) This PR moves over some outstanding PR's to the proper branch and resolves some extra issues. Thanks @xNuminousx! ## Additions * Adds Surge interactions with Lava * Surge Wave and Surge Wall will both cause Lava to turn into TempBlock Cobblestone / Obsidian * Enabled via the new `Abilities.Water.Surge.Wave.SolidifyLava.Enabled` and `Abilities.Water.Surge.Wall.SolidifyLava.Enabled` config options. They both default to `true` * Duration of the created TempBlocks is set via the new `Abilities.Water.Surge.Wave.SolidifyLava.Duration` and `Abilities.Water.Surge.Wall.SolidifyLava.Duration` config options. They both default to `36000` ## Fixes * Fixes DensityShift turning non-full blocks into Sand causing the player to get stuck in the ground. Now it will still prevent fall damage on non-full earthbendable blocks but will not turn them to Sand. * Fixes EarthDome and potentially other combos from not respecting their `Enabled` config option * Fixes players with usernames the same as ability names getting incorrect cooldowns applied. Resolves #1068 ## Misc. Changes * Changes Water abilities that require sources to deactivate if their source is destroyed after selection occurs but before the ability starts * Changes AirSuction origin selection to remove if the player gets too far away * Changes AirSwipe streams to be independent of one another (i.e. one hitting a wall won't cause them all to stop) * Reduces the default collision radius of AirSwipe and prevents entities from getting hit through corners * Bumps the Spigot API version to 1.16
2020-07-19 23:37:50 +00:00
} else if (abil != null && abil.equalsIgnoreCase("WaterSpout")) {
ability = CoreAbility.getAbility(WaterSpoutWave.class);
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
} else {
ability = CoreAbility.getAbility(abil);
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
if (ability != null && ability instanceof WaterAbility && !((WaterAbility) ability).allowBreakPlants() && WaterAbility.isPlantbendable(player, block.getType(), false)) {
event.setCancelled(true);
return;
}
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final EarthBlast blast = EarthBlast.getBlastFromSource(block);
if (blast != null) {
2016-01-13 21:14:34 +00:00
blast.remove();
}
PhaseChange recode and EarthGrab fix (#661) * Fix metalclips - Removed a check that was preventing metalclips from progressing past 1 clip on a target. * Fix metalclips - Fixed a bug limiting the metal clip count to one * Improve MetalClips - Fixed bug where shooting at a block spawned two clips - Added ShootCooldown and CrushCooldown - ShootCooldown only applies to shooting clips - Changed how crushing works: --- Removed old style and variables --- When controlling an entity with 4 clips, the controller can click to cause the armor to "crush" and damage the entity. --- Has own cooldown, default of 2000 (2 seconds) - Changed launching --- Works with all clip amounts except 4 --- When the user releases sneak, the entity will be launched at varying power depending on how many clips were attached. - Changed ability cooldown to activate only after the ability is finished. * Add CrushDamage option to MetalClips * New Damage Type, MetalClips changes - Fixed MetalClips bug caused in magnetizing - Added ignoreArmor option to damageEntity method, default true for most abilities. If wanted to be changed, someone needs to go through and add false as a parameter - Changed default config option for MetalClips description * PhaseChange recode * Chris wanted changes * Chris doesn't want bugs * Only you can prevent bugs - Added checks for worlds to prevent errors * Remove unnecessary auto generated comments * Loony didn't like the passive * Added RegionProtection checks * PhaseChange * Revert "PhaseChange" This reverts commit 761c73f5756771674719ffca52413cffa09243a8. * Revert "Added RegionProtection checks" This reverts commit b53a02a74d0276d4d1e773e1c197666cbcfab624. * Revert "Loony didn't like the passive" This reverts commit 6612bb7fa8eea3e26c01d0ef761c658447779e03. * Revert "Remove unnecessary auto generated comments" This reverts commit da9c45106d0b7e256c278e6a84d15f7a7340a140. * Revert "Only you can prevent bugs" This reverts commit 630161659ea89bfb106924c8ab1fbcdb8f6f1310. * Revert "Chris doesn't want bugs" This reverts commit eda2dee6b52dd38c73f35680c5e4484adc5b5b91. * Revert "Chris wanted changes" This reverts commit 30b76c10c4adc63784ea7115eb4f9c636650d6c5. * Revert "PhaseChange recode" This reverts commit f8f290dd8c57a3467a87de7e43b58ce635196c62. * Conflicts * Stupid conflicts * I hope and pray * Revert "Revert "Chris wanted changes"" This reverts commit e612607c8a16a735c92014714c00aa671954b4a5. * Revert "Revert "Chris doesn't want bugs"" This reverts commit bd656b814d7ffa2d9c84fa304d3adb8f1535f782. * Revert "Revert "Only you can prevent bugs"" This reverts commit 7772c95737130cf414ff1af49dcfb48865be5374. * Revert "Revert "Remove unnecessary auto generated comments"" This reverts commit 69315dc7baa6cd237fbd89394e544913596ec6e3. * Revert "Revert "Loony didn't like the passive"" This reverts commit ea397c6323e50d219395d5912850513afd6f2a7b. * Revert "Revert "Added RegionProtection checks"" This reverts commit 8cb41709f65e4322e68b2f0e1792987f7fc214f2. * Revert "Revert "PhaseChange"" This reverts commit da6b0e7071acf74df6447b15daf4ae6e39f057f6. * Working PhaseChange finally * Fix EarthGrab * Air fixes, PhaseChange changes
2016-12-20 04:43:56 +00:00
if (PhaseChange.getFrozenBlocksAsBlock().contains(block)) {
if (PhaseChange.thaw(block)) {
event.setCancelled(true);
}
2016-01-13 21:14:34 +00:00
} else if (SurgeWall.getWallBlocks().containsKey(block)) {
event.setCancelled(true);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
} else if (Illumination.isIlluminationTorch(block)) {
event.setCancelled(true);
2016-01-13 21:14:34 +00:00
} else if (!SurgeWave.canThaw(block)) {
SurgeWave.thaw(block);
event.setCancelled(true);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
} else if (LavaFlow.isLavaFlowBlock(block)) {
LavaFlow.removeBlock(block);
2016-01-13 21:14:34 +00:00
} else if (EarthAbility.getMovedEarth().containsKey(block)) {
EarthAbility.removeRevertIndex(block);
} else if (TempBlock.isTempBlock(block)) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
event.setCancelled(true);
TempBlock.revertBlock(block, Material.AIR);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
} else if (DensityShift.isPassiveSand(block)) {
DensityShift.revertSand(block);
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
} else if (WaterBubble.isAir(block)) {
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onBlockFlowTo(final BlockFromToEvent event) {
final Block toblock = event.getToBlock();
final Block fromblock = event.getBlock();
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (TempBlock.isTempBlock(fromblock) || TempBlock.isTempBlock(toblock)) {
event.setCancelled(true);
} else {
if (ElementalAbility.isLava(fromblock)) {
event.setCancelled(!EarthPassive.canFlowFromTo(fromblock, toblock));
} else if (ElementalAbility.isWater(fromblock)) {
event.setCancelled(WaterBubble.isAir(toblock));
if (!event.isCancelled()) {
event.setCancelled(!WaterManipulation.canFlowFromTo(fromblock, toblock));
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (!event.isCancelled()) {
if (Illumination.isIlluminationTorch(toblock)) {
toblock.setType(Material.AIR);
}
2016-01-13 21:14:34 +00:00
}
}
}
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onFluidLevelChange(final FluidLevelChangeEvent event) {
if (TempBlock.isTempBlock(event.getBlock())) {
event.setCancelled(true);
} else if (TempBlock.isTouchingTempBlock(event.getBlock())) {
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onBlockForm(final BlockFormEvent event) {
2016-01-13 21:14:34 +00:00
if (TempBlock.isTempBlock(event.getBlock())) {
event.setCancelled(true);
2016-01-13 21:14:34 +00:00
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
2016-01-13 21:14:34 +00:00
if (!WaterManipulation.canPhysicsChange(event.getBlock())) {
event.setCancelled(true);
2016-01-13 21:14:34 +00:00
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
2016-01-13 21:14:34 +00:00
if (!EarthPassive.canPhysicsChange(event.getBlock())) {
event.setCancelled(true);
2016-01-13 21:14:34 +00:00
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
if (event.getBlock().getType().toString().equals("CONCRETE_POWDER")) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final BlockFace[] faces = new BlockFace[] { BlockFace.UP, BlockFace.DOWN, BlockFace.EAST, BlockFace.WEST, BlockFace.NORTH, BlockFace.SOUTH };
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
boolean marked = true;
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
for (final BlockFace face : faces) {
final Block b = event.getBlock().getRelative(face);
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (b.getType() == Material.WATER) {
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
if (!TempBlock.isTempBlock(b)) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
marked = false; // if there is any normal water around it, prevent it.
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
break;
}
}
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
if (marked) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
event.setCancelled(true);
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
}
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
public void onBlockIgnite(final BlockIgniteEvent event) {}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onBlockMeltEvent(final BlockFadeEvent event) {
final Block block = event.getBlock();
if (block.getType() == Material.FIRE) {
return;
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
event.setCancelled(Illumination.isIlluminationTorch(block));
if (!event.isCancelled()) {
event.setCancelled(!WaterManipulation.canPhysicsChange(block));
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (!event.isCancelled()) {
event.setCancelled(!EarthPassive.canPhysicsChange(block));
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (!event.isCancelled()) {
PhaseChange recode and EarthGrab fix (#661) * Fix metalclips - Removed a check that was preventing metalclips from progressing past 1 clip on a target. * Fix metalclips - Fixed a bug limiting the metal clip count to one * Improve MetalClips - Fixed bug where shooting at a block spawned two clips - Added ShootCooldown and CrushCooldown - ShootCooldown only applies to shooting clips - Changed how crushing works: --- Removed old style and variables --- When controlling an entity with 4 clips, the controller can click to cause the armor to "crush" and damage the entity. --- Has own cooldown, default of 2000 (2 seconds) - Changed launching --- Works with all clip amounts except 4 --- When the user releases sneak, the entity will be launched at varying power depending on how many clips were attached. - Changed ability cooldown to activate only after the ability is finished. * Add CrushDamage option to MetalClips * New Damage Type, MetalClips changes - Fixed MetalClips bug caused in magnetizing - Added ignoreArmor option to damageEntity method, default true for most abilities. If wanted to be changed, someone needs to go through and add false as a parameter - Changed default config option for MetalClips description * PhaseChange recode * Chris wanted changes * Chris doesn't want bugs * Only you can prevent bugs - Added checks for worlds to prevent errors * Remove unnecessary auto generated comments * Loony didn't like the passive * Added RegionProtection checks * PhaseChange * Revert "PhaseChange" This reverts commit 761c73f5756771674719ffca52413cffa09243a8. * Revert "Added RegionProtection checks" This reverts commit b53a02a74d0276d4d1e773e1c197666cbcfab624. * Revert "Loony didn't like the passive" This reverts commit 6612bb7fa8eea3e26c01d0ef761c658447779e03. * Revert "Remove unnecessary auto generated comments" This reverts commit da9c45106d0b7e256c278e6a84d15f7a7340a140. * Revert "Only you can prevent bugs" This reverts commit 630161659ea89bfb106924c8ab1fbcdb8f6f1310. * Revert "Chris doesn't want bugs" This reverts commit eda2dee6b52dd38c73f35680c5e4484adc5b5b91. * Revert "Chris wanted changes" This reverts commit 30b76c10c4adc63784ea7115eb4f9c636650d6c5. * Revert "PhaseChange recode" This reverts commit f8f290dd8c57a3467a87de7e43b58ce635196c62. * Conflicts * Stupid conflicts * I hope and pray * Revert "Revert "Chris wanted changes"" This reverts commit e612607c8a16a735c92014714c00aa671954b4a5. * Revert "Revert "Chris doesn't want bugs"" This reverts commit bd656b814d7ffa2d9c84fa304d3adb8f1535f782. * Revert "Revert "Only you can prevent bugs"" This reverts commit 7772c95737130cf414ff1af49dcfb48865be5374. * Revert "Revert "Remove unnecessary auto generated comments"" This reverts commit 69315dc7baa6cd237fbd89394e544913596ec6e3. * Revert "Revert "Loony didn't like the passive"" This reverts commit ea397c6323e50d219395d5912850513afd6f2a7b. * Revert "Revert "Added RegionProtection checks"" This reverts commit 8cb41709f65e4322e68b2f0e1792987f7fc214f2. * Revert "Revert "PhaseChange"" This reverts commit da6b0e7071acf74df6447b15daf4ae6e39f057f6. * Working PhaseChange finally * Fix EarthGrab * Air fixes, PhaseChange changes
2016-12-20 04:43:56 +00:00
event.setCancelled(PhaseChange.getFrozenBlocksAsBlock().contains(block));
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (!event.isCancelled()) {
2016-01-13 21:14:34 +00:00
event.setCancelled(!SurgeWave.canThaw(block));
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (!event.isCancelled()) {
event.setCancelled(!Torrent.canThaw(block));
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onBlockPhysics(final BlockPhysicsEvent event) {
final Block block = event.getBlock();
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
try (MCTiming timing = TimingPhysicsWaterManipulationCheck.startTiming()) {
if (!WaterManipulation.canPhysicsChange(block)) {
event.setCancelled(true);
return;
}
}
try (MCTiming timing = TimingPhysicsEarthPassiveCheck.startTiming()) {
if (!EarthPassive.canPhysicsChange(block)) {
event.setCancelled(true);
return;
}
}
try (MCTiming timing = TimingPhysicsIlluminationTorchCheck.startTiming()) {
if (Illumination.isIlluminationTorch(block) || Illumination.isIlluminationTorch(block.getRelative(BlockFace.UP))) {
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
event.setCancelled(true);
return;
}
}
try (MCTiming timing = TimingPhysicsEarthAbilityCheck.startTiming()) {
if (EarthAbility.getPreventPhysicsBlocks().contains(block)) {
event.setCancelled(true);
return;
}
2016-01-13 21:14:34 +00:00
}
// If there is a TempBlock of Air bellow FallingSand blocks, prevent it from updating.
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
try (MCTiming timing = TimingPhysicsAirTempBlockBelowFallingBlockCheck.startTiming()) {
if ((block.getType() == Material.SAND || block.getType() == Material.RED_SAND || block.getType() == Material.GRAVEL || block.getType() == Material.ANVIL || block.getType() == Material.DRAGON_EGG) && ElementalAbility.isAir(block.getRelative(BlockFace.DOWN).getType()) && TempBlock.isTempBlock(block.getRelative(BlockFace.DOWN))) {
event.setCancelled(true);
}
2016-01-13 21:14:34 +00:00
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onBlockPlace(final BlockPlaceEvent event) {
final Player player = event.getPlayer();
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
if (MovementHandler.isStopped(player) || Bloodbending.isBloodbent(player) || Suffocate.isBreathbent(player)) {
event.setCancelled(true);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
return;
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (TempBlock.isTempBlock(event.getBlock()) && event.getItemInHand().getType() != Material.FLINT_AND_STEEL) {
TempBlock.removeBlock(event.getBlock());
}
}
2015-09-26 16:17:45 +00:00
@EventHandler(priority = EventPriority.NORMAL)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onElementChange(final PlayerChangeElementEvent event) {
final Player player = event.getTarget();
final BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
PassiveManager.registerPassives(player);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final boolean chatEnabled = ConfigManager.languageConfig.get().getBoolean("Chat.Enable");
if (chatEnabled) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final Element element = event.getElement();
String prefix = "";
if (bPlayer == null) {
return;
}
if (bPlayer.getElements().size() > 1) {
prefix = Element.AVATAR.getPrefix();
} else if (element != null) {
prefix = element.getPrefix();
} else {
2017-01-16 03:37:21 +00:00
prefix = ChatColor.WHITE + ChatColor.translateAlternateColorCodes('&', ConfigManager.languageConfig.get().getString("Chat.Prefixes.Nonbender")) + " ";
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
2015-09-26 16:17:45 +00:00
player.setDisplayName(player.getName());
player.setDisplayName(prefix + ChatColor.RESET + player.getDisplayName());
2015-09-26 16:17:45 +00:00
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onEntityChangeBlockEvent(final EntityChangeBlockEvent event) {
final Entity entity = event.getEntity();
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
if (MovementHandler.isStopped(entity) || Bloodbending.isBloodbent(entity) || Suffocate.isBreathbent(entity)) {
event.setCancelled(true);
2016-01-13 21:14:34 +00:00
}
if (event.getEntityType() == EntityType.FALLING_BLOCK) {
2016-01-13 21:14:34 +00:00
if (LavaSurge.getAllFallingBlocks().contains(entity)) {
LavaSurge.getAllFallingBlocks().remove(entity);
event.setCancelled(true);
}
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onEntityCombust(final EntityCombustEvent event) {
final Entity entity = event.getEntity();
final Block block = entity.getLocation().getBlock();
Blue Fire Update & Firebending Refactor (#1062) ## Additions * Adds Blue Fire SubElement. > *Adds related damage, cooldown, and range modifiers for configuration * Adds Sticks, Sponges, and Chorus Fruit to cookable HeatControl items. * Adds Smoker, BlastFurnace, and extinguished Campfires to blocks which FireBlast can light. * Adds new TempBlock constructor which takes in a `long revertTime` parameter * Adds new blocks to block lists in configuration >* Adds new nether plants to plantBlocks list >* Adds new earth blocks to earthBlocks list ## Fixes * Fixes AvatarState buffs overriding day related buffs for firebending. * Fixes Blaze not going up hills, going through walls (mostly), jumping gaps. * Fixes Furnaces and related blocks not smelting after being activated by FireBlast ## Removals * Removes BlazeArc dependencies for Fire Abilities which ignite the ground. * Removes smoke particles from Fire bending to increase visibility and better emulate the show. ## Misc. Changes * Changes API versioning to 1.16.1 * Fire from Firebending no longer reverts all at once. * Changes Combustion animation to be more beam-like rather than a rehash of FireBlast. * Changes Add, Remove, Display command to properly display space for Blue Fire. * Changes `ElementalAbility#isFire()` to check for SOUL_FIRE_FLAME. * Changes isIgnitable to check whether fire can be placed at that location rather than solely based on flammability. * Changes firebending abilities to use `FireAbility#playFirebendingParticles()` & `FireAbility#createTempFire()` where applicable. * Changes `FireAbility#playFirebendingParticles()` to play blue fire particles when player has the BlueFire subelement.
2020-07-12 05:05:45 +00:00
if (FireAbility.getSourcePlayers().containsKey(block) && entity instanceof LivingEntity) {
new FireDamageTimer(entity, FireAbility.getSourcePlayers().get(block));
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
public void onEntityDamageBlock(final EntityDamageByBlockEvent event) {}
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onEntityDamageByBlock(final EntityDamageByBlockEvent event) {
final Block block = event.getDamager();
if (block == null) {
return;
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
}
if (TempBlock.isTempBlock(block)) {
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
if (EarthAbility.isEarthbendable(block.getType(), true, true, true) && GeneralMethods.isSolid(block)) {
event.setCancelled(true);
return;
}
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onEntityDamageEvent(final EntityDamageEvent event) {
final Entity entity = event.getEntity();
Blue Fire Update & Firebending Refactor (#1062) ## Additions * Adds Blue Fire SubElement. > *Adds related damage, cooldown, and range modifiers for configuration * Adds Sticks, Sponges, and Chorus Fruit to cookable HeatControl items. * Adds Smoker, BlastFurnace, and extinguished Campfires to blocks which FireBlast can light. * Adds new TempBlock constructor which takes in a `long revertTime` parameter * Adds new blocks to block lists in configuration >* Adds new nether plants to plantBlocks list >* Adds new earth blocks to earthBlocks list ## Fixes * Fixes AvatarState buffs overriding day related buffs for firebending. * Fixes Blaze not going up hills, going through walls (mostly), jumping gaps. * Fixes Furnaces and related blocks not smelting after being activated by FireBlast ## Removals * Removes BlazeArc dependencies for Fire Abilities which ignite the ground. * Removes smoke particles from Fire bending to increase visibility and better emulate the show. ## Misc. Changes * Changes API versioning to 1.16.1 * Fire from Firebending no longer reverts all at once. * Changes Combustion animation to be more beam-like rather than a rehash of FireBlast. * Changes Add, Remove, Display command to properly display space for Blue Fire. * Changes `ElementalAbility#isFire()` to check for SOUL_FIRE_FLAME. * Changes isIgnitable to check whether fire can be placed at that location rather than solely based on flammability. * Changes firebending abilities to use `FireAbility#playFirebendingParticles()` & `FireAbility#createTempFire()` where applicable. * Changes `FireAbility#playFirebendingParticles()` to play blue fire particles when player has the BlueFire subelement.
2020-07-12 05:05:45 +00:00
if (event.getCause() == DamageCause.FIRE && FireAbility.getSourcePlayers().containsKey(entity.getLocation().getBlock())) {
new FireDamageTimer(entity, FireAbility.getSourcePlayers().get(entity.getLocation().getBlock()));
}
2016-01-13 21:14:34 +00:00
if (FireDamageTimer.isEnflamed(entity) && event.getCause() == DamageCause.FIRE_TICK) {
event.setCancelled(true);
2016-01-13 21:14:34 +00:00
FireDamageTimer.dealFlameDamage(entity);
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (entity instanceof LivingEntity && TempArmor.hasTempArmor((LivingEntity) entity)) {
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (event.isApplicable(DamageModifier.ARMOR)) {
event.setDamage(DamageModifier.ARMOR, 0);
}
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
}
if (entity instanceof Player) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final Player player = (Player) entity;
final BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
2016-01-13 21:14:34 +00:00
if (bPlayer == null) {
2015-10-25 16:03:15 +00:00
return;
2016-01-13 21:14:34 +00:00
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (CoreAbility.hasAbility(player, EarthGrab.class)) {
final EarthGrab abil = CoreAbility.getAbility(player, EarthGrab.class);
abil.remove();
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (CoreAbility.getAbility(player, FireJet.class) != null && event.getCause() == DamageCause.FLY_INTO_WALL) {
event.setCancelled(true);
}
2016-01-13 21:14:34 +00:00
if (bPlayer.isElementToggled(Element.FIRE)) {
return;
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
2016-01-13 21:14:34 +00:00
if (bPlayer.getBoundAbilityName().equalsIgnoreCase("HeatControl")) {
if (event.getCause() == DamageCause.FIRE || event.getCause() == DamageCause.FIRE_TICK) {
player.setFireTicks(0);
event.setCancelled(true);
}
}
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onEntityDeath(final EntityDeathEvent event) {
if (TempArmor.hasTempArmor(event.getEntity())) {
for (final TempArmor tarmor : TempArmor.getTempArmorList(event.getEntity())) {
tarmor.revert(event.getDrops());
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
}
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
if (MetalClips.isControlled(event.getEntity())) {
event.getDrops().add(new ItemStack(Material.IRON_INGOT, MetalClips.getTargetToAbility().get(event.getEntity()).getMetalClipsCount()));
}
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final CoreAbility[] cookingFireCombos = { CoreAbility.getAbility("JetBlast"), CoreAbility.getAbility("FireWheel"), CoreAbility.getAbility("FireSpin"), CoreAbility.getAbility("FireKick") };
1.8.4 (#769) * Fix OctopusForm (#734) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Attribute System + FireBlast example (#735) * Attribute System + FireBlast example * Removed PK jar :smiley: :dancer: * Fixes Chi Descriptions/Instructions, Removes Fire Passive (#737) * Fixes missing Chi ability descriptions and instructions https://trello.com/c/3vto7SEn/734-re-add-paralyze-and-rapidpunch-descrip tions-and-instructions * Removes FirePassive Was discussed in CD chat https://trello.com/c/skKfHiwR/733-convert-firebending-passive-to-the-new -passive-system * Change Octoform freezing (#741) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Change Octoform Freezing * Revert "Change Octoform Freezing" This reverts commit d5745fe3171b0e24682631889322d81f153d73bd. * Revert "Revert "Change Octoform Freezing"" This reverts commit 9a91730e0fec7c428f619ffca14e4ea467298b37. * Changed attributes to use plain reflection rather than annotations (#743) * should fix some issues with octopusform (#742) when this .remove() is called nothing has happened with this instance, so the old tempblocks/phasechange never actually get removed, and we get nullpointers trying to remove the ones for this instance since they were never even created * Fixed external elements, subelements and abilities not loading (#745) Due to plugins that depend on ProjectKorra loading in AFTER pk, when a BendingPlayer object is created, all the external elements, subelements or abilities they may have are lost because they are caught in the null checks. To work around this, we will continuously loop every second for 30 seconds until the request times out. If any elements/abilities the user has haven't loaded in, in that time (the side plugin has taken longer than 30 seconds to load), then it will time out and report it in the console. * New Attribute System (#746) • New Attribute System (WIP) • Fields should now be marked with @Attribute(Attribute.DAMAGE) or whatever the relevant attribute is. • If the Attribute you want is not there, you can provide a string instead • At runtime, these Attributes can be changed with Attributes.modify(ability/element, attribute, modifier) • Air and Chi have all been marked with @Attribute annotations • Updated Particlelib - Fixed bug with dragonbreath and endRod particles being wrong. AND added new 1.11 particles. * Adding blocks to the world async is not allowed (#744) * Wip (#748) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Plant block removal and /b add all feature (#749) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Fixed: Surge and WaterArms not removing plant block * New Feature: /bend add all [player] * fixed passives not enabling on /bend toggle all (#751) * fixed passives not enabling on /bend toggle all * Correct/Update comment to act as a TODO note. * Fix spectator target (#753) * Don't target spectators * Remove debug code - Remove stick debug code that was causing a NullPointerException. * Change block set order when moving earth (#754) - Set the source block to air after setting the target block to the new type. This will eliminate temporary holes, which minimizes major lighting updates. * Fix exceptions (#752) * Fix world check when sending particles - Check by World reference rather than string name comparison. The following Location distanceSquared call will throw an exception if the World names are the same but references aren't. * Fix several exceptions - Destroy LavaFlow instance when the Player leaves the World. - Destroy Torrent instance when the Player leaves the World. - Fix cooldown exception when Player is null. * PhaseChange Speed option added (#756) • Delay option changed to speed • Fixed EarthArmor breaking when a player is paralyzed. * FireManip, WaterBubble & 1.12 (#757) • Added basic FireManipulation. Still needs lots of improving, but that's for another commit. • Redone WaterBubble. Now has a click version and an expand/shrink animation. • Removed AirBubble • Updated Spigot to 1.12 • Fixed Octopus NPE • Fixed EarthArmor remaining after TPs to other worlds * EarthTunnel - DropLootIfNotRevert (#759) * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * Bug Fixes (Catapult, Illumination, Config) (#760) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * Fix LavaFlow (#755) Fixed "AllowNaturalFlow" * Updated to 1.12 with for days (#761) • Redone the (core) ability load system - The old one broke with the Guava update in 1.12 • Fixed some WaterBubble floods • Fixed PhaseChange melting snow super duper fast • Fixed some other misc bugs • Added 1.12 Spigot to classpath * 1.12 Bug Fixes (#762) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 fixes (#763) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 Fixes * Collision fixes, Air sound change, * Tried Fixing Collisions Currently the loops in CollisionInitializer#initializeDefaultCollisions() don't work * 1.8.4 Fixes (#764) * Small 1.8.4 fixes • Fixed selecting snow blocks as a water source not working when they are more than 3 blocks away • Fixed DensityShift turning lava into sand when you land softly • Fixed IceBlast not working on TempBlocks * Added FireManip particle options to config Also removed a sneaky debug message * 1.8.4 Fixes (#765) * Redone Fire Combos (#766) * Finalize Fire Combo split (#767) * 1.8.4 Fixes * Correct Fire Combos * Remove unused imports
2017-06-13 07:54:30 +00:00
if (BENDING_ENTITY_DEATH.containsKey(event.getEntity())) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final CoreAbility coreAbility = (CoreAbility) BENDING_ENTITY_DEATH.get(event.getEntity());
for (final CoreAbility fireCombo : cookingFireCombos) {
1.8.4 (#769) * Fix OctopusForm (#734) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Attribute System + FireBlast example (#735) * Attribute System + FireBlast example * Removed PK jar :smiley: :dancer: * Fixes Chi Descriptions/Instructions, Removes Fire Passive (#737) * Fixes missing Chi ability descriptions and instructions https://trello.com/c/3vto7SEn/734-re-add-paralyze-and-rapidpunch-descrip tions-and-instructions * Removes FirePassive Was discussed in CD chat https://trello.com/c/skKfHiwR/733-convert-firebending-passive-to-the-new -passive-system * Change Octoform freezing (#741) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Change Octoform Freezing * Revert "Change Octoform Freezing" This reverts commit d5745fe3171b0e24682631889322d81f153d73bd. * Revert "Revert "Change Octoform Freezing"" This reverts commit 9a91730e0fec7c428f619ffca14e4ea467298b37. * Changed attributes to use plain reflection rather than annotations (#743) * should fix some issues with octopusform (#742) when this .remove() is called nothing has happened with this instance, so the old tempblocks/phasechange never actually get removed, and we get nullpointers trying to remove the ones for this instance since they were never even created * Fixed external elements, subelements and abilities not loading (#745) Due to plugins that depend on ProjectKorra loading in AFTER pk, when a BendingPlayer object is created, all the external elements, subelements or abilities they may have are lost because they are caught in the null checks. To work around this, we will continuously loop every second for 30 seconds until the request times out. If any elements/abilities the user has haven't loaded in, in that time (the side plugin has taken longer than 30 seconds to load), then it will time out and report it in the console. * New Attribute System (#746) • New Attribute System (WIP) • Fields should now be marked with @Attribute(Attribute.DAMAGE) or whatever the relevant attribute is. • If the Attribute you want is not there, you can provide a string instead • At runtime, these Attributes can be changed with Attributes.modify(ability/element, attribute, modifier) • Air and Chi have all been marked with @Attribute annotations • Updated Particlelib - Fixed bug with dragonbreath and endRod particles being wrong. AND added new 1.11 particles. * Adding blocks to the world async is not allowed (#744) * Wip (#748) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Plant block removal and /b add all feature (#749) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Fixed: Surge and WaterArms not removing plant block * New Feature: /bend add all [player] * fixed passives not enabling on /bend toggle all (#751) * fixed passives not enabling on /bend toggle all * Correct/Update comment to act as a TODO note. * Fix spectator target (#753) * Don't target spectators * Remove debug code - Remove stick debug code that was causing a NullPointerException. * Change block set order when moving earth (#754) - Set the source block to air after setting the target block to the new type. This will eliminate temporary holes, which minimizes major lighting updates. * Fix exceptions (#752) * Fix world check when sending particles - Check by World reference rather than string name comparison. The following Location distanceSquared call will throw an exception if the World names are the same but references aren't. * Fix several exceptions - Destroy LavaFlow instance when the Player leaves the World. - Destroy Torrent instance when the Player leaves the World. - Fix cooldown exception when Player is null. * PhaseChange Speed option added (#756) • Delay option changed to speed • Fixed EarthArmor breaking when a player is paralyzed. * FireManip, WaterBubble & 1.12 (#757) • Added basic FireManipulation. Still needs lots of improving, but that's for another commit. • Redone WaterBubble. Now has a click version and an expand/shrink animation. • Removed AirBubble • Updated Spigot to 1.12 • Fixed Octopus NPE • Fixed EarthArmor remaining after TPs to other worlds * EarthTunnel - DropLootIfNotRevert (#759) * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * Bug Fixes (Catapult, Illumination, Config) (#760) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * Fix LavaFlow (#755) Fixed "AllowNaturalFlow" * Updated to 1.12 with for days (#761) • Redone the (core) ability load system - The old one broke with the Guava update in 1.12 • Fixed some WaterBubble floods • Fixed PhaseChange melting snow super duper fast • Fixed some other misc bugs • Added 1.12 Spigot to classpath * 1.12 Bug Fixes (#762) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 fixes (#763) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 Fixes * Collision fixes, Air sound change, * Tried Fixing Collisions Currently the loops in CollisionInitializer#initializeDefaultCollisions() don't work * 1.8.4 Fixes (#764) * Small 1.8.4 fixes • Fixed selecting snow blocks as a water source not working when they are more than 3 blocks away • Fixed DensityShift turning lava into sand when you land softly • Fixed IceBlast not working on TempBlocks * Added FireManip particle options to config Also removed a sneaky debug message * 1.8.4 Fixes (#765) * Redone Fire Combos (#766) * Finalize Fire Combo split (#767) * 1.8.4 Fixes * Correct Fire Combos * Remove unused imports
2017-06-13 07:54:30 +00:00
if (coreAbility.getName().equalsIgnoreCase(fireCombo.getName())) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final List<ItemStack> drops = event.getDrops();
final List<ItemStack> newDrops = new ArrayList<>();
1.8.4 (#769) * Fix OctopusForm (#734) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Attribute System + FireBlast example (#735) * Attribute System + FireBlast example * Removed PK jar :smiley: :dancer: * Fixes Chi Descriptions/Instructions, Removes Fire Passive (#737) * Fixes missing Chi ability descriptions and instructions https://trello.com/c/3vto7SEn/734-re-add-paralyze-and-rapidpunch-descrip tions-and-instructions * Removes FirePassive Was discussed in CD chat https://trello.com/c/skKfHiwR/733-convert-firebending-passive-to-the-new -passive-system * Change Octoform freezing (#741) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Change Octoform Freezing * Revert "Change Octoform Freezing" This reverts commit d5745fe3171b0e24682631889322d81f153d73bd. * Revert "Revert "Change Octoform Freezing"" This reverts commit 9a91730e0fec7c428f619ffca14e4ea467298b37. * Changed attributes to use plain reflection rather than annotations (#743) * should fix some issues with octopusform (#742) when this .remove() is called nothing has happened with this instance, so the old tempblocks/phasechange never actually get removed, and we get nullpointers trying to remove the ones for this instance since they were never even created * Fixed external elements, subelements and abilities not loading (#745) Due to plugins that depend on ProjectKorra loading in AFTER pk, when a BendingPlayer object is created, all the external elements, subelements or abilities they may have are lost because they are caught in the null checks. To work around this, we will continuously loop every second for 30 seconds until the request times out. If any elements/abilities the user has haven't loaded in, in that time (the side plugin has taken longer than 30 seconds to load), then it will time out and report it in the console. * New Attribute System (#746) • New Attribute System (WIP) • Fields should now be marked with @Attribute(Attribute.DAMAGE) or whatever the relevant attribute is. • If the Attribute you want is not there, you can provide a string instead • At runtime, these Attributes can be changed with Attributes.modify(ability/element, attribute, modifier) • Air and Chi have all been marked with @Attribute annotations • Updated Particlelib - Fixed bug with dragonbreath and endRod particles being wrong. AND added new 1.11 particles. * Adding blocks to the world async is not allowed (#744) * Wip (#748) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Plant block removal and /b add all feature (#749) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Fixed: Surge and WaterArms not removing plant block * New Feature: /bend add all [player] * fixed passives not enabling on /bend toggle all (#751) * fixed passives not enabling on /bend toggle all * Correct/Update comment to act as a TODO note. * Fix spectator target (#753) * Don't target spectators * Remove debug code - Remove stick debug code that was causing a NullPointerException. * Change block set order when moving earth (#754) - Set the source block to air after setting the target block to the new type. This will eliminate temporary holes, which minimizes major lighting updates. * Fix exceptions (#752) * Fix world check when sending particles - Check by World reference rather than string name comparison. The following Location distanceSquared call will throw an exception if the World names are the same but references aren't. * Fix several exceptions - Destroy LavaFlow instance when the Player leaves the World. - Destroy Torrent instance when the Player leaves the World. - Fix cooldown exception when Player is null. * PhaseChange Speed option added (#756) • Delay option changed to speed • Fixed EarthArmor breaking when a player is paralyzed. * FireManip, WaterBubble & 1.12 (#757) • Added basic FireManipulation. Still needs lots of improving, but that's for another commit. • Redone WaterBubble. Now has a click version and an expand/shrink animation. • Removed AirBubble • Updated Spigot to 1.12 • Fixed Octopus NPE • Fixed EarthArmor remaining after TPs to other worlds * EarthTunnel - DropLootIfNotRevert (#759) * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * Bug Fixes (Catapult, Illumination, Config) (#760) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * Fix LavaFlow (#755) Fixed "AllowNaturalFlow" * Updated to 1.12 with for days (#761) • Redone the (core) ability load system - The old one broke with the Guava update in 1.12 • Fixed some WaterBubble floods • Fixed PhaseChange melting snow super duper fast • Fixed some other misc bugs • Added 1.12 Spigot to classpath * 1.12 Bug Fixes (#762) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 fixes (#763) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 Fixes * Collision fixes, Air sound change, * Tried Fixing Collisions Currently the loops in CollisionInitializer#initializeDefaultCollisions() don't work * 1.8.4 Fixes (#764) * Small 1.8.4 fixes • Fixed selecting snow blocks as a water source not working when they are more than 3 blocks away • Fixed DensityShift turning lava into sand when you land softly • Fixed IceBlast not working on TempBlocks * Added FireManip particle options to config Also removed a sneaky debug message * 1.8.4 Fixes (#765) * Redone Fire Combos (#766) * Finalize Fire Combo split (#767) * 1.8.4 Fixes * Correct Fire Combos * Remove unused imports
2017-06-13 07:54:30 +00:00
for (int i = 0; i < drops.size(); i++) {
ItemStack cooked = drops.get(i);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final Material material = drops.get(i).getType();
1.8.4 (#769) * Fix OctopusForm (#734) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Attribute System + FireBlast example (#735) * Attribute System + FireBlast example * Removed PK jar :smiley: :dancer: * Fixes Chi Descriptions/Instructions, Removes Fire Passive (#737) * Fixes missing Chi ability descriptions and instructions https://trello.com/c/3vto7SEn/734-re-add-paralyze-and-rapidpunch-descrip tions-and-instructions * Removes FirePassive Was discussed in CD chat https://trello.com/c/skKfHiwR/733-convert-firebending-passive-to-the-new -passive-system * Change Octoform freezing (#741) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Change Octoform Freezing * Revert "Change Octoform Freezing" This reverts commit d5745fe3171b0e24682631889322d81f153d73bd. * Revert "Revert "Change Octoform Freezing"" This reverts commit 9a91730e0fec7c428f619ffca14e4ea467298b37. * Changed attributes to use plain reflection rather than annotations (#743) * should fix some issues with octopusform (#742) when this .remove() is called nothing has happened with this instance, so the old tempblocks/phasechange never actually get removed, and we get nullpointers trying to remove the ones for this instance since they were never even created * Fixed external elements, subelements and abilities not loading (#745) Due to plugins that depend on ProjectKorra loading in AFTER pk, when a BendingPlayer object is created, all the external elements, subelements or abilities they may have are lost because they are caught in the null checks. To work around this, we will continuously loop every second for 30 seconds until the request times out. If any elements/abilities the user has haven't loaded in, in that time (the side plugin has taken longer than 30 seconds to load), then it will time out and report it in the console. * New Attribute System (#746) • New Attribute System (WIP) • Fields should now be marked with @Attribute(Attribute.DAMAGE) or whatever the relevant attribute is. • If the Attribute you want is not there, you can provide a string instead • At runtime, these Attributes can be changed with Attributes.modify(ability/element, attribute, modifier) • Air and Chi have all been marked with @Attribute annotations • Updated Particlelib - Fixed bug with dragonbreath and endRod particles being wrong. AND added new 1.11 particles. * Adding blocks to the world async is not allowed (#744) * Wip (#748) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Plant block removal and /b add all feature (#749) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Fixed: Surge and WaterArms not removing plant block * New Feature: /bend add all [player] * fixed passives not enabling on /bend toggle all (#751) * fixed passives not enabling on /bend toggle all * Correct/Update comment to act as a TODO note. * Fix spectator target (#753) * Don't target spectators * Remove debug code - Remove stick debug code that was causing a NullPointerException. * Change block set order when moving earth (#754) - Set the source block to air after setting the target block to the new type. This will eliminate temporary holes, which minimizes major lighting updates. * Fix exceptions (#752) * Fix world check when sending particles - Check by World reference rather than string name comparison. The following Location distanceSquared call will throw an exception if the World names are the same but references aren't. * Fix several exceptions - Destroy LavaFlow instance when the Player leaves the World. - Destroy Torrent instance when the Player leaves the World. - Fix cooldown exception when Player is null. * PhaseChange Speed option added (#756) • Delay option changed to speed • Fixed EarthArmor breaking when a player is paralyzed. * FireManip, WaterBubble & 1.12 (#757) • Added basic FireManipulation. Still needs lots of improving, but that's for another commit. • Redone WaterBubble. Now has a click version and an expand/shrink animation. • Removed AirBubble • Updated Spigot to 1.12 • Fixed Octopus NPE • Fixed EarthArmor remaining after TPs to other worlds * EarthTunnel - DropLootIfNotRevert (#759) * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * Bug Fixes (Catapult, Illumination, Config) (#760) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * Fix LavaFlow (#755) Fixed "AllowNaturalFlow" * Updated to 1.12 with for days (#761) • Redone the (core) ability load system - The old one broke with the Guava update in 1.12 • Fixed some WaterBubble floods • Fixed PhaseChange melting snow super duper fast • Fixed some other misc bugs • Added 1.12 Spigot to classpath * 1.12 Bug Fixes (#762) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 fixes (#763) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 Fixes * Collision fixes, Air sound change, * Tried Fixing Collisions Currently the loops in CollisionInitializer#initializeDefaultCollisions() don't work * 1.8.4 Fixes (#764) * Small 1.8.4 fixes • Fixed selecting snow blocks as a water source not working when they are more than 3 blocks away • Fixed DensityShift turning lava into sand when you land softly • Fixed IceBlast not working on TempBlocks * Added FireManip particle options to config Also removed a sneaky debug message * 1.8.4 Fixes (#765) * Redone Fire Combos (#766) * Finalize Fire Combo split (#767) * 1.8.4 Fixes * Correct Fire Combos * Remove unused imports
2017-06-13 07:54:30 +00:00
switch (material) {
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
case BEEF:
cooked = new ItemStack(Material.COOKED_BEEF);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
break;
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
case SALMON:
cooked = new ItemStack(Material.COOKED_SALMON);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
break;
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
case CHICKEN:
cooked = new ItemStack(Material.COOKED_CHICKEN);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
break;
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
case PORKCHOP:
cooked = new ItemStack(Material.COOKED_PORKCHOP);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
break;
case MUTTON:
cooked = new ItemStack(Material.COOKED_MUTTON);
break;
case RABBIT:
cooked = new ItemStack(Material.COOKED_RABBIT);
break;
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
case COD:
cooked = new ItemStack(Material.COOKED_COD);
break;
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
default:
break;
2017-01-16 03:37:21 +00:00
}
1.8.4 (#769) * Fix OctopusForm (#734) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Attribute System + FireBlast example (#735) * Attribute System + FireBlast example * Removed PK jar :smiley: :dancer: * Fixes Chi Descriptions/Instructions, Removes Fire Passive (#737) * Fixes missing Chi ability descriptions and instructions https://trello.com/c/3vto7SEn/734-re-add-paralyze-and-rapidpunch-descrip tions-and-instructions * Removes FirePassive Was discussed in CD chat https://trello.com/c/skKfHiwR/733-convert-firebending-passive-to-the-new -passive-system * Change Octoform freezing (#741) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Change Octoform Freezing * Revert "Change Octoform Freezing" This reverts commit d5745fe3171b0e24682631889322d81f153d73bd. * Revert "Revert "Change Octoform Freezing"" This reverts commit 9a91730e0fec7c428f619ffca14e4ea467298b37. * Changed attributes to use plain reflection rather than annotations (#743) * should fix some issues with octopusform (#742) when this .remove() is called nothing has happened with this instance, so the old tempblocks/phasechange never actually get removed, and we get nullpointers trying to remove the ones for this instance since they were never even created * Fixed external elements, subelements and abilities not loading (#745) Due to plugins that depend on ProjectKorra loading in AFTER pk, when a BendingPlayer object is created, all the external elements, subelements or abilities they may have are lost because they are caught in the null checks. To work around this, we will continuously loop every second for 30 seconds until the request times out. If any elements/abilities the user has haven't loaded in, in that time (the side plugin has taken longer than 30 seconds to load), then it will time out and report it in the console. * New Attribute System (#746) • New Attribute System (WIP) • Fields should now be marked with @Attribute(Attribute.DAMAGE) or whatever the relevant attribute is. • If the Attribute you want is not there, you can provide a string instead • At runtime, these Attributes can be changed with Attributes.modify(ability/element, attribute, modifier) • Air and Chi have all been marked with @Attribute annotations • Updated Particlelib - Fixed bug with dragonbreath and endRod particles being wrong. AND added new 1.11 particles. * Adding blocks to the world async is not allowed (#744) * Wip (#748) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Plant block removal and /b add all feature (#749) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Fixed: Surge and WaterArms not removing plant block * New Feature: /bend add all [player] * fixed passives not enabling on /bend toggle all (#751) * fixed passives not enabling on /bend toggle all * Correct/Update comment to act as a TODO note. * Fix spectator target (#753) * Don't target spectators * Remove debug code - Remove stick debug code that was causing a NullPointerException. * Change block set order when moving earth (#754) - Set the source block to air after setting the target block to the new type. This will eliminate temporary holes, which minimizes major lighting updates. * Fix exceptions (#752) * Fix world check when sending particles - Check by World reference rather than string name comparison. The following Location distanceSquared call will throw an exception if the World names are the same but references aren't. * Fix several exceptions - Destroy LavaFlow instance when the Player leaves the World. - Destroy Torrent instance when the Player leaves the World. - Fix cooldown exception when Player is null. * PhaseChange Speed option added (#756) • Delay option changed to speed • Fixed EarthArmor breaking when a player is paralyzed. * FireManip, WaterBubble & 1.12 (#757) • Added basic FireManipulation. Still needs lots of improving, but that's for another commit. • Redone WaterBubble. Now has a click version and an expand/shrink animation. • Removed AirBubble • Updated Spigot to 1.12 • Fixed Octopus NPE • Fixed EarthArmor remaining after TPs to other worlds * EarthTunnel - DropLootIfNotRevert (#759) * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * Bug Fixes (Catapult, Illumination, Config) (#760) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * Fix LavaFlow (#755) Fixed "AllowNaturalFlow" * Updated to 1.12 with for days (#761) • Redone the (core) ability load system - The old one broke with the Guava update in 1.12 • Fixed some WaterBubble floods • Fixed PhaseChange melting snow super duper fast • Fixed some other misc bugs • Added 1.12 Spigot to classpath * 1.12 Bug Fixes (#762) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 fixes (#763) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 Fixes * Collision fixes, Air sound change, * Tried Fixing Collisions Currently the loops in CollisionInitializer#initializeDefaultCollisions() don't work * 1.8.4 Fixes (#764) * Small 1.8.4 fixes • Fixed selecting snow blocks as a water source not working when they are more than 3 blocks away • Fixed DensityShift turning lava into sand when you land softly • Fixed IceBlast not working on TempBlocks * Added FireManip particle options to config Also removed a sneaky debug message * 1.8.4 Fixes (#765) * Redone Fire Combos (#766) * Finalize Fire Combo split (#767) * 1.8.4 Fixes * Correct Fire Combos * Remove unused imports
2017-06-13 07:54:30 +00:00
newDrops.add(cooked);
}
event.getDrops().clear();
event.getDrops().addAll(newDrops);
break;
}
}
}
}
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onEntityExplode(final EntityExplodeEvent event) {
for (final Block block : event.blockList()) {
final EarthBlast blast = EarthBlast.getBlastFromSource(block);
if (blast != null) {
2016-01-13 21:14:34 +00:00
blast.remove();
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
PhaseChange recode and EarthGrab fix (#661) * Fix metalclips - Removed a check that was preventing metalclips from progressing past 1 clip on a target. * Fix metalclips - Fixed a bug limiting the metal clip count to one * Improve MetalClips - Fixed bug where shooting at a block spawned two clips - Added ShootCooldown and CrushCooldown - ShootCooldown only applies to shooting clips - Changed how crushing works: --- Removed old style and variables --- When controlling an entity with 4 clips, the controller can click to cause the armor to "crush" and damage the entity. --- Has own cooldown, default of 2000 (2 seconds) - Changed launching --- Works with all clip amounts except 4 --- When the user releases sneak, the entity will be launched at varying power depending on how many clips were attached. - Changed ability cooldown to activate only after the ability is finished. * Add CrushDamage option to MetalClips * New Damage Type, MetalClips changes - Fixed MetalClips bug caused in magnetizing - Added ignoreArmor option to damageEntity method, default true for most abilities. If wanted to be changed, someone needs to go through and add false as a parameter - Changed default config option for MetalClips description * PhaseChange recode * Chris wanted changes * Chris doesn't want bugs * Only you can prevent bugs - Added checks for worlds to prevent errors * Remove unnecessary auto generated comments * Loony didn't like the passive * Added RegionProtection checks * PhaseChange * Revert "PhaseChange" This reverts commit 761c73f5756771674719ffca52413cffa09243a8. * Revert "Added RegionProtection checks" This reverts commit b53a02a74d0276d4d1e773e1c197666cbcfab624. * Revert "Loony didn't like the passive" This reverts commit 6612bb7fa8eea3e26c01d0ef761c658447779e03. * Revert "Remove unnecessary auto generated comments" This reverts commit da9c45106d0b7e256c278e6a84d15f7a7340a140. * Revert "Only you can prevent bugs" This reverts commit 630161659ea89bfb106924c8ab1fbcdb8f6f1310. * Revert "Chris doesn't want bugs" This reverts commit eda2dee6b52dd38c73f35680c5e4484adc5b5b91. * Revert "Chris wanted changes" This reverts commit 30b76c10c4adc63784ea7115eb4f9c636650d6c5. * Revert "PhaseChange recode" This reverts commit f8f290dd8c57a3467a87de7e43b58ce635196c62. * Conflicts * Stupid conflicts * I hope and pray * Revert "Revert "Chris wanted changes"" This reverts commit e612607c8a16a735c92014714c00aa671954b4a5. * Revert "Revert "Chris doesn't want bugs"" This reverts commit bd656b814d7ffa2d9c84fa304d3adb8f1535f782. * Revert "Revert "Only you can prevent bugs"" This reverts commit 7772c95737130cf414ff1af49dcfb48865be5374. * Revert "Revert "Remove unnecessary auto generated comments"" This reverts commit 69315dc7baa6cd237fbd89394e544913596ec6e3. * Revert "Revert "Loony didn't like the passive"" This reverts commit ea397c6323e50d219395d5912850513afd6f2a7b. * Revert "Revert "Added RegionProtection checks"" This reverts commit 8cb41709f65e4322e68b2f0e1792987f7fc214f2. * Revert "Revert "PhaseChange"" This reverts commit da6b0e7071acf74df6447b15daf4ae6e39f057f6. * Working PhaseChange finally * Fix EarthGrab * Air fixes, PhaseChange changes
2016-12-20 04:43:56 +00:00
if (PhaseChange.getFrozenBlocksAsBlock().contains(block)) {
PhaseChange.thaw(block);
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
2016-01-13 21:14:34 +00:00
if (SurgeWall.getWallBlocks().containsKey(block)) {
block.setType(Material.AIR);
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
2016-01-13 21:14:34 +00:00
if (!SurgeWave.canThaw(block)) {
SurgeWave.thaw(block);
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
2016-01-13 21:14:34 +00:00
if (EarthAbility.getMovedEarth().containsKey(block)) {
EarthAbility.removeRevertIndex(block);
}
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onEntityExplodeEvent(final EntityExplodeEvent event) {
final Entity entity = event.getEntity();
2016-01-13 21:14:34 +00:00
if (entity != null) {
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
if (MovementHandler.isStopped(entity) || Bloodbending.isBloodbent(entity) || Suffocate.isBreathbent(entity)) {
event.setCancelled(true);
2016-01-13 21:14:34 +00:00
}
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onEntityInteractEvent(final EntityInteractEvent event) {
final Entity entity = event.getEntity();
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
if (MovementHandler.isStopped(entity) || Bloodbending.isBloodbent(entity) || Suffocate.isBreathbent(entity)) {
event.setCancelled(true);
2016-01-13 21:14:34 +00:00
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onEntityProjectileLaunchEvent(final ProjectileLaunchEvent event) {
final Entity entity = event.getEntity();
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
if (MovementHandler.isStopped(entity) || Bloodbending.isBloodbent(entity) || Suffocate.isBreathbent(entity)) {
event.setCancelled(true);
2016-01-13 21:14:34 +00:00
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onEntityShootBowEvent(final EntityShootBowEvent event) {
final Entity entity = event.getEntity();
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
if (MovementHandler.isStopped(entity) || Bloodbending.isBloodbent(entity) || Suffocate.isBreathbent(entity)) {
event.setCancelled(true);
2016-01-13 21:14:34 +00:00
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onEntitySlimeSplitEvent(final SlimeSplitEvent event) {
final Entity entity = event.getEntity();
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
if (MovementHandler.isStopped(entity) || Bloodbending.isBloodbent(entity) || Suffocate.isBreathbent(entity)) {
event.setCancelled(true);
2016-01-13 21:14:34 +00:00
}
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onEntitySuffocatedByTempBlocks(final EntityDamageEvent event) {
if (event.getCause() == DamageCause.SUFFOCATION) {
if (TempBlock.isTempBlock(event.getEntity().getLocation().add(0, 1, 0).getBlock())) {
event.setCancelled(true);
}
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onEntityTarget(final EntityTargetEvent event) {
final Entity entity = event.getEntity();
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
if (MovementHandler.isStopped(entity) || Bloodbending.isBloodbent(entity)) {
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onEntityTargetLiving(final EntityTargetLivingEntityEvent event) {
final Entity entity = event.getEntity();
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
if (MovementHandler.isStopped(entity) || Bloodbending.isBloodbent(entity)) {
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onEntityTeleportEvent(final EntityTeleportEvent event) {
final Entity entity = event.getEntity();
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (MovementHandler.isStopped(entity) || Bloodbending.isBloodbent(entity) || Suffocate.isBreathbent(entity) || (entity instanceof LivingEntity && MetalClips.isControlled((LivingEntity) entity))) {
event.setCancelled(true);
2016-01-13 21:14:34 +00:00
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
1.8.4 (#769) * Fix OctopusForm (#734) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Attribute System + FireBlast example (#735) * Attribute System + FireBlast example * Removed PK jar :smiley: :dancer: * Fixes Chi Descriptions/Instructions, Removes Fire Passive (#737) * Fixes missing Chi ability descriptions and instructions https://trello.com/c/3vto7SEn/734-re-add-paralyze-and-rapidpunch-descrip tions-and-instructions * Removes FirePassive Was discussed in CD chat https://trello.com/c/skKfHiwR/733-convert-firebending-passive-to-the-new -passive-system * Change Octoform freezing (#741) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Change Octoform Freezing * Revert "Change Octoform Freezing" This reverts commit d5745fe3171b0e24682631889322d81f153d73bd. * Revert "Revert "Change Octoform Freezing"" This reverts commit 9a91730e0fec7c428f619ffca14e4ea467298b37. * Changed attributes to use plain reflection rather than annotations (#743) * should fix some issues with octopusform (#742) when this .remove() is called nothing has happened with this instance, so the old tempblocks/phasechange never actually get removed, and we get nullpointers trying to remove the ones for this instance since they were never even created * Fixed external elements, subelements and abilities not loading (#745) Due to plugins that depend on ProjectKorra loading in AFTER pk, when a BendingPlayer object is created, all the external elements, subelements or abilities they may have are lost because they are caught in the null checks. To work around this, we will continuously loop every second for 30 seconds until the request times out. If any elements/abilities the user has haven't loaded in, in that time (the side plugin has taken longer than 30 seconds to load), then it will time out and report it in the console. * New Attribute System (#746) • New Attribute System (WIP) • Fields should now be marked with @Attribute(Attribute.DAMAGE) or whatever the relevant attribute is. • If the Attribute you want is not there, you can provide a string instead • At runtime, these Attributes can be changed with Attributes.modify(ability/element, attribute, modifier) • Air and Chi have all been marked with @Attribute annotations • Updated Particlelib - Fixed bug with dragonbreath and endRod particles being wrong. AND added new 1.11 particles. * Adding blocks to the world async is not allowed (#744) * Wip (#748) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Plant block removal and /b add all feature (#749) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Fixed: Surge and WaterArms not removing plant block * New Feature: /bend add all [player] * fixed passives not enabling on /bend toggle all (#751) * fixed passives not enabling on /bend toggle all * Correct/Update comment to act as a TODO note. * Fix spectator target (#753) * Don't target spectators * Remove debug code - Remove stick debug code that was causing a NullPointerException. * Change block set order when moving earth (#754) - Set the source block to air after setting the target block to the new type. This will eliminate temporary holes, which minimizes major lighting updates. * Fix exceptions (#752) * Fix world check when sending particles - Check by World reference rather than string name comparison. The following Location distanceSquared call will throw an exception if the World names are the same but references aren't. * Fix several exceptions - Destroy LavaFlow instance when the Player leaves the World. - Destroy Torrent instance when the Player leaves the World. - Fix cooldown exception when Player is null. * PhaseChange Speed option added (#756) • Delay option changed to speed • Fixed EarthArmor breaking when a player is paralyzed. * FireManip, WaterBubble & 1.12 (#757) • Added basic FireManipulation. Still needs lots of improving, but that's for another commit. • Redone WaterBubble. Now has a click version and an expand/shrink animation. • Removed AirBubble • Updated Spigot to 1.12 • Fixed Octopus NPE • Fixed EarthArmor remaining after TPs to other worlds * EarthTunnel - DropLootIfNotRevert (#759) * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * Bug Fixes (Catapult, Illumination, Config) (#760) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * Fix LavaFlow (#755) Fixed "AllowNaturalFlow" * Updated to 1.12 with for days (#761) • Redone the (core) ability load system - The old one broke with the Guava update in 1.12 • Fixed some WaterBubble floods • Fixed PhaseChange melting snow super duper fast • Fixed some other misc bugs • Added 1.12 Spigot to classpath * 1.12 Bug Fixes (#762) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 fixes (#763) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 Fixes * Collision fixes, Air sound change, * Tried Fixing Collisions Currently the loops in CollisionInitializer#initializeDefaultCollisions() don't work * 1.8.4 Fixes (#764) * Small 1.8.4 fixes • Fixed selecting snow blocks as a water source not working when they are more than 3 blocks away • Fixed DensityShift turning lava into sand when you land softly • Fixed IceBlast not working on TempBlocks * Added FireManip particle options to config Also removed a sneaky debug message * 1.8.4 Fixes (#765) * Redone Fire Combos (#766) * Finalize Fire Combo split (#767) * 1.8.4 Fixes * Correct Fire Combos * Remove unused imports
2017-06-13 07:54:30 +00:00
if (entity instanceof LivingEntity && TempArmor.hasTempArmor((LivingEntity) entity)) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
for (final TempArmor armor : TempArmor.getTempArmorList((LivingEntity) entity)) {
armor.revert(null);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
}
1.8.4 (#769) * Fix OctopusForm (#734) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Attribute System + FireBlast example (#735) * Attribute System + FireBlast example * Removed PK jar :smiley: :dancer: * Fixes Chi Descriptions/Instructions, Removes Fire Passive (#737) * Fixes missing Chi ability descriptions and instructions https://trello.com/c/3vto7SEn/734-re-add-paralyze-and-rapidpunch-descrip tions-and-instructions * Removes FirePassive Was discussed in CD chat https://trello.com/c/skKfHiwR/733-convert-firebending-passive-to-the-new -passive-system * Change Octoform freezing (#741) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Change Octoform Freezing * Revert "Change Octoform Freezing" This reverts commit d5745fe3171b0e24682631889322d81f153d73bd. * Revert "Revert "Change Octoform Freezing"" This reverts commit 9a91730e0fec7c428f619ffca14e4ea467298b37. * Changed attributes to use plain reflection rather than annotations (#743) * should fix some issues with octopusform (#742) when this .remove() is called nothing has happened with this instance, so the old tempblocks/phasechange never actually get removed, and we get nullpointers trying to remove the ones for this instance since they were never even created * Fixed external elements, subelements and abilities not loading (#745) Due to plugins that depend on ProjectKorra loading in AFTER pk, when a BendingPlayer object is created, all the external elements, subelements or abilities they may have are lost because they are caught in the null checks. To work around this, we will continuously loop every second for 30 seconds until the request times out. If any elements/abilities the user has haven't loaded in, in that time (the side plugin has taken longer than 30 seconds to load), then it will time out and report it in the console. * New Attribute System (#746) • New Attribute System (WIP) • Fields should now be marked with @Attribute(Attribute.DAMAGE) or whatever the relevant attribute is. • If the Attribute you want is not there, you can provide a string instead • At runtime, these Attributes can be changed with Attributes.modify(ability/element, attribute, modifier) • Air and Chi have all been marked with @Attribute annotations • Updated Particlelib - Fixed bug with dragonbreath and endRod particles being wrong. AND added new 1.11 particles. * Adding blocks to the world async is not allowed (#744) * Wip (#748) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Plant block removal and /b add all feature (#749) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Fixed: Surge and WaterArms not removing plant block * New Feature: /bend add all [player] * fixed passives not enabling on /bend toggle all (#751) * fixed passives not enabling on /bend toggle all * Correct/Update comment to act as a TODO note. * Fix spectator target (#753) * Don't target spectators * Remove debug code - Remove stick debug code that was causing a NullPointerException. * Change block set order when moving earth (#754) - Set the source block to air after setting the target block to the new type. This will eliminate temporary holes, which minimizes major lighting updates. * Fix exceptions (#752) * Fix world check when sending particles - Check by World reference rather than string name comparison. The following Location distanceSquared call will throw an exception if the World names are the same but references aren't. * Fix several exceptions - Destroy LavaFlow instance when the Player leaves the World. - Destroy Torrent instance when the Player leaves the World. - Fix cooldown exception when Player is null. * PhaseChange Speed option added (#756) • Delay option changed to speed • Fixed EarthArmor breaking when a player is paralyzed. * FireManip, WaterBubble & 1.12 (#757) • Added basic FireManipulation. Still needs lots of improving, but that's for another commit. • Redone WaterBubble. Now has a click version and an expand/shrink animation. • Removed AirBubble • Updated Spigot to 1.12 • Fixed Octopus NPE • Fixed EarthArmor remaining after TPs to other worlds * EarthTunnel - DropLootIfNotRevert (#759) * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * Bug Fixes (Catapult, Illumination, Config) (#760) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * Fix LavaFlow (#755) Fixed "AllowNaturalFlow" * Updated to 1.12 with for days (#761) • Redone the (core) ability load system - The old one broke with the Guava update in 1.12 • Fixed some WaterBubble floods • Fixed PhaseChange melting snow super duper fast • Fixed some other misc bugs • Added 1.12 Spigot to classpath * 1.12 Bug Fixes (#762) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 fixes (#763) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 Fixes * Collision fixes, Air sound change, * Tried Fixing Collisions Currently the loops in CollisionInitializer#initializeDefaultCollisions() don't work * 1.8.4 Fixes (#764) * Small 1.8.4 fixes • Fixed selecting snow blocks as a water source not working when they are more than 3 blocks away • Fixed DensityShift turning lava into sand when you land softly • Fixed IceBlast not working on TempBlocks * Added FireManip particle options to config Also removed a sneaky debug message * 1.8.4 Fixes (#765) * Redone Fire Combos (#766) * Finalize Fire Combo split (#767) * 1.8.4 Fixes * Correct Fire Combos * Remove unused imports
2017-06-13 07:54:30 +00:00
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
if (entity instanceof Player) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final Player player = (Player) entity;
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
if (CoreAbility.hasAbility(player, EarthArmor.class)) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final EarthArmor abil = CoreAbility.getAbility(player, EarthArmor.class);
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
abil.remove();
}
}
}
@EventHandler
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onHorizontalCollision(final HorizontalVelocityChangeEvent e) {
if (e.getEntity() instanceof LivingEntity) {
if (e.getEntity().getEntityId() != e.getInstigator().getEntityId()) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final double minimumDistance = this.plugin.getConfig().getDouble("Properties.HorizontalCollisionPhysics.WallDamageMinimumDistance");
final double maxDamage = this.plugin.getConfig().getDouble("Properties.HorizontalCollisionPhysics.WallDamageCap");
final double damage = ((e.getDistanceTraveled() - minimumDistance) < 0 ? 0 : e.getDistanceTraveled() - minimumDistance) / (e.getDifference().length());
if (damage > 0) {
if (damage <= maxDamage) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
DamageHandler.damageEntity(e.getEntity(), damage, e.getAbility());
} else {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
DamageHandler.damageEntity(e.getEntity(), maxDamage, e.getAbility());
}
}
}
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onInventoryClick(final InventoryClickEvent event) {
for (final MetalClips clips : CoreAbility.getAbilities(MetalClips.class)) {
2017-01-16 03:37:21 +00:00
if (clips.getTargetEntity() != null && clips.getTargetEntity().getEntityId() == event.getWhoClicked().getEntityId()) {
2016-01-13 21:14:34 +00:00
event.setCancelled(true);
break;
}
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
for (int i = 0; i < 4; i++) {
if (event.getSlot() == 36 + i && TempArmor.hasTempArmor(event.getWhoClicked())) {
event.setCancelled(true);
}
}
}
@EventHandler(priority = EventPriority.NORMAL)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onEntityBendingDeath(final EntityBendingDeathEvent event) {
1.8.4 (#769) * Fix OctopusForm (#734) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Attribute System + FireBlast example (#735) * Attribute System + FireBlast example * Removed PK jar :smiley: :dancer: * Fixes Chi Descriptions/Instructions, Removes Fire Passive (#737) * Fixes missing Chi ability descriptions and instructions https://trello.com/c/3vto7SEn/734-re-add-paralyze-and-rapidpunch-descrip tions-and-instructions * Removes FirePassive Was discussed in CD chat https://trello.com/c/skKfHiwR/733-convert-firebending-passive-to-the-new -passive-system * Change Octoform freezing (#741) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Change Octoform Freezing * Revert "Change Octoform Freezing" This reverts commit d5745fe3171b0e24682631889322d81f153d73bd. * Revert "Revert "Change Octoform Freezing"" This reverts commit 9a91730e0fec7c428f619ffca14e4ea467298b37. * Changed attributes to use plain reflection rather than annotations (#743) * should fix some issues with octopusform (#742) when this .remove() is called nothing has happened with this instance, so the old tempblocks/phasechange never actually get removed, and we get nullpointers trying to remove the ones for this instance since they were never even created * Fixed external elements, subelements and abilities not loading (#745) Due to plugins that depend on ProjectKorra loading in AFTER pk, when a BendingPlayer object is created, all the external elements, subelements or abilities they may have are lost because they are caught in the null checks. To work around this, we will continuously loop every second for 30 seconds until the request times out. If any elements/abilities the user has haven't loaded in, in that time (the side plugin has taken longer than 30 seconds to load), then it will time out and report it in the console. * New Attribute System (#746) • New Attribute System (WIP) • Fields should now be marked with @Attribute(Attribute.DAMAGE) or whatever the relevant attribute is. • If the Attribute you want is not there, you can provide a string instead • At runtime, these Attributes can be changed with Attributes.modify(ability/element, attribute, modifier) • Air and Chi have all been marked with @Attribute annotations • Updated Particlelib - Fixed bug with dragonbreath and endRod particles being wrong. AND added new 1.11 particles. * Adding blocks to the world async is not allowed (#744) * Wip (#748) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Plant block removal and /b add all feature (#749) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Fixed: Surge and WaterArms not removing plant block * New Feature: /bend add all [player] * fixed passives not enabling on /bend toggle all (#751) * fixed passives not enabling on /bend toggle all * Correct/Update comment to act as a TODO note. * Fix spectator target (#753) * Don't target spectators * Remove debug code - Remove stick debug code that was causing a NullPointerException. * Change block set order when moving earth (#754) - Set the source block to air after setting the target block to the new type. This will eliminate temporary holes, which minimizes major lighting updates. * Fix exceptions (#752) * Fix world check when sending particles - Check by World reference rather than string name comparison. The following Location distanceSquared call will throw an exception if the World names are the same but references aren't. * Fix several exceptions - Destroy LavaFlow instance when the Player leaves the World. - Destroy Torrent instance when the Player leaves the World. - Fix cooldown exception when Player is null. * PhaseChange Speed option added (#756) • Delay option changed to speed • Fixed EarthArmor breaking when a player is paralyzed. * FireManip, WaterBubble & 1.12 (#757) • Added basic FireManipulation. Still needs lots of improving, but that's for another commit. • Redone WaterBubble. Now has a click version and an expand/shrink animation. • Removed AirBubble • Updated Spigot to 1.12 • Fixed Octopus NPE • Fixed EarthArmor remaining after TPs to other worlds * EarthTunnel - DropLootIfNotRevert (#759) * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * Bug Fixes (Catapult, Illumination, Config) (#760) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * Fix LavaFlow (#755) Fixed "AllowNaturalFlow" * Updated to 1.12 with for days (#761) • Redone the (core) ability load system - The old one broke with the Guava update in 1.12 • Fixed some WaterBubble floods • Fixed PhaseChange melting snow super duper fast • Fixed some other misc bugs • Added 1.12 Spigot to classpath * 1.12 Bug Fixes (#762) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 fixes (#763) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 Fixes * Collision fixes, Air sound change, * Tried Fixing Collisions Currently the loops in CollisionInitializer#initializeDefaultCollisions() don't work * 1.8.4 Fixes (#764) * Small 1.8.4 fixes • Fixed selecting snow blocks as a water source not working when they are more than 3 blocks away • Fixed DensityShift turning lava into sand when you land softly • Fixed IceBlast not working on TempBlocks * Added FireManip particle options to config Also removed a sneaky debug message * 1.8.4 Fixes (#765) * Redone Fire Combos (#766) * Finalize Fire Combo split (#767) * 1.8.4 Fixes * Correct Fire Combos * Remove unused imports
2017-06-13 07:54:30 +00:00
BENDING_ENTITY_DEATH.put(event.getEntity(), event.getAbility());
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (event.getEntity() instanceof Player) {
if (ConfigManager.languageConfig.get().getBoolean("DeathMessages.Enabled")) {
final Ability ability = event.getAbility();
if (ability == null) {
return;
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
BENDING_PLAYER_DEATH.put((Player) event.getEntity(), ability.getElement().getColor() + ability.getName());
final Player player = (Player) event.getEntity();
2016-01-13 21:14:34 +00:00
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
new BukkitRunnable() {
@Override
public void run() {
BENDING_PLAYER_DEATH.remove(player);
}
}.runTaskLater(ProjectKorra.plugin, 20);
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (event.getAttacker() != null && ProjectKorra.isStatisticsEnabled()) {
StatisticsMethods.addStatisticAbility(event.getAttacker().getUniqueId(), CoreAbility.getAbility(event.getAbility().getName()), com.projectkorra.projectkorra.util.Statistic.PLAYER_KILLS, 1);
}
}
if (event.getAttacker() != null && ProjectKorra.isStatisticsEnabled()) {
StatisticsMethods.addStatisticAbility(event.getAttacker().getUniqueId(), CoreAbility.getAbility(event.getAbility().getName()), com.projectkorra.projectkorra.util.Statistic.TOTAL_KILLS, 1);
}
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
@EventHandler
public void onPlayerBucketEmpty(final PlayerBucketEmptyEvent event) {
final Block block = event.getBlockClicked().getRelative(event.getBlockFace());
if (Illumination.isIlluminationTorch(block)) {
final Player player = Illumination.getBlocks().get(TempBlock.get(block));
CoreAbility.getAbility(player, Illumination.class).remove();
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerChat(final AsyncPlayerChatEvent event) {
final Player player = event.getPlayer();
final BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
String e = "Nonbender";
ChatColor c = ChatColor.WHITE;
if (bPlayer != null) {
if (player.hasPermission("bending.avatar") || bPlayer.getElements().size() > 1) {
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
c = Element.AVATAR.getColor();
e = Element.AVATAR.getName();
} else if (bPlayer.getElements().size() > 0) {
c = bPlayer.getElements().get(0).getColor();
e = bPlayer.getElements().get(0).getName();
}
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final String element = ConfigManager.languageConfig.get().getString("Chat.Prefixes." + e);
2017-01-16 03:37:21 +00:00
event.setFormat(event.getFormat().replace("{element}", c + element + ChatColor.RESET).replace("{ELEMENT}", c + element + ChatColor.RESET).replace("{elementcolor}", c + "").replace("{ELEMENTCOLOR}", c + ""));
if (!ConfigManager.languageConfig.get().getBoolean("Chat.Enable")) {
return;
}
ChatColor color = ChatColor.WHITE;
2016-01-13 21:14:34 +00:00
if (bPlayer == null) {
return;
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (player.hasPermission("bending.avatar") || (bPlayer.hasElement(Element.AIR) && bPlayer.hasElement(Element.EARTH) && bPlayer.hasElement(Element.FIRE) && bPlayer.hasElement(Element.WATER))) {
2016-03-05 00:17:17 +00:00
color = ChatColor.valueOf(ConfigManager.languageConfig.get().getString("Chat.Colors.Avatar"));
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
} else if (bPlayer.getElements().size() > 0) {
color = bPlayer.getElements().get(0).getColor();
}
2016-03-05 00:17:17 +00:00
String format = ConfigManager.languageConfig.get().getString("Chat.Format");
format = format.replace("<message>", "%2$s");
format = format.replace("<name>", color + player.getDisplayName() + ChatColor.RESET);
event.setFormat(format);
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerDamage(final EntityDamageEvent event) {
if (event.getEntity() instanceof Player) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final Player player = (Player) event.getEntity();
final BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
2016-01-13 21:14:34 +00:00
if (bPlayer == null) {
return;
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
} else if (bPlayer.isChiBlocked()) {
return;
2016-01-13 21:14:34 +00:00
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (FlightMultiAbility.getFlyingPlayers().contains(player.getUniqueId())) {
final FlightMultiAbility fma = CoreAbility.getAbility(player, FlightMultiAbility.class);
fma.cancel("taking damage");
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (bPlayer.hasElement(Element.EARTH) && event.getCause() == DamageCause.FALL) {
if (bPlayer.getBoundAbilityName().equalsIgnoreCase("Shockwave")) {
new Shockwave(player, true);
} else if (bPlayer.getBoundAbilityName().equalsIgnoreCase("Catapult")) {
new EarthPillars(player, true);
}
}
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (bPlayer.hasElement(Element.AIR) && event.getCause() == DamageCause.FALL) {
if (bPlayer.getBoundAbilityName().equalsIgnoreCase("AirBurst")) {
new AirBurst(player, true);
}
}
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
CoreAbility gd = CoreAbility.getAbility(GracefulDescent.class);
CoreAbility ds = CoreAbility.getAbility(DensityShift.class);
CoreAbility hs = CoreAbility.getAbility(HydroSink.class);
CoreAbility ab = CoreAbility.getAbility(Acrobatics.class);
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (gd != null && bPlayer.hasElement(Element.AIR) && event.getCause() == DamageCause.FALL && bPlayer.canBendPassive(gd) && bPlayer.canUsePassive(gd) && gd.isEnabled() && PassiveManager.hasPassive(player, gd)) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
event.setDamage(0D);
event.setCancelled(true);
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
} else if (ds != null && bPlayer.hasElement(Element.EARTH) && event.getCause() == DamageCause.FALL && bPlayer.canBendPassive(ds) && bPlayer.canUsePassive(ds) && ds.isEnabled() && PassiveManager.hasPassive(player, ds)) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (DensityShift.softenLanding(player)) {
event.setDamage(0D);
event.setCancelled(true);
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
} else if (hs != null && bPlayer.hasElement(Element.WATER) && event.getCause() == DamageCause.FALL && bPlayer.canBendPassive(hs) && bPlayer.canUsePassive(hs) && hs.isEnabled() && PassiveManager.hasPassive(player, hs)) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (HydroSink.applyNoFall(player)) {
event.setDamage(0D);
event.setCancelled(true);
}
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (ab != null && bPlayer.hasElement(Element.CHI) && event.getCause() == DamageCause.FALL && bPlayer.canBendPassive(ab) && bPlayer.canUsePassive(ab) && ab.isEnabled() && PassiveManager.hasPassive(player, ab)) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final double initdamage = event.getDamage();
final double newdamage = event.getDamage() * Acrobatics.getFallReductionFactor();
final double finaldamage = initdamage - newdamage;
event.setDamage(finaldamage);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (finaldamage <= 0.4) {
event.setCancelled(true);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
}
}
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
if (event.getCause() == DamageCause.FALL) {
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
final Flight flight = Manager.getManager(FlightHandler.class).getInstance(player);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (flight != null) {
if (flight.getPlayer() == flight.getSource()) {
event.setCancelled(true);
}
}
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
CoreAbility hc = CoreAbility.getAbility(HeatControl.class);
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (hc != null && bPlayer.hasElement(Element.FIRE) && bPlayer.canBendPassive(hc) && bPlayer.canUsePassive(hc) && (event.getCause() == DamageCause.FIRE || event.getCause() == DamageCause.FIRE_TICK)) {
event.setCancelled(!HeatControl.canBurn(player));
}
2017-01-16 03:37:21 +00:00
if (bPlayer.hasElement(Element.EARTH) && event.getCause() == DamageCause.SUFFOCATION && TempBlock.isTempBlock(player.getEyeLocation().getBlock())) {
event.setDamage(0D);
event.setCancelled(true);
}
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
if (CoreAbility.getAbility(player, EarthArmor.class) != null) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final EarthArmor eartharmor = CoreAbility.getAbility(player, EarthArmor.class);
eartharmor.updateAbsorbtion();
}
}
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerDamageByPlayer(final EntityDamageByEntityEvent e) {
final Entity source = e.getDamager();
final Entity entity = e.getEntity();
final FireBlastCharged fireball = FireBlastCharged.getFireball(source);
if (fireball != null) {
e.setCancelled(true);
fireball.dealDamage(entity);
return;
}
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
if (MovementHandler.isStopped(e.getDamager())) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final CoreAbility ability = (CoreAbility) e.getDamager().getMetadata("movement:stop").get(0).value();
if (!(ability instanceof EarthGrab)) {
e.setCancelled(true);
return;
}
}
if (entity instanceof Player) {
Suffocate.remove((Player) entity);
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
if (source instanceof Player) { // This is the player hitting someone.
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final Player sourcePlayer = (Player) source;
final BendingPlayer sourceBPlayer = BendingPlayer.getBendingPlayer(sourcePlayer);
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
if (sourceBPlayer == null) {
return;
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
final Ability boundAbil = sourceBPlayer.getBoundAbility();
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
if (sourceBPlayer.getBoundAbility() != null) {
if (!sourceBPlayer.isOnCooldown(boundAbil)) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (sourceBPlayer.canBendPassive(sourceBPlayer.getBoundAbility())) {
if (e.getCause() == DamageCause.ENTITY_ATTACK) {
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
if (sourceBPlayer.getBoundAbility() instanceof ChiAbility) {
if (sourceBPlayer.canCurrentlyBendWithWeapons()) {
if (sourceBPlayer.isElementToggled(Element.CHI)) {
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (boundAbil.equals(CoreAbility.getAbility(Paralyze.class))) {
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
new Paralyze(sourcePlayer, entity);
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
} else if (boundAbil.equals(CoreAbility.getAbility(QuickStrike.class))) {
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
new QuickStrike(sourcePlayer, entity);
e.setCancelled(true);
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
} else if (boundAbil.equals(CoreAbility.getAbility(SwiftKick.class))) {
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
new SwiftKick(sourcePlayer, entity);
e.setCancelled(true);
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
} else if (boundAbil.equals(CoreAbility.getAbility(RapidPunch.class))) {
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
new RapidPunch(sourcePlayer, entity);
e.setCancelled(true);
2017-01-06 01:57:39 +00:00
}
2015-10-25 16:03:15 +00:00
}
}
}
}
}
}
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
} else {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (e.getCause() == DamageCause.ENTITY_ATTACK) {
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
if (sourceBPlayer.canCurrentlyBendWithWeapons()) {
if (sourceBPlayer.isElementToggled(Element.CHI)) {
if (entity instanceof Player) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final Player targetPlayer = (Player) entity;
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
if (ChiPassive.willChiBlock(sourcePlayer, targetPlayer)) {
ChiPassive.blockChi(targetPlayer);
}
}
}
}
}
}
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onPlayerDeath(final PlayerDeathEvent event) {
2016-01-13 21:14:34 +00:00
if (!(event.getEntity() instanceof Player)) {
return;
}
if (event.getKeepInventory()) {
if (TempArmor.hasTempArmor(event.getEntity())) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
for (final TempArmor armor : TempArmor.getTempArmorList(event.getEntity())) {
armor.revert(event.getDrops());
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
}
}
} else {
// Do nothing. TempArmor drops are handled by the EntityDeath event and not PlayerDeath.
2016-01-13 21:14:34 +00:00
}
2016-01-13 21:14:34 +00:00
if (event.getEntity().getKiller() != null) {
if (BENDING_PLAYER_DEATH.containsKey(event.getEntity())) {
2016-03-05 00:17:17 +00:00
String message = ConfigManager.languageConfig.get().getString("DeathMessages.Default");
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final String ability = BENDING_PLAYER_DEATH.get(event.getEntity());
final String tempAbility = ChatColor.stripColor(ability).replaceAll(" ", "");
final CoreAbility coreAbil = CoreAbility.getAbility(tempAbility);
2016-01-13 21:14:34 +00:00
Element element = null;
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final boolean isAvatarAbility = false;
2016-01-13 21:14:34 +00:00
if (coreAbil != null) {
element = coreAbil.getElement();
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
2017-01-16 03:37:21 +00:00
if (HorizontalVelocityTracker.hasBeenDamagedByHorizontalVelocity(event.getEntity()) && Arrays.asList(HorizontalVelocityTracker.abils).contains(tempAbility)) {
if (ConfigManager.languageConfig.get().contains("Abilities." + element.getName() + "." + tempAbility + ".HorizontalVelocityDeath")) {
message = ConfigManager.languageConfig.get().getString("Abilities." + element.getName() + "." + tempAbility + ".HorizontalVelocityDeath");
2016-01-13 21:14:34 +00:00
}
} else if (element != null) {
2017-01-16 03:37:21 +00:00
if (element instanceof SubElement) {
element = ((SubElement) element).getParentElement();
}
if (ConfigManager.languageConfig.get().contains("Abilities." + element.getName() + "." + tempAbility + ".DeathMessage")) {
message = ConfigManager.languageConfig.get().getString("Abilities." + element.getName() + "." + tempAbility + ".DeathMessage");
} else if (ConfigManager.languageConfig.get().contains("Abilities." + element.getName() + ".Combo." + tempAbility + ".DeathMessage")) {
message = ConfigManager.languageConfig.get().getString("Abilities." + element.getName() + ".Combo." + tempAbility + ".DeathMessage");
}
} else {
2016-01-13 21:14:34 +00:00
if (isAvatarAbility) {
2017-01-16 03:37:21 +00:00
if (ConfigManager.languageConfig.get().contains("Abilities.Avatar." + tempAbility + ".DeathMessage")) {
message = ConfigManager.languageConfig.get().getString("Abilities.Avatar." + tempAbility + ".DeathMessage");
2016-01-13 21:14:34 +00:00
}
2017-01-16 03:37:21 +00:00
} else if (ConfigManager.languageConfig.get().contains("Abilities.Avatar.Combo." + tempAbility + ".DeathMessage")) {
message = ConfigManager.languageConfig.get().getString("Abilities.Avatar.Combo." + tempAbility + ".DeathMessage");
2015-10-02 16:14:45 +00:00
}
}
2017-01-16 03:37:21 +00:00
message = message.replace("{victim}", event.getEntity().getName()).replace("{attacker}", event.getEntity().getKiller().getName()).replace("{ability}", ability);
2016-01-13 21:14:34 +00:00
event.setDeathMessage(message);
BENDING_PLAYER_DEATH.remove(event.getEntity());
}
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerItemDrop(PlayerDropItemEvent event) {
Player player = event.getPlayer();
BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
if (event.isCancelled())
return;
if (bPlayer == null)
return;
if (bPlayer.getBoundAbility() == null)
return;
if (!PLAYER_DROPPED_ITEM.contains(player))
PLAYER_DROPPED_ITEM.add(player);
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onPlayerInteraction(final PlayerInteractEvent event) {
final Player player = event.getPlayer();
final BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
if (event.getAction() == Action.RIGHT_CLICK_BLOCK) {
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
if (!RIGHT_CLICK_INTERACT.contains(player.getUniqueId())) {
final UUID uuid = player.getUniqueId();
RIGHT_CLICK_INTERACT.add(uuid);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
new BukkitRunnable() {
@Override
public void run() {
RIGHT_CLICK_INTERACT.remove(uuid);
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
}.runTaskLater(this.plugin, 5);
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
}
if (event.getHand() == EquipmentSlot.HAND) {
2017-01-06 01:57:39 +00:00
if (bPlayer.canCurrentlyBendWithWeapons()) {
if (event.getClickedBlock() != null) {
ComboManager.addComboAbility(player, ClickType.RIGHT_CLICK_BLOCK);
} else {
ComboManager.addComboAbility(player, ClickType.RIGHT_CLICK);
}
}
}
2016-01-13 21:14:34 +00:00
if (bPlayer.getBoundAbilityName().equalsIgnoreCase("EarthSmash")) {
new EarthSmash(player, ClickType.RIGHT_CLICK);
}
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (event.getAction() == Action.RIGHT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_AIR) {
if (bPlayer.getBoundAbilityName().equalsIgnoreCase("IceBlast")) {
if (CoreAbility.hasAbility(player, IceBullet.class)) {
CoreAbility.getAbility(player, IceBullet.class).doRightClick();
}
}
}
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
if (MovementHandler.isStopped(player) || Bloodbending.isBloodbent(player) || Suffocate.isBreathbent(player)) {
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onPlayerInteractEntity(final PlayerInteractAtEntityEvent event) {
final Player player = event.getPlayer();
final BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
2017-01-06 01:57:39 +00:00
if (bPlayer.canCurrentlyBendWithWeapons()) {
ComboManager.addComboAbility(player, ClickType.RIGHT_CLICK_ENTITY);
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (event.getRightClicked().hasMetadata("earthgrab:trap")) {
final EarthGrab eg = (EarthGrab) event.getRightClicked().getMetadata("earthgrab:trap").get(0).value();
eg.damageTrap();
event.setCancelled(true);
return;
}
if (event.getRightClicked().hasMetadata("temparmorstand")) {
event.setCancelled(true);
return;
}
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
if (MovementHandler.isStopped(player) || Bloodbending.isBloodbent(player) || Suffocate.isBreathbent(player)) {
event.setCancelled(true);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
return;
}
2017-01-16 03:37:21 +00:00
if (bPlayer.getBoundAbilityName().equalsIgnoreCase("HealingWaters") && event.getHand().equals(EquipmentSlot.HAND)) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final HealingWaters instance = CoreAbility.getAbility(player, HealingWaters.class);
if (instance != null && instance.charged) {
instance.click();
event.setCancelled(true);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
return;
}
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (!RIGHT_CLICK_INTERACT.contains(player.getUniqueId())) {
if (event.getRightClicked() instanceof Player) {
final Player target = (Player) event.getRightClicked();
if (FlightMultiAbility.getFlyingPlayers().contains(player.getUniqueId())) {
final FlightMultiAbility fma = CoreAbility.getAbility(player, FlightMultiAbility.class);
fma.requestCarry(target);
final UUID uuid = player.getUniqueId();
RIGHT_CLICK_INTERACT.add(uuid);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
new BukkitRunnable() {
@Override
public void run() {
RIGHT_CLICK_INTERACT.remove(uuid);
}
}.runTaskLater(this.plugin, 5);
} else if (FlightMultiAbility.getFlyingPlayers().contains(target.getUniqueId())) {
FlightMultiAbility.acceptCarryRequest(player, target);
}
}
}
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerItemDamage(final PlayerItemDamageEvent event) {
if (TempArmor.hasTempArmor(event.getPlayer())) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final TempArmor armor = TempArmor.getVisibleTempArmor(event.getPlayer());
for (final ItemStack i : armor.getNewArmor()) {
if (i != null && event.getItem().isSimilar(i)) {
event.setCancelled(true);
break;
}
}
}
}
@EventHandler
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onPlayerJoin(final PlayerJoinEvent event) {
final Player player = event.getPlayer();
JUMPS.put(player, player.getStatistic(Statistic.JUMP));
2017-01-16 03:37:21 +00:00
GeneralMethods.createBendingPlayer(player.getUniqueId(), player.getName());
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (ProjectKorra.isStatisticsEnabled()) {
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
Manager.getManager(StatisticsManager.class).load(player.getUniqueId());
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
Bukkit.getScheduler().runTaskLater(ProjectKorra.plugin, (Runnable) () -> {
PassiveManager.registerPassives(player);
GeneralMethods.removeUnusableAbilities(player.getName());
}, 5);
2017-01-16 03:37:21 +00:00
2020-08-30 19:40:31 +00:00
// TFM Start - make players invincible by default
Commands.invincible.add(player.getName());
// TFM End
if (ConfigManager.languageConfig.get().getBoolean("Chat.Branding.JoinMessage.Enabled")) {
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
Bukkit.getScheduler().runTaskLater(ProjectKorra.plugin, (Runnable) () -> {
ChatColor color = ChatColor.valueOf(ConfigManager.languageConfig.get().getString("Chat.Branding.Color").toUpperCase());
color = color == null ? ChatColor.GOLD : color;
final String topBorder = ConfigManager.languageConfig.get().getString("Chat.Branding.Borders.TopBorder");
final String bottomBorder = ConfigManager.languageConfig.get().getString("Chat.Branding.Borders.BottomBorder");
if (!topBorder.isEmpty()) {
player.sendMessage(ChatColor.translateAlternateColorCodes('&', topBorder));
}
player.sendMessage(color + "This server is running ProjectKorra version " + ProjectKorra.plugin.getDescription().getVersion() + " for bending! Find out more at http://www.projectkorra.com!");
if (!bottomBorder.isEmpty()) {
player.sendMessage(ChatColor.translateAlternateColorCodes('&', bottomBorder));
}
}, 20 * 4);
}
}
@EventHandler
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onPlayerChangeWorld(final PlayerChangedWorldEvent event) {
PassiveManager.registerPassives(event.getPlayer());
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
BendingBoardManager.forceToggleScoreboard(event.getPlayer());
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerKick(final PlayerKickEvent event) {
JUMPS.remove(event.getPlayer());
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onPlayerMove(final PlayerMoveEvent event) {
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (event.getTo().getX() == event.getFrom().getX() && event.getTo().getY() == event.getFrom().getY() && event.getTo().getZ() == event.getFrom().getZ()) {
return;
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final Player player = event.getPlayer();
final BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
try (MCTiming timing = TimingPlayerMoveMovementHandlerCheck.startTiming()) {
if (MovementHandler.isStopped(player)) {
if (event.getTo().getX() != event.getFrom().getX() || event.getTo().getZ() != event.getFrom().getZ() || event.getTo().getY() > event.getFrom().getY()) {
event.setCancelled(true);
}
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
return;
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
try (MCTiming timing = TimingPlayerMoveSpoutCheck.startTiming()) {
if (CoreAbility.hasAbility(player, WaterSpout.class) || CoreAbility.hasAbility(player, AirSpout.class)) {
Vector vel = new Vector();
vel.setX(event.getTo().getX() - event.getFrom().getX());
vel.setZ(event.getTo().getZ() - event.getFrom().getZ());
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
final double currspeed = vel.length();
final double maxspeed = .2;
if (currspeed > maxspeed) {
// apply only if moving set a factor
vel = vel.normalize().multiply(maxspeed);
// apply the new velocity
event.getPlayer().setVelocity(vel);
}
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
return;
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
}
}
try (MCTiming timing = TimingPlayerMoveBloodbentCheck.startTiming()) {
if (Bloodbending.isBloodbent(player)) {
final BendingPlayer bender = Bloodbending.getBloodbender(player);
if (bender.isAvatarState()) {
event.setCancelled(true);
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
return;
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
final Location loc = Bloodbending.getBloodbendingLocation(player);
if (player.getWorld().equals(loc.getWorld())) {
if (!player.getVelocity().equals(Bloodbending.getBloodbendingVector(player))) {
player.setVelocity(Bloodbending.getBloodbendingVector(player));
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
}
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
return;
}
}
if (bPlayer != null) {
try (MCTiming timing = TimingPlayerMoveAirChiPassiveCheck) {
if (bPlayer.hasElement(Element.AIR) || bPlayer.hasElement(Element.CHI)) {
PassiveHandler.checkExhaustionPassives(player);
}
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
try (MCTiming timing = TimingPlayerMoveFirePassiveCheck.startTiming()) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (event.getTo().getBlock() != event.getFrom().getBlock()) {
FirePassive.handle(player);
}
}
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
try (MCTiming timing = TimingPlayerMoveJumpCheck.startTiming()) {
if (event.getTo().getY() > event.getFrom().getY()) {
if (!(player.getLocation().getBlock().getType() == Material.VINE) && !(player.getLocation().getBlock().getType() == Material.LADDER)) {
final int current = player.getStatistic(Statistic.JUMP);
final int last = JUMPS.get(player);
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (last != current) {
JUMPS.put(player, current);
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
final double yDif = event.getTo().getY() - event.getFrom().getY();
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if ((yDif < 0.035 || yDif > 0.037) && (yDif < 0.116 || yDif > 0.118)) {
Bukkit.getServer().getPluginManager().callEvent(new PlayerJumpEvent(player, yDif));
}
}
}
}
}
}
@EventHandler
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onPlayerGamemodeChange(final PlayerGameModeChangeEvent event) {
final Player player = event.getPlayer();
if (event.getNewGameMode() == GameMode.SPECTATOR) {
if (!Commands.invincible.contains(player.getName())) {
Commands.invincible.add(player.getName());
}
} else if (!(event.getNewGameMode() == GameMode.SPECTATOR) && Commands.invincible.contains(player.getName())) {
Commands.invincible.remove(player.getName());
}
}
@EventHandler
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onPlayerQuit(final PlayerQuitEvent event) {
final Player player = event.getPlayer();
final BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
BendingBoardManager.clean(player);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (ProjectKorra.isStatisticsEnabled()) {
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
Manager.getManager(StatisticsManager.class).store(player.getUniqueId());
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
}
if (bPlayer != null) {
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (ProjectKorra.isDatabaseCooldownsEnabled()) {
bPlayer.saveCooldowns();
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
2016-01-13 21:14:34 +00:00
if (TOGGLED_OUT.contains(player.getUniqueId()) && bPlayer.isToggled()) {
TOGGLED_OUT.remove(player.getUniqueId());
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
2016-01-13 21:14:34 +00:00
if (!bPlayer.isToggled()) {
TOGGLED_OUT.add(player.getUniqueId());
}
}
2016-01-13 21:14:34 +00:00
if (Commands.invincible.contains(player.getName())) {
Commands.invincible.remove(player.getName());
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
Preset.unloadPreset(player);
if (TempArmor.hasTempArmor(player)) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
for (final TempArmor armor : TempArmor.getTempArmorList(player)) {
armor.revert(null);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
}
}
if (MetalClips.isControlled(event.getPlayer())) {
MetalClips.removeControlledEnitity(event.getPlayer());
}
MultiAbilityManager.remove(player);
JUMPS.remove(player);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
for (final CoreAbility ca : CoreAbility.getAbilities()) {
if (CoreAbility.getAbility(event.getPlayer(), ca.getClass()) != null) {
CoreAbility.getAbility(event.getPlayer(), ca.getClass()).remove();
}
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onPlayerSneak(final PlayerToggleSneakEvent event) {
final Player player = event.getPlayer();
final BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (bPlayer == null) {
return;
2016-01-13 21:14:34 +00:00
}
2017-01-06 01:57:39 +00:00
if (bPlayer.canCurrentlyBendWithWeapons()) {
if (player.isSneaking()) {
ComboManager.addComboAbility(player, ClickType.SHIFT_UP);
} else {
ComboManager.addComboAbility(player, ClickType.SHIFT_DOWN);
}
2016-01-13 21:14:34 +00:00
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final String abilName = bPlayer.getBoundAbilityName();
if (Suffocate.isBreathbent(player)) {
2017-01-16 03:37:21 +00:00
if (!abilName.equalsIgnoreCase("AirSwipe") || !abilName.equalsIgnoreCase("FireBlast") || !abilName.equalsIgnoreCase("EarthBlast") || !abilName.equalsIgnoreCase("WaterManipulation")) {
if (!player.isSneaking()) {
2016-01-15 01:07:59 +00:00
event.setCancelled(true);
}
}
}
1.8.6 (#825) ## Fixes * Fixed Combos and possibly Passives appearing in `/pk b <Ability>` auto-tabbing. * Fixed Combos not loading properly on certain servers. * Fixed issue with `PreciousStones` by updating to the latest version to resolve API change issues. * Fixed `RapidPunch` damage. * Fixed incorrect summation of chiblocking chance. * Fixed possible issue in PKListener#onPlayerInteraction() * Fixed `Earth.LavaSound`. * Fixed Chi attempting to chiblock targets with any move. * Fixed hitting an entity with `TempArmor` not ignoring armor. * Fixed `Immobilize` config path. ## Additions * Added "Contributing" section to the `README` to help guide active community members. * Added more detail to the `PULL_REQUEST_TEMPLATE` to allow for more uniform pull requests. * Added many new blocks to our ability block interaction. * Added check to combo collisions to discard dead entities. * Added functionality to allow chiblocking abilities to affect all entities. * Added exception handling to the configurable `Sound` options to prevent `IllegalArgumentExcpetions`. * Added sounds and `ActionBar` messages to being Bloodbent, Electrocuted, Immobilized, MetalClipped, and Paralyzed. (Abilities: `Bloodbending`, `Lightning`, `Immobilize`, `MetalClips`, and `Paralyze`) * Added sound and `ActionBar` message for being Chiblocked. * Added interval config option to `RapidPunch`. (time between each punch) ## API Changes * Updated to `Spigot 1.12.1`. * Confirmed to be backward compatible with `Spigot 1.12` and `Spigot 1.11.2`. * Renamed `ElementalAbility#getTransparentMaterial()` to `ElementalAbility#getTransparentMaterials()`. * Converted most `byte`/`int` dependent `Material` logic to use `Material` instead. * `ElementalAbility#getTransparentMaterialSet()` now returns a `HashSet<Material>` instead of a `HashSet<Byte>`. * `ElementalAbility#getTransparentMaterials()` and `GeneralMethods.NON_OPAQUE` now return `Material[]` instead of `Integer[]`. * `GeneralMethods#getTargetedLocation()` now takes a `varargs Material[]` instead of a `varargs Integer[]`. * Removed `ElementalAbility.TRANSPARENT_MATERIAL`. It was outdated and became irrelevent after `GeneralMethods.NON_OPAQUE` was updated. * Removed `Java 7` Travi-CI JDK check. * Updated `pom.xml` to build in `Java 8`. * Added new `MovementHandler` utility class to control entity movement. (currently only capable of stopping movement.
2017-08-06 07:18:12 +00:00
if (MovementHandler.isStopped(player) || Bloodbending.isBloodbent(player)) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (!player.isSneaking()) {
event.setCancelled(true);
return;
}
}
if (bPlayer.isChiBlocked()) {
event.setCancelled(true);
return;
}
2016-01-13 21:14:34 +00:00
if (!player.isSneaking()) {
BlockSource.update(player, ClickType.SHIFT_DOWN);
}
AirScooter.check(player);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final CoreAbility coreAbil = bPlayer.getBoundAbility();
final String abil = bPlayer.getBoundAbilityName();
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (coreAbil == null || !coreAbil.isSneakAbility()) {
if (PassiveManager.hasPassive(player, CoreAbility.getAbility(FerroControl.class))) {
new FerroControl(player);
}
if (PassiveManager.hasPassive(player, CoreAbility.getAbility(FastSwim.class))) {
new FastSwim(player);
}
}
if (coreAbil == null) {
return;
}
2016-01-13 21:14:34 +00:00
if (!player.isSneaking() && bPlayer.canBendIgnoreCooldowns(coreAbil)) {
if (coreAbil instanceof AddonAbility) {
return;
2016-01-13 21:14:34 +00:00
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
2016-01-13 21:14:34 +00:00
if (coreAbil instanceof AirAbility && bPlayer.isElementToggled(Element.AIR) == true) {
2017-01-06 01:57:39 +00:00
if (bPlayer.canCurrentlyBendWithWeapons()) {
if (abil.equalsIgnoreCase("Tornado")) {
new Tornado(player);
} else if (abil.equalsIgnoreCase("AirBlast")) {
AirBlast.setOrigin(player);
} else if (abil.equalsIgnoreCase("AirBurst")) {
new AirBurst(player, false);
} else if (abil.equalsIgnoreCase("AirSuction")) {
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
new AirSuction(player);
2017-01-06 01:57:39 +00:00
} else if (abil.equalsIgnoreCase("AirSwipe")) {
new AirSwipe(player, true);
} else if (abil.equalsIgnoreCase("AirShield")) {
new AirShield(player);
} else if (abil.equalsIgnoreCase("Suffocate")) {
new Suffocate(player);
2016-01-13 21:14:34 +00:00
}
}
}
2016-01-13 21:14:34 +00:00
if (coreAbil instanceof WaterAbility && bPlayer.isElementToggled(Element.WATER) == true) {
2017-01-06 01:57:39 +00:00
if (bPlayer.canCurrentlyBendWithWeapons()) {
if (abil.equalsIgnoreCase("Bloodbending")) {
new Bloodbending(player);
} else if (abil.equalsIgnoreCase("IceBlast")) {
new IceBlast(player);
} else if (abil.equalsIgnoreCase("IceSpike")) {
new IceSpikeBlast(player);
} else if (abil.equalsIgnoreCase("OctopusForm")) {
OctopusForm.form(player);
} else if (abil.equalsIgnoreCase("PhaseChange")) {
if (!CoreAbility.hasAbility(player, PhaseChange.class)) {
new PhaseChange(player, PhaseChangeType.MELT);
} else {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final PhaseChange pc = CoreAbility.getAbility(player, PhaseChange.class);
2017-01-06 01:57:39 +00:00
pc.startNewType(PhaseChangeType.MELT);
}
} else if (abil.equalsIgnoreCase("WaterManipulation")) {
new WaterManipulation(player);
1.8.4 (#769) * Fix OctopusForm (#734) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Attribute System + FireBlast example (#735) * Attribute System + FireBlast example * Removed PK jar :smiley: :dancer: * Fixes Chi Descriptions/Instructions, Removes Fire Passive (#737) * Fixes missing Chi ability descriptions and instructions https://trello.com/c/3vto7SEn/734-re-add-paralyze-and-rapidpunch-descrip tions-and-instructions * Removes FirePassive Was discussed in CD chat https://trello.com/c/skKfHiwR/733-convert-firebending-passive-to-the-new -passive-system * Change Octoform freezing (#741) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Change Octoform Freezing * Revert "Change Octoform Freezing" This reverts commit d5745fe3171b0e24682631889322d81f153d73bd. * Revert "Revert "Change Octoform Freezing"" This reverts commit 9a91730e0fec7c428f619ffca14e4ea467298b37. * Changed attributes to use plain reflection rather than annotations (#743) * should fix some issues with octopusform (#742) when this .remove() is called nothing has happened with this instance, so the old tempblocks/phasechange never actually get removed, and we get nullpointers trying to remove the ones for this instance since they were never even created * Fixed external elements, subelements and abilities not loading (#745) Due to plugins that depend on ProjectKorra loading in AFTER pk, when a BendingPlayer object is created, all the external elements, subelements or abilities they may have are lost because they are caught in the null checks. To work around this, we will continuously loop every second for 30 seconds until the request times out. If any elements/abilities the user has haven't loaded in, in that time (the side plugin has taken longer than 30 seconds to load), then it will time out and report it in the console. * New Attribute System (#746) • New Attribute System (WIP) • Fields should now be marked with @Attribute(Attribute.DAMAGE) or whatever the relevant attribute is. • If the Attribute you want is not there, you can provide a string instead • At runtime, these Attributes can be changed with Attributes.modify(ability/element, attribute, modifier) • Air and Chi have all been marked with @Attribute annotations • Updated Particlelib - Fixed bug with dragonbreath and endRod particles being wrong. AND added new 1.11 particles. * Adding blocks to the world async is not allowed (#744) * Wip (#748) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Plant block removal and /b add all feature (#749) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Fixed: Surge and WaterArms not removing plant block * New Feature: /bend add all [player] * fixed passives not enabling on /bend toggle all (#751) * fixed passives not enabling on /bend toggle all * Correct/Update comment to act as a TODO note. * Fix spectator target (#753) * Don't target spectators * Remove debug code - Remove stick debug code that was causing a NullPointerException. * Change block set order when moving earth (#754) - Set the source block to air after setting the target block to the new type. This will eliminate temporary holes, which minimizes major lighting updates. * Fix exceptions (#752) * Fix world check when sending particles - Check by World reference rather than string name comparison. The following Location distanceSquared call will throw an exception if the World names are the same but references aren't. * Fix several exceptions - Destroy LavaFlow instance when the Player leaves the World. - Destroy Torrent instance when the Player leaves the World. - Fix cooldown exception when Player is null. * PhaseChange Speed option added (#756) • Delay option changed to speed • Fixed EarthArmor breaking when a player is paralyzed. * FireManip, WaterBubble & 1.12 (#757) • Added basic FireManipulation. Still needs lots of improving, but that's for another commit. • Redone WaterBubble. Now has a click version and an expand/shrink animation. • Removed AirBubble • Updated Spigot to 1.12 • Fixed Octopus NPE • Fixed EarthArmor remaining after TPs to other worlds * EarthTunnel - DropLootIfNotRevert (#759) * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * Bug Fixes (Catapult, Illumination, Config) (#760) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * Fix LavaFlow (#755) Fixed "AllowNaturalFlow" * Updated to 1.12 with for days (#761) • Redone the (core) ability load system - The old one broke with the Guava update in 1.12 • Fixed some WaterBubble floods • Fixed PhaseChange melting snow super duper fast • Fixed some other misc bugs • Added 1.12 Spigot to classpath * 1.12 Bug Fixes (#762) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 fixes (#763) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 Fixes * Collision fixes, Air sound change, * Tried Fixing Collisions Currently the loops in CollisionInitializer#initializeDefaultCollisions() don't work * 1.8.4 Fixes (#764) * Small 1.8.4 fixes • Fixed selecting snow blocks as a water source not working when they are more than 3 blocks away • Fixed DensityShift turning lava into sand when you land softly • Fixed IceBlast not working on TempBlocks * Added FireManip particle options to config Also removed a sneaky debug message * 1.8.4 Fixes (#765) * Redone Fire Combos (#766) * Finalize Fire Combo split (#767) * 1.8.4 Fixes * Correct Fire Combos * Remove unused imports
2017-06-13 07:54:30 +00:00
} else if (abil.equalsIgnoreCase("WaterBubble")) {
new WaterBubble(player, true);
2017-01-06 01:57:39 +00:00
} else if (abil.equalsIgnoreCase("Surge")) {
SurgeWall.form(player);
} else if (abil.equalsIgnoreCase("Torrent")) {
Torrent.create(player);
} else if (abil.equalsIgnoreCase("WaterArms")) {
new WaterArms(player);
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
2017-01-06 01:57:39 +00:00
if (abil.equalsIgnoreCase("HealingWaters")) {
new HealingWaters(player);
PhaseChange recode and EarthGrab fix (#661) * Fix metalclips - Removed a check that was preventing metalclips from progressing past 1 clip on a target. * Fix metalclips - Fixed a bug limiting the metal clip count to one * Improve MetalClips - Fixed bug where shooting at a block spawned two clips - Added ShootCooldown and CrushCooldown - ShootCooldown only applies to shooting clips - Changed how crushing works: --- Removed old style and variables --- When controlling an entity with 4 clips, the controller can click to cause the armor to "crush" and damage the entity. --- Has own cooldown, default of 2000 (2 seconds) - Changed launching --- Works with all clip amounts except 4 --- When the user releases sneak, the entity will be launched at varying power depending on how many clips were attached. - Changed ability cooldown to activate only after the ability is finished. * Add CrushDamage option to MetalClips * New Damage Type, MetalClips changes - Fixed MetalClips bug caused in magnetizing - Added ignoreArmor option to damageEntity method, default true for most abilities. If wanted to be changed, someone needs to go through and add false as a parameter - Changed default config option for MetalClips description * PhaseChange recode * Chris wanted changes * Chris doesn't want bugs * Only you can prevent bugs - Added checks for worlds to prevent errors * Remove unnecessary auto generated comments * Loony didn't like the passive * Added RegionProtection checks * PhaseChange * Revert "PhaseChange" This reverts commit 761c73f5756771674719ffca52413cffa09243a8. * Revert "Added RegionProtection checks" This reverts commit b53a02a74d0276d4d1e773e1c197666cbcfab624. * Revert "Loony didn't like the passive" This reverts commit 6612bb7fa8eea3e26c01d0ef761c658447779e03. * Revert "Remove unnecessary auto generated comments" This reverts commit da9c45106d0b7e256c278e6a84d15f7a7340a140. * Revert "Only you can prevent bugs" This reverts commit 630161659ea89bfb106924c8ab1fbcdb8f6f1310. * Revert "Chris doesn't want bugs" This reverts commit eda2dee6b52dd38c73f35680c5e4484adc5b5b91. * Revert "Chris wanted changes" This reverts commit 30b76c10c4adc63784ea7115eb4f9c636650d6c5. * Revert "PhaseChange recode" This reverts commit f8f290dd8c57a3467a87de7e43b58ce635196c62. * Conflicts * Stupid conflicts * I hope and pray * Revert "Revert "Chris wanted changes"" This reverts commit e612607c8a16a735c92014714c00aa671954b4a5. * Revert "Revert "Chris doesn't want bugs"" This reverts commit bd656b814d7ffa2d9c84fa304d3adb8f1535f782. * Revert "Revert "Only you can prevent bugs"" This reverts commit 7772c95737130cf414ff1af49dcfb48865be5374. * Revert "Revert "Remove unnecessary auto generated comments"" This reverts commit 69315dc7baa6cd237fbd89394e544913596ec6e3. * Revert "Revert "Loony didn't like the passive"" This reverts commit ea397c6323e50d219395d5912850513afd6f2a7b. * Revert "Revert "Added RegionProtection checks"" This reverts commit 8cb41709f65e4322e68b2f0e1792987f7fc214f2. * Revert "Revert "PhaseChange"" This reverts commit da6b0e7071acf74df6447b15daf4ae6e39f057f6. * Working PhaseChange finally * Fix EarthGrab * Air fixes, PhaseChange changes
2016-12-20 04:43:56 +00:00
}
}
}
2016-01-13 21:14:34 +00:00
if (coreAbil instanceof EarthAbility && bPlayer.isElementToggled(Element.EARTH) == true) {
2017-01-06 01:57:39 +00:00
if (bPlayer.canCurrentlyBendWithWeapons()) {
if (abil.equalsIgnoreCase("Catapult")) {
new Catapult(player, true);
} else if (abil.equalsIgnoreCase("EarthBlast")) {
2017-01-06 01:57:39 +00:00
new EarthBlast(player);
} else if (abil.equalsIgnoreCase("EarthArmor")) {
new EarthArmor(player);
} else if (abil.equalsIgnoreCase("RaiseEarth")) {
new RaiseEarthWall(player);
} else if (abil.equalsIgnoreCase("Collapse")) {
new CollapseWall(player);
} else if (abil.equalsIgnoreCase("Shockwave")) {
new Shockwave(player, false);
} else if (abil.equalsIgnoreCase("EarthTunnel")) {
new EarthTunnel(player);
} else if (abil.equalsIgnoreCase("Tremorsense")) {
bPlayer.toggleTremorSense();
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
GeneralMethods.displayMovePreview(player);
BendingBoardManager.updateAllSlots(player);
2017-01-06 01:57:39 +00:00
} else if (abil.equalsIgnoreCase("Extraction")) {
new Extraction(player);
} else if (abil.equalsIgnoreCase("LavaFlow")) {
new LavaFlow(player, LavaFlow.AbilityType.SHIFT);
} else if (abil.equalsIgnoreCase("EarthSmash")) {
new EarthSmash(player, ClickType.SHIFT_DOWN);
2017-01-06 01:57:39 +00:00
} else if (abil.equalsIgnoreCase("MetalClips")) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final MetalClips clips = CoreAbility.getAbility(player, MetalClips.class);
2017-01-06 01:57:39 +00:00
if (clips != null) {
if (clips.getTargetEntity() == null) {
clips.setMagnetized(true);
} else {
clips.setControlling(true);
}
1.8.5 (#813) ## Fixes * Fixed odd interactions between `Bloodbending` and `AvatarState`. * You can no longer be bloodbent while in `AvatarState` and going into the `AvatarState` while being bloodbent will break you free. * Fixed various errors in `Bloodbending`. * Fixed `SubElements` being saved incorrectly in the database. * Fixed a few cases where `Surge` would cause flooding. * Fixed various NoCheatPlus exemptions in our `DamageHandler`. (Thanks, RoboMWM) * Fixed ProjectKorra fire tick damage overriding other plugins fire tick damage. * Fixed `FireSpin` working underwater. * Fixed `EarthArmor` not properly obeying its cooldown. * Fixed `Combo Abilities` being displayed in `/pk display <Element>`. * Fixed `Extraction` cooldown being applied when the ability couldn't start. * Fixed `EarthTunnel` cooldown being applied when the ability couldn't start. * Fixed `IceSpike` field functionality not activating on `PhaseChange` blocks. * Fixed `FireWheel` hit location if used while looking down. * Fixed `Lightning` paralyze functionality. * Fixed `DensityShift` causing fall damage if used on other `DensityShift` blocks. * Fixed `Flight` cooldown being applied when the ability couldn't start. * Fixed `Flight` deactivating if used while on the ground. * Fixed `RapidPunch` cooldown being applied when the ability couldn't start. * Fixed `WaterArms` not returning water sources to bottles. * Fixed `WaterArms` not grabbing sources correctly. * Fixed `CollisionManager` attempting to detect collisions between abilities in different worlds. (Thanks, plushmonkey) * Fixed `CollisionManager` not resetting when a new manager is created. * Fixed `JetBlaze` and `JetBlast` not overriding `FireJet` duration. * Fixed `PhaseChange` not being able to melt snow blocks. * Fixed `FastSwim` being able to be used on a `Catapult` slot. * Fixed `FireManipulation` cooldown. * Fixed `Collapse` and `RaiseEarth`not working in `AvatarState`. * Fixed Waterbending causing concrete powder to harden. * Fixed `MetalClips` magnetize not pulling iron ingots if players had them in their hand. * Fixed `MetalClips` not disabling passives such as `FastSwim` on its targets. * Fixed `MetalClips` armor absorbing damage. * Fixed `MetalClips` magnetize not pulling if the launching portion of the move is on cooldown. * Fixed `MetalClips` not dropping iron ingots once a held target is killed. * Fixed `MetalClips` duplicating iron ingots by repeatedly hitting and pulling entities. * Fixed `MetalClips` duplicating iron ingots by hitting blocks. * Fixed addon Passive abilities not registering. * Fixed `/pk help <Element>` displaying incorrect/old links. * Fixed `/pk help <Element/Combo>` being case sensitive. * Fixed `/pk help` not allowing players to auto tab all non-hidden abilities. * Fixed `IllegalArgumentException` being thrown if server owners put an incorrect `ChatColor` for the `Chat.Branding.Color` value in `language.yml`. * Fixed `EarthArmor` allowing players to use `FastSwim` while the armor is activated. * Fixed incorrect cancellation of `BlockBreakEvent` when players bending is toggled off. * Fixed multiple instances of the same `CoreAbility` being present in auto tabbing due to certain move functionalities being split up between files. * Fixed Passive abilities and Combo abilities showing up in `/pk bind <Ability>` auto tabbing. * Fixed `WaterWave` and `WaterSpout` cohesive movement. * Fixed `DamageHandler` applying `DamageModifier.ARMOR` where it is not applicable. * Fixed `/pk check` command URL. * Fixed Passive abilities breaking when choosing an element while bending is toggled. * Fixed `WaterBubble` removing blocks placed by players while the ability is active. * Fixed potential infinite loop in `EarthGrab`. * Fixed `AirScooter` not disabling when a player would sneak. ## Additions * Added cooldown capability to `AirShield`, `AirSpout`, `Tornado`, `FastSwim`, `WaterBubble`, `EarthTunnel`, `AcrobaticStance`, and `WarriorStance`. * Added the clickable ProjectKorra branding message to the `/pk help` and `/pk who` commands. * Added `radius` config option to `EarthGrab`. * Added AvatarState configuration options for `IceSpike`, `IceBlast`, `Torrent`, `OctopusForm`, `WallOfFire`, `WaterSpout`, and all stock Combos. * Added aesthetic donation perk servers can give to their players in the `/pk who <Player>` command via the `bending.donor` permission. * Added config option for the lightning bending sound and lava bending sound. * Added `Pitch` and `Volume` config options for all configurable sounds. * Added identifiers on Addon Abilities in `/pk help <Ability>` and `/pk display`. ## General Changes * Reduced default config values of `AvatarState` ability modifiers. * Changed the way abilities display in `/pk help <Ability>` * Abilities now display whether they are Addons or not. * Abilities now display whether they are Combos or Passives. * Addon Abilities display their author and version. * Improved `AirScooter` behavior. It isn't perfect yet, but it is better. * Changed `EarthArmor` so it now breaks when a player teleports. * Changed cobblestone and obsidian created by `AirBlast` to `TempBlocks`. * Changed `/pk add Avatar` to add all four main elements. ## API Changes * Added `RevertTask` which runs whenever `TempBlock#revertBlock()` is called. * Moved `BendingPlayer` creation to a separate thread. * Changed initial `BendingPlayer` database storage to insert default values. * Improved `CollisionManager` performance by removing unnecessary detections. * Put logic in place to remove ability instances causing exceptions without breaking all other running abilities. (Thanks, PhanaticD) * Changed `PassiveManager` storage so Passive abilities are be stored by name/class instead of by `Element`. * Removed `PassiveManager#getPassivesByElement()`. * Added `CoreAbility#unloadAbility(Class clazz)` to unload an ability from a server. * Added `CoreAbility#getAddonPlugins()` to get the names and paths of all currently loaded addon plugins. Returned format: `<plugin name>::<abilities path>` * Changed `/pk reload` to add support for addon plugin reloading. ## Removals * Removed the Minecraft version from the `/pk version` command. * Removed `SandSpout`. * Removed `SandRun` remnant from `EarthPassive`. * Removed `AirBlast` collisions with other basic moves.
2017-08-04 04:54:22 +00:00
} else {
new MetalClips(player, 1);
2016-01-13 21:14:34 +00:00
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
} else if (abil.equalsIgnoreCase("EarthGrab")) {
new EarthGrab(player, GrabMode.DRAG);
}
}
2016-01-13 21:14:34 +00:00
}
2016-01-13 21:14:34 +00:00
if (coreAbil instanceof FireAbility && bPlayer.isElementToggled(Element.FIRE) == true) {
2017-01-06 01:57:39 +00:00
if (bPlayer.canCurrentlyBendWithWeapons()) {
if (abil.equalsIgnoreCase("Blaze")) {
new BlazeRing(player);
} else if (abil.equalsIgnoreCase("FireBlast")) {
new FireBlastCharged(player);
} else if (abil.equalsIgnoreCase("HeatControl")) {
new HeatControl(player, HeatControlType.COOK);
} else if (abil.equalsIgnoreCase("FireBurst")) {
new FireBurst(player);
} else if (abil.equalsIgnoreCase("FireShield")) {
new FireShield(player, true);
} else if (abil.equalsIgnoreCase("Lightning")) {
new Lightning(player);
} else if (abil.equalsIgnoreCase("Combustion")) {
new Combustion(player);
1.8.4 (#769) * Fix OctopusForm (#734) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Attribute System + FireBlast example (#735) * Attribute System + FireBlast example * Removed PK jar :smiley: :dancer: * Fixes Chi Descriptions/Instructions, Removes Fire Passive (#737) * Fixes missing Chi ability descriptions and instructions https://trello.com/c/3vto7SEn/734-re-add-paralyze-and-rapidpunch-descrip tions-and-instructions * Removes FirePassive Was discussed in CD chat https://trello.com/c/skKfHiwR/733-convert-firebending-passive-to-the-new -passive-system * Change Octoform freezing (#741) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Change Octoform Freezing * Revert "Change Octoform Freezing" This reverts commit d5745fe3171b0e24682631889322d81f153d73bd. * Revert "Revert "Change Octoform Freezing"" This reverts commit 9a91730e0fec7c428f619ffca14e4ea467298b37. * Changed attributes to use plain reflection rather than annotations (#743) * should fix some issues with octopusform (#742) when this .remove() is called nothing has happened with this instance, so the old tempblocks/phasechange never actually get removed, and we get nullpointers trying to remove the ones for this instance since they were never even created * Fixed external elements, subelements and abilities not loading (#745) Due to plugins that depend on ProjectKorra loading in AFTER pk, when a BendingPlayer object is created, all the external elements, subelements or abilities they may have are lost because they are caught in the null checks. To work around this, we will continuously loop every second for 30 seconds until the request times out. If any elements/abilities the user has haven't loaded in, in that time (the side plugin has taken longer than 30 seconds to load), then it will time out and report it in the console. * New Attribute System (#746) • New Attribute System (WIP) • Fields should now be marked with @Attribute(Attribute.DAMAGE) or whatever the relevant attribute is. • If the Attribute you want is not there, you can provide a string instead • At runtime, these Attributes can be changed with Attributes.modify(ability/element, attribute, modifier) • Air and Chi have all been marked with @Attribute annotations • Updated Particlelib - Fixed bug with dragonbreath and endRod particles being wrong. AND added new 1.11 particles. * Adding blocks to the world async is not allowed (#744) * Wip (#748) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Plant block removal and /b add all feature (#749) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Fixed: Surge and WaterArms not removing plant block * New Feature: /bend add all [player] * fixed passives not enabling on /bend toggle all (#751) * fixed passives not enabling on /bend toggle all * Correct/Update comment to act as a TODO note. * Fix spectator target (#753) * Don't target spectators * Remove debug code - Remove stick debug code that was causing a NullPointerException. * Change block set order when moving earth (#754) - Set the source block to air after setting the target block to the new type. This will eliminate temporary holes, which minimizes major lighting updates. * Fix exceptions (#752) * Fix world check when sending particles - Check by World reference rather than string name comparison. The following Location distanceSquared call will throw an exception if the World names are the same but references aren't. * Fix several exceptions - Destroy LavaFlow instance when the Player leaves the World. - Destroy Torrent instance when the Player leaves the World. - Fix cooldown exception when Player is null. * PhaseChange Speed option added (#756) • Delay option changed to speed • Fixed EarthArmor breaking when a player is paralyzed. * FireManip, WaterBubble & 1.12 (#757) • Added basic FireManipulation. Still needs lots of improving, but that's for another commit. • Redone WaterBubble. Now has a click version and an expand/shrink animation. • Removed AirBubble • Updated Spigot to 1.12 • Fixed Octopus NPE • Fixed EarthArmor remaining after TPs to other worlds * EarthTunnel - DropLootIfNotRevert (#759) * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * Bug Fixes (Catapult, Illumination, Config) (#760) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * Fix LavaFlow (#755) Fixed "AllowNaturalFlow" * Updated to 1.12 with for days (#761) • Redone the (core) ability load system - The old one broke with the Guava update in 1.12 • Fixed some WaterBubble floods • Fixed PhaseChange melting snow super duper fast • Fixed some other misc bugs • Added 1.12 Spigot to classpath * 1.12 Bug Fixes (#762) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 fixes (#763) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 Fixes * Collision fixes, Air sound change, * Tried Fixing Collisions Currently the loops in CollisionInitializer#initializeDefaultCollisions() don't work * 1.8.4 Fixes (#764) * Small 1.8.4 fixes • Fixed selecting snow blocks as a water source not working when they are more than 3 blocks away • Fixed DensityShift turning lava into sand when you land softly • Fixed IceBlast not working on TempBlocks * Added FireManip particle options to config Also removed a sneaky debug message * 1.8.4 Fixes (#765) * Redone Fire Combos (#766) * Finalize Fire Combo split (#767) * 1.8.4 Fixes * Correct Fire Combos * Remove unused imports
2017-06-13 07:54:30 +00:00
} else if (abil.equalsIgnoreCase("FireManipulation")) {
new FireManipulation(player, FireManipulationType.SHIFT);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
}
}
}
}
}
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
@EventHandler(priority = EventPriority.HIGHEST)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onPlayerSlotChange(final PlayerItemHeldEvent event) {
final Player player = event.getPlayer();
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
if (!MultiAbilityManager.canChangeSlot(player, event.getNewSlot())) {
event.setCancelled(true);
return;
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final int slot = event.getNewSlot() + 1;
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
GeneralMethods.displayMovePreview(player, slot);
BendingBoardManager.changeActiveSlot(player, event.getPreviousSlot(), event.getNewSlot());
if (ConfigManager.defaultConfig.get().getBoolean("Abilities.Water.WaterArms.DisplayBoundMsg")) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final WaterArms waterArms = CoreAbility.getAbility(player, WaterArms.class);
1.8.4 (#769) * Fix OctopusForm (#734) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Attribute System + FireBlast example (#735) * Attribute System + FireBlast example * Removed PK jar :smiley: :dancer: * Fixes Chi Descriptions/Instructions, Removes Fire Passive (#737) * Fixes missing Chi ability descriptions and instructions https://trello.com/c/3vto7SEn/734-re-add-paralyze-and-rapidpunch-descrip tions-and-instructions * Removes FirePassive Was discussed in CD chat https://trello.com/c/skKfHiwR/733-convert-firebending-passive-to-the-new -passive-system * Change Octoform freezing (#741) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Change Octoform Freezing * Revert "Change Octoform Freezing" This reverts commit d5745fe3171b0e24682631889322d81f153d73bd. * Revert "Revert "Change Octoform Freezing"" This reverts commit 9a91730e0fec7c428f619ffca14e4ea467298b37. * Changed attributes to use plain reflection rather than annotations (#743) * should fix some issues with octopusform (#742) when this .remove() is called nothing has happened with this instance, so the old tempblocks/phasechange never actually get removed, and we get nullpointers trying to remove the ones for this instance since they were never even created * Fixed external elements, subelements and abilities not loading (#745) Due to plugins that depend on ProjectKorra loading in AFTER pk, when a BendingPlayer object is created, all the external elements, subelements or abilities they may have are lost because they are caught in the null checks. To work around this, we will continuously loop every second for 30 seconds until the request times out. If any elements/abilities the user has haven't loaded in, in that time (the side plugin has taken longer than 30 seconds to load), then it will time out and report it in the console. * New Attribute System (#746) • New Attribute System (WIP) • Fields should now be marked with @Attribute(Attribute.DAMAGE) or whatever the relevant attribute is. • If the Attribute you want is not there, you can provide a string instead • At runtime, these Attributes can be changed with Attributes.modify(ability/element, attribute, modifier) • Air and Chi have all been marked with @Attribute annotations • Updated Particlelib - Fixed bug with dragonbreath and endRod particles being wrong. AND added new 1.11 particles. * Adding blocks to the world async is not allowed (#744) * Wip (#748) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Plant block removal and /b add all feature (#749) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Fixed: Surge and WaterArms not removing plant block * New Feature: /bend add all [player] * fixed passives not enabling on /bend toggle all (#751) * fixed passives not enabling on /bend toggle all * Correct/Update comment to act as a TODO note. * Fix spectator target (#753) * Don't target spectators * Remove debug code - Remove stick debug code that was causing a NullPointerException. * Change block set order when moving earth (#754) - Set the source block to air after setting the target block to the new type. This will eliminate temporary holes, which minimizes major lighting updates. * Fix exceptions (#752) * Fix world check when sending particles - Check by World reference rather than string name comparison. The following Location distanceSquared call will throw an exception if the World names are the same but references aren't. * Fix several exceptions - Destroy LavaFlow instance when the Player leaves the World. - Destroy Torrent instance when the Player leaves the World. - Fix cooldown exception when Player is null. * PhaseChange Speed option added (#756) • Delay option changed to speed • Fixed EarthArmor breaking when a player is paralyzed. * FireManip, WaterBubble & 1.12 (#757) • Added basic FireManipulation. Still needs lots of improving, but that's for another commit. • Redone WaterBubble. Now has a click version and an expand/shrink animation. • Removed AirBubble • Updated Spigot to 1.12 • Fixed Octopus NPE • Fixed EarthArmor remaining after TPs to other worlds * EarthTunnel - DropLootIfNotRevert (#759) * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * Bug Fixes (Catapult, Illumination, Config) (#760) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * Fix LavaFlow (#755) Fixed "AllowNaturalFlow" * Updated to 1.12 with for days (#761) • Redone the (core) ability load system - The old one broke with the Guava update in 1.12 • Fixed some WaterBubble floods • Fixed PhaseChange melting snow super duper fast • Fixed some other misc bugs • Added 1.12 Spigot to classpath * 1.12 Bug Fixes (#762) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 fixes (#763) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 Fixes * Collision fixes, Air sound change, * Tried Fixing Collisions Currently the loops in CollisionInitializer#initializeDefaultCollisions() don't work * 1.8.4 Fixes (#764) * Small 1.8.4 fixes • Fixed selecting snow blocks as a water source not working when they are more than 3 blocks away • Fixed DensityShift turning lava into sand when you land softly • Fixed IceBlast not working on TempBlocks * Added FireManip particle options to config Also removed a sneaky debug message * 1.8.4 Fixes (#765) * Redone Fire Combos (#766) * Finalize Fire Combo split (#767) * 1.8.4 Fixes * Correct Fire Combos * Remove unused imports
2017-06-13 07:54:30 +00:00
if (waterArms != null) {
waterArms.displayBoundMsg(event.getNewSlot() + 1);
return;
}
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onPlayerSwapItems(final PlayerSwapHandItemsEvent event) {
final Player player = event.getPlayer();
final BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
if (bPlayer == null) {
return;
2016-01-13 21:14:34 +00:00
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final ItemStack main = event.getMainHandItem();
final ItemStack off = event.getOffHandItem();
if (main.getType() == Material.AIR && (off == null || off.getType() == Material.AIR)) {
ComboManager.addComboAbility(player, ClickType.OFFHAND_TRIGGER);
}
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
@EventHandler(priority = EventPriority.NORMAL)
public void onPlayerSwing(final PlayerInteractEvent event) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final Player player = event.getPlayer();
if (PLAYER_DROPPED_ITEM.contains(player)) {
PLAYER_DROPPED_ITEM.remove(player);
return;
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (event.getHand() != EquipmentSlot.HAND) {
return;
}
if (event.getAction() != Action.LEFT_CLICK_BLOCK && event.getAction() != Action.LEFT_CLICK_AIR) {
return;
}
if (event.getAction() == Action.LEFT_CLICK_BLOCK && event.isCancelled()) {
return;
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
2016-01-13 21:14:34 +00:00
if (bPlayer == null) {
return;
} else if (RIGHT_CLICK_INTERACT.contains(player.getUniqueId())) {
return;
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final Entity target = GeneralMethods.getTargetedEntity(player, 3);
2017-01-06 01:57:39 +00:00
if (bPlayer.canCurrentlyBendWithWeapons()) {
if (target != null && !(target.equals(player)) && target instanceof LivingEntity) {
ComboManager.addComboAbility(player, ClickType.LEFT_CLICK_ENTITY);
} else {
ComboManager.addComboAbility(player, ClickType.LEFT_CLICK);
}
}
if (Suffocate.isBreathbent(player)) {
event.setCancelled(true);
return;
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
} else if ((Bloodbending.isBloodbent(player) && !bPlayer.getBoundAbilityName().equalsIgnoreCase("AvatarState"))) {
event.setCancelled(true);
return;
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
} else if (MovementHandler.isStopped(player)) {
if (player.hasMetadata("movement:stop")) {
final CoreAbility abil = (CoreAbility) player.getMetadata("movement:stop").get(0).value();
if (!(abil instanceof EarthGrab)) {
event.setCancelled(true);
return;
}
}
2016-01-13 21:14:34 +00:00
} else if (bPlayer.isChiBlocked()) {
event.setCancelled(true);
return;
2015-11-11 02:39:04 +00:00
}
2016-01-13 21:14:34 +00:00
BlockSource.update(player, ClickType.LEFT_CLICK);
AirScooter.check(player);
2016-01-13 21:14:34 +00:00
String abil = bPlayer.getBoundAbilityName();
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final CoreAbility coreAbil = bPlayer.getBoundAbility();
2016-01-13 21:14:34 +00:00
if (coreAbil == null && !MultiAbilityManager.hasMultiAbilityBound(player)) {
return;
2016-01-13 21:14:34 +00:00
} else if (bPlayer.canBendIgnoreCooldowns(coreAbil)) {
if (coreAbil instanceof AddonAbility) {
return;
2016-01-13 21:14:34 +00:00
}
2016-01-13 21:14:34 +00:00
if (coreAbil instanceof AirAbility && bPlayer.isElementToggled(Element.AIR) == true) {
2017-01-06 01:57:39 +00:00
if (bPlayer.canCurrentlyBendWithWeapons()) {
if (abil.equalsIgnoreCase("AirBlast")) {
new AirBlast(player);
} else if (abil.equalsIgnoreCase("AirSuction")) {
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
AirSuction.shoot(player);
2017-01-06 01:57:39 +00:00
} else if (abil.equalsIgnoreCase("AirBurst")) {
AirBurst.coneBurst(player);
} else if (abil.equalsIgnoreCase("AirScooter")) {
new AirScooter(player);
} else if (abil.equalsIgnoreCase("AirSpout")) {
new AirSpout(player);
} else if (abil.equalsIgnoreCase("AirSwipe")) {
new AirSwipe(player);
} else if (abil.equalsIgnoreCase("Flight")) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
new FlightMultiAbility(player);
return;
}
}
}
2016-01-13 21:14:34 +00:00
if (coreAbil instanceof WaterAbility && bPlayer.isElementToggled(Element.WATER) == true) {
2017-01-06 01:57:39 +00:00
if (bPlayer.canCurrentlyBendWithWeapons()) {
if (abil.equalsIgnoreCase("Bloodbending")) {
Bloodbending.launch(player);
} else if (abil.equalsIgnoreCase("IceBlast")) {
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (CoreAbility.hasAbility(player, IceBullet.class)) {
CoreAbility.getAbility(player, IceBullet.class).doLeftClick();
} else {
IceBlast.activate(player);
}
2017-01-06 01:57:39 +00:00
} else if (abil.equalsIgnoreCase("IceSpike")) {
IceSpikeBlast.activate(player);
} else if (abil.equalsIgnoreCase("OctopusForm")) {
new OctopusForm(player);
} else if (abil.equalsIgnoreCase("PhaseChange")) {
if (!CoreAbility.hasAbility(player, PhaseChange.class)) {
new PhaseChange(player, PhaseChangeType.FREEZE);
} else {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final PhaseChange pc = CoreAbility.getAbility(player, PhaseChange.class);
2017-01-06 01:57:39 +00:00
pc.startNewType(PhaseChangeType.FREEZE);
}
1.8.4 (#769) * Fix OctopusForm (#734) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Attribute System + FireBlast example (#735) * Attribute System + FireBlast example * Removed PK jar :smiley: :dancer: * Fixes Chi Descriptions/Instructions, Removes Fire Passive (#737) * Fixes missing Chi ability descriptions and instructions https://trello.com/c/3vto7SEn/734-re-add-paralyze-and-rapidpunch-descrip tions-and-instructions * Removes FirePassive Was discussed in CD chat https://trello.com/c/skKfHiwR/733-convert-firebending-passive-to-the-new -passive-system * Change Octoform freezing (#741) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Change Octoform Freezing * Revert "Change Octoform Freezing" This reverts commit d5745fe3171b0e24682631889322d81f153d73bd. * Revert "Revert "Change Octoform Freezing"" This reverts commit 9a91730e0fec7c428f619ffca14e4ea467298b37. * Changed attributes to use plain reflection rather than annotations (#743) * should fix some issues with octopusform (#742) when this .remove() is called nothing has happened with this instance, so the old tempblocks/phasechange never actually get removed, and we get nullpointers trying to remove the ones for this instance since they were never even created * Fixed external elements, subelements and abilities not loading (#745) Due to plugins that depend on ProjectKorra loading in AFTER pk, when a BendingPlayer object is created, all the external elements, subelements or abilities they may have are lost because they are caught in the null checks. To work around this, we will continuously loop every second for 30 seconds until the request times out. If any elements/abilities the user has haven't loaded in, in that time (the side plugin has taken longer than 30 seconds to load), then it will time out and report it in the console. * New Attribute System (#746) • New Attribute System (WIP) • Fields should now be marked with @Attribute(Attribute.DAMAGE) or whatever the relevant attribute is. • If the Attribute you want is not there, you can provide a string instead • At runtime, these Attributes can be changed with Attributes.modify(ability/element, attribute, modifier) • Air and Chi have all been marked with @Attribute annotations • Updated Particlelib - Fixed bug with dragonbreath and endRod particles being wrong. AND added new 1.11 particles. * Adding blocks to the world async is not allowed (#744) * Wip (#748) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Plant block removal and /b add all feature (#749) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Fixed: Surge and WaterArms not removing plant block * New Feature: /bend add all [player] * fixed passives not enabling on /bend toggle all (#751) * fixed passives not enabling on /bend toggle all * Correct/Update comment to act as a TODO note. * Fix spectator target (#753) * Don't target spectators * Remove debug code - Remove stick debug code that was causing a NullPointerException. * Change block set order when moving earth (#754) - Set the source block to air after setting the target block to the new type. This will eliminate temporary holes, which minimizes major lighting updates. * Fix exceptions (#752) * Fix world check when sending particles - Check by World reference rather than string name comparison. The following Location distanceSquared call will throw an exception if the World names are the same but references aren't. * Fix several exceptions - Destroy LavaFlow instance when the Player leaves the World. - Destroy Torrent instance when the Player leaves the World. - Fix cooldown exception when Player is null. * PhaseChange Speed option added (#756) • Delay option changed to speed • Fixed EarthArmor breaking when a player is paralyzed. * FireManip, WaterBubble & 1.12 (#757) • Added basic FireManipulation. Still needs lots of improving, but that's for another commit. • Redone WaterBubble. Now has a click version and an expand/shrink animation. • Removed AirBubble • Updated Spigot to 1.12 • Fixed Octopus NPE • Fixed EarthArmor remaining after TPs to other worlds * EarthTunnel - DropLootIfNotRevert (#759) * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * Bug Fixes (Catapult, Illumination, Config) (#760) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * Fix LavaFlow (#755) Fixed "AllowNaturalFlow" * Updated to 1.12 with for days (#761) • Redone the (core) ability load system - The old one broke with the Guava update in 1.12 • Fixed some WaterBubble floods • Fixed PhaseChange melting snow super duper fast • Fixed some other misc bugs • Added 1.12 Spigot to classpath * 1.12 Bug Fixes (#762) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 fixes (#763) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 Fixes * Collision fixes, Air sound change, * Tried Fixing Collisions Currently the loops in CollisionInitializer#initializeDefaultCollisions() don't work * 1.8.4 Fixes (#764) * Small 1.8.4 fixes • Fixed selecting snow blocks as a water source not working when they are more than 3 blocks away • Fixed DensityShift turning lava into sand when you land softly • Fixed IceBlast not working on TempBlocks * Added FireManip particle options to config Also removed a sneaky debug message * 1.8.4 Fixes (#765) * Redone Fire Combos (#766) * Finalize Fire Combo split (#767) * 1.8.4 Fixes * Correct Fire Combos * Remove unused imports
2017-06-13 07:54:30 +00:00
} else if (abil.equalsIgnoreCase("WaterBubble")) {
new WaterBubble(player, false);
2017-01-06 01:57:39 +00:00
} else if (abil.equalsIgnoreCase("WaterSpout")) {
new WaterSpout(player);
} else if (abil.equalsIgnoreCase("WaterManipulation")) {
WaterManipulation.moveWater(player);
} else if (abil.equalsIgnoreCase("Surge")) {
new SurgeWall(player);
} else if (abil.equalsIgnoreCase("Torrent")) {
new Torrent(player);
PhaseChange recode and EarthGrab fix (#661) * Fix metalclips - Removed a check that was preventing metalclips from progressing past 1 clip on a target. * Fix metalclips - Fixed a bug limiting the metal clip count to one * Improve MetalClips - Fixed bug where shooting at a block spawned two clips - Added ShootCooldown and CrushCooldown - ShootCooldown only applies to shooting clips - Changed how crushing works: --- Removed old style and variables --- When controlling an entity with 4 clips, the controller can click to cause the armor to "crush" and damage the entity. --- Has own cooldown, default of 2000 (2 seconds) - Changed launching --- Works with all clip amounts except 4 --- When the user releases sneak, the entity will be launched at varying power depending on how many clips were attached. - Changed ability cooldown to activate only after the ability is finished. * Add CrushDamage option to MetalClips * New Damage Type, MetalClips changes - Fixed MetalClips bug caused in magnetizing - Added ignoreArmor option to damageEntity method, default true for most abilities. If wanted to be changed, someone needs to go through and add false as a parameter - Changed default config option for MetalClips description * PhaseChange recode * Chris wanted changes * Chris doesn't want bugs * Only you can prevent bugs - Added checks for worlds to prevent errors * Remove unnecessary auto generated comments * Loony didn't like the passive * Added RegionProtection checks * PhaseChange * Revert "PhaseChange" This reverts commit 761c73f5756771674719ffca52413cffa09243a8. * Revert "Added RegionProtection checks" This reverts commit b53a02a74d0276d4d1e773e1c197666cbcfab624. * Revert "Loony didn't like the passive" This reverts commit 6612bb7fa8eea3e26c01d0ef761c658447779e03. * Revert "Remove unnecessary auto generated comments" This reverts commit da9c45106d0b7e256c278e6a84d15f7a7340a140. * Revert "Only you can prevent bugs" This reverts commit 630161659ea89bfb106924c8ab1fbcdb8f6f1310. * Revert "Chris doesn't want bugs" This reverts commit eda2dee6b52dd38c73f35680c5e4484adc5b5b91. * Revert "Chris wanted changes" This reverts commit 30b76c10c4adc63784ea7115eb4f9c636650d6c5. * Revert "PhaseChange recode" This reverts commit f8f290dd8c57a3467a87de7e43b58ce635196c62. * Conflicts * Stupid conflicts * I hope and pray * Revert "Revert "Chris wanted changes"" This reverts commit e612607c8a16a735c92014714c00aa671954b4a5. * Revert "Revert "Chris doesn't want bugs"" This reverts commit bd656b814d7ffa2d9c84fa304d3adb8f1535f782. * Revert "Revert "Only you can prevent bugs"" This reverts commit 7772c95737130cf414ff1af49dcfb48865be5374. * Revert "Revert "Remove unnecessary auto generated comments"" This reverts commit 69315dc7baa6cd237fbd89394e544913596ec6e3. * Revert "Revert "Loony didn't like the passive"" This reverts commit ea397c6323e50d219395d5912850513afd6f2a7b. * Revert "Revert "Added RegionProtection checks"" This reverts commit 8cb41709f65e4322e68b2f0e1792987f7fc214f2. * Revert "Revert "PhaseChange"" This reverts commit da6b0e7071acf74df6447b15daf4ae6e39f057f6. * Working PhaseChange finally * Fix EarthGrab * Air fixes, PhaseChange changes
2016-12-20 04:43:56 +00:00
}
}
}
2016-01-13 21:14:34 +00:00
if (coreAbil instanceof EarthAbility && bPlayer.isElementToggled(Element.EARTH) == true) {
2017-01-06 01:57:39 +00:00
if (bPlayer.canCurrentlyBendWithWeapons()) {
if (abil.equalsIgnoreCase("Catapult")) {
new Catapult(player, false);
2017-01-06 01:57:39 +00:00
} else if (abil.equalsIgnoreCase("EarthBlast")) {
EarthBlast.throwEarth(player);
} else if (abil.equalsIgnoreCase("RaiseEarth")) {
new RaiseEarth(player);
} else if (abil.equalsIgnoreCase("Collapse")) {
new Collapse(player);
} else if (abil.equalsIgnoreCase("Shockwave")) {
Shockwave.coneShockwave(player);
} else if (abil.equalsIgnoreCase("EarthArmor")) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final EarthArmor armor = CoreAbility.getAbility(player, EarthArmor.class);
2017-01-06 01:57:39 +00:00
if (armor != null && armor.isFormed()) {
armor.click();
}
} else if (abil.equalsIgnoreCase("Tremorsense")) {
new Tremorsense(player, true);
} else if (abil.equalsIgnoreCase("MetalClips")) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final MetalClips clips = CoreAbility.getAbility(player, MetalClips.class);
2017-01-06 01:57:39 +00:00
if (clips == null) {
new MetalClips(player, 0);
2017-01-16 03:37:21 +00:00
} else if (clips.getMetalClipsCount() < (player.hasPermission("bending.ability.MetalClips.4clips") ? 4 : 3)) {
2017-01-06 01:57:39 +00:00
clips.shootMetal();
} else if (clips.getMetalClipsCount() == 4 && clips.isCanUse4Clips()) {
clips.crush();
}
} else if (abil.equalsIgnoreCase("LavaSurge")) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final LavaSurge surge = CoreAbility.getAbility(player, LavaSurge.class);
2017-01-06 01:57:39 +00:00
if (surge != null) {
surge.launch();
}
} else if (abil.equalsIgnoreCase("LavaFlow")) {
new LavaFlow(player, AbilityType.CLICK);
} else if (abil.equalsIgnoreCase("EarthSmash")) {
new EarthSmash(player, ClickType.LEFT_CLICK);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
} else if (abil.equalsIgnoreCase("EarthGrab")) {
new EarthGrab(player, GrabMode.PROJECTING);
2016-01-13 21:14:34 +00:00
}
}
}
2016-01-13 21:14:34 +00:00
if (coreAbil instanceof FireAbility && bPlayer.isElementToggled(Element.FIRE) == true) {
2017-01-06 01:57:39 +00:00
if (bPlayer.canCurrentlyBendWithWeapons()) {
if (abil.equalsIgnoreCase("Blaze")) {
new Blaze(player);
} else if (abil.equalsIgnoreCase("FireBlast")) {
new FireBlast(player);
} else if (abil.equalsIgnoreCase("FireJet")) {
new FireJet(player);
} else if (abil.equalsIgnoreCase("HeatControl")) {
new HeatControl(player, HeatControlType.MELT);
} else if (abil.equalsIgnoreCase("Illumination")) {
if (ConfigManager.defaultConfig.get().getBoolean("Abilities.Fire.Illumination.Passive")) {
bPlayer.toggleIllumination();
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
GeneralMethods.displayMovePreview(player);
BendingBoardManager.updateAllSlots(player);
2017-01-06 01:57:39 +00:00
} else {
new Illumination(player);
}
} else if (abil.equalsIgnoreCase("FireBurst")) {
FireBurst.coneBurst(player);
} else if (abil.equalsIgnoreCase("FireShield")) {
new FireShield(player);
} else if (abil.equalsIgnoreCase("WallOfFire")) {
new WallOfFire(player);
} else if (abil.equalsIgnoreCase("Combustion")) {
Combustion.explode(player);
1.8.4 (#769) * Fix OctopusForm (#734) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Attribute System + FireBlast example (#735) * Attribute System + FireBlast example * Removed PK jar :smiley: :dancer: * Fixes Chi Descriptions/Instructions, Removes Fire Passive (#737) * Fixes missing Chi ability descriptions and instructions https://trello.com/c/3vto7SEn/734-re-add-paralyze-and-rapidpunch-descrip tions-and-instructions * Removes FirePassive Was discussed in CD chat https://trello.com/c/skKfHiwR/733-convert-firebending-passive-to-the-new -passive-system * Change Octoform freezing (#741) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Change Octoform Freezing * Revert "Change Octoform Freezing" This reverts commit d5745fe3171b0e24682631889322d81f153d73bd. * Revert "Revert "Change Octoform Freezing"" This reverts commit 9a91730e0fec7c428f619ffca14e4ea467298b37. * Changed attributes to use plain reflection rather than annotations (#743) * should fix some issues with octopusform (#742) when this .remove() is called nothing has happened with this instance, so the old tempblocks/phasechange never actually get removed, and we get nullpointers trying to remove the ones for this instance since they were never even created * Fixed external elements, subelements and abilities not loading (#745) Due to plugins that depend on ProjectKorra loading in AFTER pk, when a BendingPlayer object is created, all the external elements, subelements or abilities they may have are lost because they are caught in the null checks. To work around this, we will continuously loop every second for 30 seconds until the request times out. If any elements/abilities the user has haven't loaded in, in that time (the side plugin has taken longer than 30 seconds to load), then it will time out and report it in the console. * New Attribute System (#746) • New Attribute System (WIP) • Fields should now be marked with @Attribute(Attribute.DAMAGE) or whatever the relevant attribute is. • If the Attribute you want is not there, you can provide a string instead • At runtime, these Attributes can be changed with Attributes.modify(ability/element, attribute, modifier) • Air and Chi have all been marked with @Attribute annotations • Updated Particlelib - Fixed bug with dragonbreath and endRod particles being wrong. AND added new 1.11 particles. * Adding blocks to the world async is not allowed (#744) * Wip (#748) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Plant block removal and /b add all feature (#749) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Fixed: Surge and WaterArms not removing plant block * New Feature: /bend add all [player] * fixed passives not enabling on /bend toggle all (#751) * fixed passives not enabling on /bend toggle all * Correct/Update comment to act as a TODO note. * Fix spectator target (#753) * Don't target spectators * Remove debug code - Remove stick debug code that was causing a NullPointerException. * Change block set order when moving earth (#754) - Set the source block to air after setting the target block to the new type. This will eliminate temporary holes, which minimizes major lighting updates. * Fix exceptions (#752) * Fix world check when sending particles - Check by World reference rather than string name comparison. The following Location distanceSquared call will throw an exception if the World names are the same but references aren't. * Fix several exceptions - Destroy LavaFlow instance when the Player leaves the World. - Destroy Torrent instance when the Player leaves the World. - Fix cooldown exception when Player is null. * PhaseChange Speed option added (#756) • Delay option changed to speed • Fixed EarthArmor breaking when a player is paralyzed. * FireManip, WaterBubble & 1.12 (#757) • Added basic FireManipulation. Still needs lots of improving, but that's for another commit. • Redone WaterBubble. Now has a click version and an expand/shrink animation. • Removed AirBubble • Updated Spigot to 1.12 • Fixed Octopus NPE • Fixed EarthArmor remaining after TPs to other worlds * EarthTunnel - DropLootIfNotRevert (#759) * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * Bug Fixes (Catapult, Illumination, Config) (#760) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * Fix LavaFlow (#755) Fixed "AllowNaturalFlow" * Updated to 1.12 with for days (#761) • Redone the (core) ability load system - The old one broke with the Guava update in 1.12 • Fixed some WaterBubble floods • Fixed PhaseChange melting snow super duper fast • Fixed some other misc bugs • Added 1.12 Spigot to classpath * 1.12 Bug Fixes (#762) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 fixes (#763) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 Fixes * Collision fixes, Air sound change, * Tried Fixing Collisions Currently the loops in CollisionInitializer#initializeDefaultCollisions() don't work * 1.8.4 Fixes (#764) * Small 1.8.4 fixes • Fixed selecting snow blocks as a water source not working when they are more than 3 blocks away • Fixed DensityShift turning lava into sand when you land softly • Fixed IceBlast not working on TempBlocks * Added FireManip particle options to config Also removed a sneaky debug message * 1.8.4 Fixes (#765) * Redone Fire Combos (#766) * Finalize Fire Combo split (#767) * 1.8.4 Fixes * Correct Fire Combos * Remove unused imports
2017-06-13 07:54:30 +00:00
} else if (abil.equalsIgnoreCase("FireManipulation")) {
if (CoreAbility.hasAbility(player, FireManipulation.class)) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final FireManipulation fireManip = CoreAbility.getAbility(player, FireManipulation.class);
1.8.4 (#769) * Fix OctopusForm (#734) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Attribute System + FireBlast example (#735) * Attribute System + FireBlast example * Removed PK jar :smiley: :dancer: * Fixes Chi Descriptions/Instructions, Removes Fire Passive (#737) * Fixes missing Chi ability descriptions and instructions https://trello.com/c/3vto7SEn/734-re-add-paralyze-and-rapidpunch-descrip tions-and-instructions * Removes FirePassive Was discussed in CD chat https://trello.com/c/skKfHiwR/733-convert-firebending-passive-to-the-new -passive-system * Change Octoform freezing (#741) * Reload changes * Catapult Fixes * Catapult Adjustment * Changes * OctopusForm fix * Change Octoform Freezing * Revert "Change Octoform Freezing" This reverts commit d5745fe3171b0e24682631889322d81f153d73bd. * Revert "Revert "Change Octoform Freezing"" This reverts commit 9a91730e0fec7c428f619ffca14e4ea467298b37. * Changed attributes to use plain reflection rather than annotations (#743) * should fix some issues with octopusform (#742) when this .remove() is called nothing has happened with this instance, so the old tempblocks/phasechange never actually get removed, and we get nullpointers trying to remove the ones for this instance since they were never even created * Fixed external elements, subelements and abilities not loading (#745) Due to plugins that depend on ProjectKorra loading in AFTER pk, when a BendingPlayer object is created, all the external elements, subelements or abilities they may have are lost because they are caught in the null checks. To work around this, we will continuously loop every second for 30 seconds until the request times out. If any elements/abilities the user has haven't loaded in, in that time (the side plugin has taken longer than 30 seconds to load), then it will time out and report it in the console. * New Attribute System (#746) • New Attribute System (WIP) • Fields should now be marked with @Attribute(Attribute.DAMAGE) or whatever the relevant attribute is. • If the Attribute you want is not there, you can provide a string instead • At runtime, these Attributes can be changed with Attributes.modify(ability/element, attribute, modifier) • Air and Chi have all been marked with @Attribute annotations • Updated Particlelib - Fixed bug with dragonbreath and endRod particles being wrong. AND added new 1.11 particles. * Adding blocks to the world async is not allowed (#744) * Wip (#748) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Plant block removal and /b add all feature (#749) * Fixed *abilitis* typo in Shockwave description * fixed: WaterSpout not working on PACKED_ICE - cause was looking for nonexistent config boolean, instead of at Properties.Water.IceBlocks list * Fixed: Surge and WaterArms not removing plant block * New Feature: /bend add all [player] * fixed passives not enabling on /bend toggle all (#751) * fixed passives not enabling on /bend toggle all * Correct/Update comment to act as a TODO note. * Fix spectator target (#753) * Don't target spectators * Remove debug code - Remove stick debug code that was causing a NullPointerException. * Change block set order when moving earth (#754) - Set the source block to air after setting the target block to the new type. This will eliminate temporary holes, which minimizes major lighting updates. * Fix exceptions (#752) * Fix world check when sending particles - Check by World reference rather than string name comparison. The following Location distanceSquared call will throw an exception if the World names are the same but references aren't. * Fix several exceptions - Destroy LavaFlow instance when the Player leaves the World. - Destroy Torrent instance when the Player leaves the World. - Fix cooldown exception when Player is null. * PhaseChange Speed option added (#756) • Delay option changed to speed • Fixed EarthArmor breaking when a player is paralyzed. * FireManip, WaterBubble & 1.12 (#757) • Added basic FireManipulation. Still needs lots of improving, but that's for another commit. • Redone WaterBubble. Now has a click version and an expand/shrink animation. • Removed AirBubble • Updated Spigot to 1.12 • Fixed Octopus NPE • Fixed EarthArmor remaining after TPs to other worlds * EarthTunnel - DropLootIfNotRevert (#759) * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * .gitignore - Added ignores for IntelliJ * EarthTunnel: DropLootIfNotRevert - config & functionality * Bug Fixes (Catapult, Illumination, Config) (#760) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * Fix LavaFlow (#755) Fixed "AllowNaturalFlow" * Updated to 1.12 with for days (#761) • Redone the (core) ability load system - The old one broke with the Guava update in 1.12 • Fixed some WaterBubble floods • Fixed PhaseChange melting snow super duper fast • Fixed some other misc bugs • Added 1.12 Spigot to classpath * 1.12 Bug Fixes (#762) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 fixes (#763) * Bug Fixes (Catapult, Illumination, Config) * Finish Fixing Illumination * Fix Catapult angle * Fix Catapult bug * Angle cancel option Catapult * Fix Illumination on leaves, Fix water flooding * Config stuff for Toby * 1.12 fixes * More 1.12 Fixes * Collision fixes, Air sound change, * Tried Fixing Collisions Currently the loops in CollisionInitializer#initializeDefaultCollisions() don't work * 1.8.4 Fixes (#764) * Small 1.8.4 fixes • Fixed selecting snow blocks as a water source not working when they are more than 3 blocks away • Fixed DensityShift turning lava into sand when you land softly • Fixed IceBlast not working on TempBlocks * Added FireManip particle options to config Also removed a sneaky debug message * 1.8.4 Fixes (#765) * Redone Fire Combos (#766) * Finalize Fire Combo split (#767) * 1.8.4 Fixes * Correct Fire Combos * Remove unused imports
2017-06-13 07:54:30 +00:00
if (fireManip.getFireManipulationType() == FireManipulationType.SHIFT) {
fireManip.click();
}
} else {
new FireManipulation(player, FireManipulationType.CLICK);
}
2017-01-06 01:57:39 +00:00
}
}
}
2016-01-13 21:14:34 +00:00
if (coreAbil instanceof ChiAbility && bPlayer.isElementToggled(Element.CHI) == true) {
2017-01-06 01:57:39 +00:00
if (bPlayer.canCurrentlyBendWithWeapons()) {
if (abil.equalsIgnoreCase("HighJump")) {
new HighJump(player);
} else if (abil.equalsIgnoreCase("Smokescreen")) {
new Smokescreen(player);
} else if (abil.equalsIgnoreCase("WarriorStance")) {
new WarriorStance(player);
} else if (abil.equalsIgnoreCase("AcrobatStance")) {
new AcrobatStance(player);
}
}
}
2017-01-06 01:57:39 +00:00
if (coreAbil instanceof AvatarAbility) {
if (abil.equalsIgnoreCase("AvatarState")) {
new AvatarState(player);
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
GeneralMethods.displayMovePreview(player);
BendingBoardManager.updateAllSlots(player);
}
}
}
2017-01-16 03:37:21 +00:00
if (MultiAbilityManager.hasMultiAbilityBound(player)) {
abil = MultiAbilityManager.getBoundMultiAbility(player);
if (abil.equalsIgnoreCase("WaterArms")) {
new WaterArms(player);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
} else if (abil.equalsIgnoreCase("Flight")) {
new FlightMultiAbility(player);
}
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerToggleFlight(final PlayerToggleFlightEvent event) {
final Player player = event.getPlayer();
if (CoreAbility.hasAbility(player, Tornado.class) || Bloodbending.isBloodbent(player) || Suffocate.isBreathbent(player) || CoreAbility.hasAbility(player, FireJet.class) || CoreAbility.hasAbility(player, AvatarState.class)) {
event.setCancelled(player.getGameMode() != GameMode.CREATIVE);
return;
}
if (FlightMultiAbility.getFlyingPlayers().contains(player.getUniqueId())) {
if (player.isFlying()) {
event.setCancelled(true);
return;
}
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onPlayerToggleGlide(final EntityToggleGlideEvent event) {
if (!(event.getEntity() instanceof Player)) {
return;
2016-01-13 21:14:34 +00:00
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final Player player = (Player) event.getEntity();
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
if (FlightMultiAbility.getFlyingPlayers().contains(player.getUniqueId())) {
if (player.isGliding()) {
event.setCancelled(true);
return;
}
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
if (ConfigManager.getConfig().getBoolean("Abilities.Fire.FireJet.ShowGliding")) {
if (CoreAbility.getAbility(player, FireJet.class) != null) {
event.setCancelled(true);
}
}
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
public void onProjectileHit(final ProjectileHitEvent event) {
final Integer id = event.getEntity().getEntityId();
final Smokescreen smokescreen = Smokescreen.getSnowballs().get(id);
2016-01-13 21:14:34 +00:00
if (smokescreen != null) {
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
final Location loc = event.getEntity().getLocation();
Smokescreen.playEffect(loc);
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
for (final Entity en : GeneralMethods.getEntitiesAroundPoint(loc, smokescreen.getRadius())) {
2016-01-13 21:14:34 +00:00
smokescreen.applyBlindness(en);
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
2016-01-13 21:14:34 +00:00
Smokescreen.getSnowballs().remove(id);
}
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPickupItem(final EntityPickupItemEvent event) {
for (final MetalClips metalClips : CoreAbility.getAbilities(MetalClips.class)) {
if (metalClips.getTrackedIngots().contains(event.getItem())) {
event.setCancelled(true);
}
}
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
if (event.isCancelled()) {
return;
}
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
if (event.getEntity() instanceof LivingEntity) {
LivingEntity lent = (LivingEntity) event.getEntity();
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
if (TempArmor.hasTempArmor(lent)) {
TempArmor armor = TempArmor.getVisibleTempArmor(lent);
ItemStack is = event.getItem().getItemStack();
int index = GeneralMethods.getArmorIndex(is.getType());
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
if (index == -1) {
return;
}
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
event.setCancelled(true);
ItemStack prev = armor.getOldArmor()[index];
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
if (GeneralMethods.compareArmor(is.getType(), prev.getType()) > 0) {
event.getEntity().getWorld().dropItemNaturally(event.getEntity().getLocation(), prev);
armor.getOldArmor()[index] = is;
event.getItem().remove();
}
}
}
1.8.9 (#1038) For Spigot 1.14.4+ ## General Gameplay ### Additions - Added default Suffocate cooldown: 6.5 seconds - Added kinetic damage tracker to AirSweep - Added self and others push strength options for AirSuction - Added config option for multiple blocks to be changed per EarthTunnel run, allowing for much faster earth tunnels - Added config to ignore ores completely for EarthTunnel (good for mining) - Added AllowSnow config option for IceBlast - Added AvatarStateCooldown config options for IceBlast and IceBullet - Added config option for ice trapping abilities to not place blocks in players head or feet ### Fixes - Fixed preset command not allowing page numbers higher than 1 - Fixed Catapult and MetalClips not respecting /b invincible - Fixed Charged FireBlast radius and cooldown - Fixed Suffocate being usable through walls - Fixed FireBlast ignoring particle radius options - Fixed FireBurst fragmenting (not looking like a single burst) - Fixed AirSweep knockback to be more consistent (lessened friction) - Fixed AirBlast knockback using wrong push options - Fixed EarthSmash using nonexistent AvatarState options - Fixed error when switching worlds with PhaseChange active - Fixed server crash when hitting falling blocks with high-velocity abilities - Fixed server crash when using EarthGrab over the void - Fixed EarthTunnel not using configurable revert time - Fixed EarthPillars persisting when no entities were around ### Changes - Improved pathing for EarthBlast; works more consistently and can be used from ceilings - Improved aiming for EarthBlast and IceBlast - Changed AirSwipe and AirSweep to originate from the player’s main hand - Changed AirBlast knockback calculations; made the push options affect knockback more directly - Changed EarthTunnel to use tempblocks properly - Moved core combo instructions to config ### Removals - Removed being able to use Lightning while using FireJet - Removed jukeboxes being tempblocks - Removed bending.command.import permission from plugin.yml ## API ### Additions - Added GeneralMethods#getMainHandLocation(Player) - Added GeneralMethods#getClosestEntity(Location, double) - Added GeneralMethods#getClosestLivingEntity(Location, double) - Added "large" abilities collision with each other - Added specific timings for hot spots in the code that should help server owners diagnose lag from PK + player move event + physics event + bending manager - Created local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. - Added check for concrete powder in move earth - Added PlaceholderAPI support (hopefully more to come) + %projectkorra_slot<1-9>% ability on slot <1-9> + %projectkorra_element% element of the player + %projectkorra_elementcolor% color of the player’s element + %projectkorra_elements% elements the player has - Added "bending" WorldGuard flag. + Used for allowing or denying bending in worldguard regions. Will fall back to the old method of the build flag if the custom flag fails to register or isn't set ### Fixes - Fixed calls to CoreAbility#isEnabled() causing NullPointerExceptions when a CoreAbility is not enabled ### Changes - Changed CoreAbility#getAbility(..) Javadocs to state when it returns null - Formatted codebase - Changed GeneralMethods#getEntitiesAroundPoint() use spigot method for entities around point, should be more optimized - Optimizations to water and air spout to not continually set flying - Optimized revertchecker to not use block.getChunk; this will load the chunk on the server and instead use hashmap of coords - Optimized revertchecker to use paperlib to allow servers running paperspigot to load the chunk for a revert block async - Optimized tempblock revert to load chunk async before updating stateOptimize move event to ignore head movements without directional movement - Optimized physics event to check for air prior to checking for tempblocks - Optimized tempblock set/revert to not apply physics for blocks that don't emit light - Optimize isWater to check for actual water blocks first - Optimize PhaseChange list check, hot spot due to being called in physics event ### Removals - Removed BindChangeEvent; never called or used - Removed HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
2019-12-10 07:03:28 +00:00
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onInventoryPickupItem(final InventoryPickupItemEvent event) {
for (final MetalClips metalClips : CoreAbility.getAbilities(MetalClips.class)) {
if (metalClips.getTrackedIngots().contains(event.getItem())) {
event.setCancelled(true);
}
}
}
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onItemMerge(final ItemMergeEvent event) {
for (final MetalClips metalClips : CoreAbility.getAbilities(MetalClips.class)) {
if (metalClips.getTrackedIngots().contains(event.getEntity()) || metalClips.getTrackedIngots().contains(event.getTarget())) {
event.setCancelled(true);
}
}
}
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onBlockPistonExtendEvent(final BlockPistonExtendEvent event) {
for (final Block b : event.getBlocks()) {
if (TempBlock.isTempBlock(b)) {
event.setCancelled(true);
break;
}
}
}
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onBlockPistonRetractEvent(final BlockPistonRetractEvent event) {
for (final Block b : event.getBlocks()) {
if (TempBlock.isTempBlock(b)) {
event.setCancelled(true);
break;
}
}
}
1.9.1 (#1145) ## Additions * Adds a built-in bending board sidebar to visualize bound abilities and cooldowns. * The board respects worlds where bending is disabled. * Players can use the command `/pk board` to toggle the visibility of their board. * Includes an API that community developers can use in BendingBoardManager. * Adds the `"Properties.BendingBoard"` config option to enable or disable the board server. * Adds language file configuration options to control BendingBoard visuals. * `"Board.Title"` * Controls the title at the top of the board. * Supports the standard Minecraft color codes. * `"Board.SelectionPrefix"` * Controls the prefix shown corresponding to your current hot bar slot. * Supports the standard Minecraft color codes. * `"Board.EmptySlot"` * Controls what is shown for empty slots. * Supports the standard Minecraft color codes. * `{slot_number}` can be used as a placeholder for the slot number. * `"Board.MiscSeparator"` * Controls the separation between hot bar binds and temporary cooldowns such as Combos. * Supports the standard Minecraft color codes. * Adds support for KingdomsX version 1.10.19.1 * Adds ability permission check to passive abilities. They should now respect their `bending.ability.<ability name>` permissions. * Adds `AbilityVelocityAffectEntityEvent` * A cancellable event that will fire whenever an ability would alter the velocity of an entity. * Adds the `Abilities.Earth.EarthSmash.Shoot.CollisionRadius` configuration option * Sets the collision radius of shot EarthSmash. ## Fixes * Fixes FireBlast going through liquids. * Fixes duplication involving waterlogged containers. * Fixes being able to not enter the name of a Preset when using the `/pk preset create <name>` command. * Fixes getDayFactor() not being applied correctly and occasionally producing the wrong value. * Fixes a rounding issue with some Fire ability damage configuration options. * Fixes an error when attempting to start EarthGrab. * Fixes PhaseChange error when melting snow. * Fixes a memory/process leak in how cooldowns were removed. * A player's cooldowns could only be removed when they were online. If a player's cooldown expired while they weren't online, their cooldown would attempt to revert every tick until the player rejoined. This has been resolved so cooldowns can revert while a player is offline. * A side effect of this fix is that it is now possible for `PlayerCooldownChangeEvents` to fire while their corresponding Player is offline. * Fixes an issue with `MultiAbilityManager#hasMultiAbilityBound` where it would return true if any MultiAbility is bound, not if the specified MultiAbility was bound. ## Misc Changes * Updates Towny version to 0.96.2.0 * DensityShift sand blocks can now be used as a bendable source. * Changes AvatarState so that its cooldown is applied when the ability ends instead of when it starts. * Changes togglable abilities such as AvatarState, Illumination, and TremorSense to visually show when they are enabled in the BendingBoard and on BendingPreview in the same way as the ChiBlocking Stances. * Updated the text of some ability descriptions and instructions. * Adds new cache to PhaseChange to greatly improve the performance of water/ice updates.
2021-06-07 23:58:29 +00:00
@EventHandler(priority = EventPriority.MONITOR)
public void onBendingElementChange(final PlayerChangeElementEvent event) {
final Player player = event.getTarget();
final BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
if (bPlayer == null) return;
if (event.getResult() == PlayerChangeElementEvent.Result.CHOOSE || event.getResult() == PlayerChangeElementEvent.Result.REMOVE || event.getResult() == PlayerChangeElementEvent.Result.PERMAREMOVE) {
BendingBoardManager.updateAllSlots(player);
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onBendingSubElementChange(final PlayerChangeSubElementEvent event) {
final Player player = event.getTarget();
final BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
if (bPlayer == null) return;
if (event.getResult() == PlayerChangeSubElementEvent.Result.CHOOSE || event.getResult() == PlayerChangeSubElementEvent.Result.REMOVE || event.getResult() == PlayerChangeSubElementEvent.Result.PERMAREMOVE) {
BendingBoardManager.updateAllSlots(player);
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onBindChange(final PlayerBindChangeEvent event) {
final Player player = event.getPlayer();
if (player == null) return;
BendingBoardManager.updateBoard(player, event.getAbility(), false, event.getSlot());
}
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerStanceChange(final PlayerStanceChangeEvent event) {
final Player player = event.getPlayer();
if (player == null) return;
if (!event.getOldStance().isEmpty()) {
BendingBoardManager.updateBoard(player, event.getOldStance(), false, 0);
}
if (!event.getNewStance().isEmpty()) {
BendingBoardManager.updateBoard(player, event.getNewStance(), false, 0);
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onBendingPlayerCreation(final BendingPlayerCreationEvent event) {
final Player player = event.getBendingPlayer().getPlayer();
BendingBoardManager.canUseScoreboard(player);
}
2016-01-13 21:14:34 +00:00
public static HashMap<Player, String> getBendingPlayerDeath() {
return BENDING_PLAYER_DEATH;
}
public static List<UUID> getRightClickInteract() {
return RIGHT_CLICK_INTERACT;
}
public static ArrayList<UUID> getToggledOut() {
return TOGGLED_OUT;
}
public static Map<Player, Integer> getJumpStatistics() {
return JUMPS;
}
1.8.7 (#972) ## Additions * Added Statistics API * Added cooldown database * Added database cooldown to `AvatarState` * Added code to try a reconnect if the database connection is lost * Added a check to ensure an entity is an instance of `LivingEntity` before casting in `PKListener` * Added `FireManipulation` and Combo permissions to `plugin.yml` * Added an isBender method to `BendingPlayer` * Added a getter for the player object stored in `BendingPlayer` * Added `OFFHAND_TRIGGER` to `ClickType` * Added `ElementalAbility#getEarthbendableBlocks()`, returns String list from config * Added `GeneralMethods#getBlockFaceFromValue(int xyz, double value)` * Added `GeneralMethods#checkDiagonalWall(Location location, Vector direction)`, to determine if there is a diagonal wall * Added required variable to `ComboAbilityInfo`, Set of `CoreAbility` a `Player` must have active to use corresponding `ComboAbility` * Added `PassiveAbility#isProgressable()`, checks for if the ability uses its progress() method * Added overriding capabilities to `CollisionManager` * Added `TempArmorStand` utility class * Added new `EarthGrab` * Added new Earth combo, `EarthPillars`. * Added new `Flight` `MultiAbility` * Added a "Sticky" feature to `TremorSense` * Added “/b stats” command to display player statistics * Added `TimeUtil` to convert millisecond times into human readable increments * Added Dynamic Sourcing config option for Earth and Water * Added enable/disable option to `FireManipulation` * Added configurable duration values to `AirShield`, `AirSpout`, and `Tornado`, `WaterSpout`, `HealingWaters`, and `OctopusForm` * Added `IceBlast` and `IceSpike` blast to collisions * Added mechanics to `AirSuction` to close doors * Added configurable cooldown to “/b choose” located at “Properties.ChooseCooldown” * Added IRON_TRAPDOOR to `FerroControl` functionality * Added new config option that can prevent the Updater from connecting to the website when disabled in the config * Added more options to `AirSwipe` in `AvatarState` config portion ## Fixes * Fixed “Abilities.Chi.Smokescreen.Instructions” spelling error in `ConfigManager.java` * Fixed “Abilities.Water.Passive.HydroSink.Description” spelling error in `ConfigManager.java` * Fixed “Commands.PermaRemove.Description” spelling error in `ConfigManager.java` * Fixed “Extras.Fire.DayMessage” spelling error in `ConfigManager.java` * Fixed `QuickStrike` causing an endless chain of itself that never stops chiblocking and does no damage * Fixed `Paralyze` going indefinitely when it has a cooldown of 0 * Fixed damaging chi abilities not working in `WarriorStance` * Fixed `WarriorStance` NPE * Fixed `AcrobatStance` NPE when a user attempts to log out while the move is active * Fixed paralyzing abilities canceling the sneak event if the player was sneaking * Fixed `Passives` not being removed when a player has their bending changed * Fixed `Passives` being activated in Spectator mode * Fixed `DensityShift` softening your landing while you are an Airbender * Fixed the passives that weren't working. This includes `FerroControl`, `FastSwim`, `AirAgility` and `ChiAgility` * Fixed `MultiAbility` instances not being removed when a player has their bending changed * Fixed player binds not being filtered properly if they are using a `MultiAbility` * Fixed `FireWheel` going over air * Fixed `AvatarState` sound causing the ability to not work * Fixed bottlebending for `Surge`, `WaterManipulation`, and `OctopusForm` * Fixed `Bloodbending` ConcurrentModificationException when attempting to bend non-living entities * Fixed `PhaseChange` not working on blocks placed over already melted blocks * Fixed `IceBlast` going on cooldown after sneaking after selecting a block * Fixed `Surge` making `TempBlocks` revert * Fixed `WaterArms` grapple ability not working * Fixed `WaterArms` making `TempBlocks` revert * Fixed `WaterArmsSpear` checking if a block is placeable after placing the block * Fixed aiming bugs with `WaterArmsSpear` * Fixed `LavaFlow` causing drop duplications when cooled by another move * Fixed `EarthArmor` making people invincible * Fixed `EarthTunnel` so that it will work through tall grass and other transparent blocks * Fixed `EarthTunnel` not checking if a block it was trying to remove was in a protected region * Fixed `EarthSmash` values being incorrect * Fixed being able to remove the `EarthArmor` armor items from their slots * Fixed `EarthTunnel` not being able to be used on fallen blocks * Fixed `FireManipulation` being able to go through blocks * Fixed `FireSpin` and `FireKick` not expanding to full size when hitting an entity * Fixed `HeatControl` solidify not working on Minecraft version 1.9 * Fixed `Illumination` dropping a torch if water is placed on the user's feet via bucket * Fixed `FireCombos` not working with `AvatarState` * Fixed `FireWheel` not going down inclines * Fixed `FireWheel` insane wall climbing * Fixed `FireShield` duration * Fixed `FireWheel` not always damaging due to an invalid entity selection range * Fixed logic in `GeneralMethods#displayColoredParticle()` which caused random blips of other colors * FIxed `ClassCastException` in `PKListener.java` caused by `MetalClips` * Fixed typo in `GeneralMethods` which confused NETHER_WART_BLOCK with NETHER_STALK * Fixed permission based limit on how many Presets players can create. `bending.command.preset.create.#` * Fixed NPE in `WhoCommand` when performing offline lookups * Fixed various bad `Map#contains()` checks throughout the plugin * Fixed `BendingPlayer#addCooldown()` adding cooldowns even if their time is set to an invalid number. * Fixed the `PlayerCooldownChangeEvent` being fired on an invalid case * Fixed entity targeting methods in `GeneralMethods` registering dead players waiting to respawn as valid targets * Fixed NPE caused by checking for Lunar Eclipse, Solar Eclipse, Full Moon or Sozins Comet when not in the Overworld * Fixed `AirBlast`, `AirSweep`, `FireBlast` going through diagonal walls * Fixed known fly glitches * Fixed ability redirection breaking bottlebending for that player until server restart ## Misc. Changes * Changed instructions in “/bending help <ability>” to `ChatColor.WHITE` * Changed “/bending help earth” message to match others * Improved check for exhaustion in move event * Changed `CoreAbility#getDescription()` to pull combos from the lang config as well * Renamed `Hydrosink.java` to `HydroSink.java` * Reduced combo cleanup delay to one minute * Improved `IceSpike` blast animation * Improved code in `ProjectKorra.java` * Improved `FireShield` animation * Changed passive classes to be more functional than previously * Changed `BendingPlayer#canBendPassive()` and `BendingPlayer#canUsePassive()` to have `CoreAbility` param instead of `Element` * Changed `PassiveAbility#isInstantiable()` to be a check if the ability must be activated by the player, not if it uses the constructor * Improved `CoreAbility#progressAll()` * Improved `AirAgility` and `ChiAgility` * Changed death messages that say “experienced kinetic damage” to “experienced a fatal collision” * Changed `AirShield` to permit `AirSwipe` and `AirSweep` to pass through it * Changed `FireShield` to permit `FireBlastCharged` to pass through it * Changed `AirBlast`, `AirSuction`, `Blaze`, and `Combustion` so they do not collide with any other abilities * Changed `AirSwipe` and `AirSweep` so they can respectively pass through other instances of themselves. * Removed all active abilities for a given player when they quit the server * Changed old `EarthGrab` to `EarthDome` combo * Changed `AirSwipe` to cool lava temporarily instead of permanently * Changed “/pk” to return the “/pk help” pages * Changed `InvincibleCommand` to use `i` as an alias. “/pk i” * Changed `Preset` bind command to use branding * Changed `Preset` list command to use pages * Changed bending preview to persist while on an ability slot * Changed moves that cool lava (`AirBlast`, `AirBurst`, `AirSwipe`, `HeatControl`) so that they revert `LavaFlow` blocks * Changed `LavaFlow` click to only produce particles on blocks it has affected * Updated the `Updater` URL * Updated “/pk help <element>” to support Avatar as an argument * Updated “/pk help <element>” to prompt users to enter “/pk display <element>” instead of “/pk h <elementcombos>” * Changed `FireWheel` default range in `AvatarState` config portion * Changed `AirStream` default hold duration in `AvatarState` config portion * Changed `WaterArms` to not go through tempblocks * Changed `HealingWaters` previous duration value to “PotionDuration” in order to accurately represent what the setting changed * Increased the default number of creatable presets to 5 * Disabled FireManipulation by default ## Removals * Removed `ImportCommand` * Removed `AirSwipes` capability to break blocks * Removed metal ores (Iron, Gold, and Quartz) from the Earthbendable's list * Removed `AirPassive.java` and `WaterPassive.java`, combos are in their own respective files. * Removed redundant checks in `PKListener` * Removed redundant Earthbendable checks in `Extraction` * Removed redundant checks in `BendingPlayer` * Removed unnecessary code from `GeneralMethods#getTargetedEntity()` * Removed unnecessary SuppressWarnings for deprecation in various classes * Removed unnecessary `SpiritPlayer` checks in `BendingPlayer#canBind(CoreAbility ability)`
2018-08-07 05:46:09 +00:00
}