TF-ProjectKorra/src/com/projectkorra/projectkorra/object/Preset.java

342 lines
10 KiB
Java
Raw Normal View History

package com.projectkorra.projectkorra.object;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
2016-01-17 22:17:19 +00:00
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
import com.projectkorra.projectkorra.BendingPlayer;
import com.projectkorra.projectkorra.ProjectKorra;
import com.projectkorra.projectkorra.ability.CoreAbility;
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;
2016-01-17 22:17:19 +00:00
import com.projectkorra.projectkorra.configuration.ConfigManager;
import com.projectkorra.projectkorra.storage.DBConnection;
/**
* A savable association of abilities and hotbar slots, stored per 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
*
* @author kingbirdy
*
*/
public class Preset {
/**
2015-08-27 05:25:09 +00:00
* ConcurrentHashMap that stores a list of every Player's {@link Preset
* presets}, keyed to their UUID
*/
public static Map<UUID, List<Preset>> presets = new ConcurrentHashMap<UUID, List<Preset>>();
2016-01-17 22:17:19 +00:00
public static FileConfiguration config = ConfigManager.presetConfig.get();
2017-01-16 06:48:20 +00:00
public static HashMap<String, ArrayList<String>> externalPresets = new HashMap<String, ArrayList<String>>();
static String loadQuery = "SELECT * FROM pk_presets WHERE uuid = ?";
static String loadNameQuery = "SELECT * FROM pk_presets WHERE uuid = ? AND name = ?";
static String deleteQuery = "DELETE FROM pk_presets WHERE uuid = ? AND name = ?";
static String insertQuery = "INSERT INTO pk_presets (uuid, name) VALUES (?, ?)";
static String updateQuery1 = "UPDATE pk_presets SET slot";
static String updateQuery2 = " = ? WHERE uuid = ? AND name = ?";
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
private final UUID uuid;
private final HashMap<Integer, String> abilities;
private final String name;
/**
* Creates a new {@link Preset}
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
*
* @param uuid The UUID of the Player who the Preset belongs to
* @param name The name of the Preset
2015-08-27 05:25:09 +00:00
* @param abilities A HashMap of the abilities to be saved in the Preset,
* keyed to the slot they're bound to
*/
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 Preset(final UUID uuid, final String name, final HashMap<Integer, String> abilities) {
this.uuid = uuid;
this.name = name;
this.abilities = abilities;
if (!presets.containsKey(uuid)) {
presets.put(uuid, new ArrayList<Preset>());
}
presets.get(uuid).add(this);
}
/**
* Unload a Player's Presets from those stored in memory.
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
*
* @param player The Player who's Presets should be unloaded
*/
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 static void unloadPreset(final Player player) {
final UUID uuid = player.getUniqueId();
presets.remove(uuid);
}
/**
* Load a Player's Presets into memory.
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
*
* @param player The Player who's Presets should be loaded
*/
public static void loadPresets(final Player player) {
new BukkitRunnable() {
@Override
public void run() {
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 UUID uuid = player.getUniqueId();
if (uuid == 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
}
try {
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 PreparedStatement ps = DBConnection.sql.getConnection().prepareStatement(loadQuery);
ps.setString(1, uuid.toString());
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 ResultSet rs = ps.executeQuery();
if (rs.next()) { // Presets exist.
int i = 0;
do {
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 HashMap<Integer, String> moves = new HashMap<Integer, String>();
for (int total = 1; total <= 9; total++) {
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 slot = rs.getString("slot" + total);
if (slot != null) {
2016-01-13 21:14:34 +00:00
moves.put(total, slot);
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
new Preset(uuid, rs.getString("name"), moves);
i++;
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
} while (rs.next());
ProjectKorra.log.info("Loaded " + i + " presets for " + player.getName());
}
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
} catch (final SQLException ex) {
ex.printStackTrace();
}
}
}.runTaskAsynchronously(ProjectKorra.plugin);
}
2017-01-16 06:48:20 +00:00
2016-01-15 01:07:59 +00:00
/**
* Reload a Player's Presets from those stored in memory.
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-15 01:07:59 +00:00
* @param player The Player who's Presets should be unloaded
*/
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 static void reloadPreset(final Player player) {
2016-01-15 01:07:59 +00:00
unloadPreset(player);
loadPresets(player);
}
/**
* Binds the abilities from a Preset for the given 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
*
* @param player The Player the Preset should be bound for
* @param name The name of the Preset that should be bound
* @return True if all abilities were successfully bound, or false otherwise
*/
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 static boolean bindPreset(final Player player, final Preset preset) {
final BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
2016-01-15 01:07:59 +00:00
if (bPlayer == null) {
return false;
}
2017-01-16 06:48:20 +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 HashMap<Integer, String> abilities = new HashMap<>(preset.abilities);
boolean boundAll = true;
for (int i = 1; i <= 9; 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 CoreAbility coreAbil = CoreAbility.getAbility(abilities.get(i));
if (coreAbil != null && !bPlayer.canBind(coreAbil)) {
abilities.remove(i);
boundAll = false;
}
}
bPlayer.setAbilities(abilities);
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.updateAllSlots(player);
return boundAll;
}
/**
* Checks if a Preset with a certain name exists for a given 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
*
* @param player The player who's Presets should be checked
* @param name The name of the Preset to look for
* @return true if the Preset exists, false otherwise
*/
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 static boolean presetExists(final Player player, final String name) {
if (!presets.containsKey(player.getUniqueId())) {
return false;
}
boolean exists = false;
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 Preset preset : presets.get(player.getUniqueId())) {
if (preset.name.equalsIgnoreCase(name)) {
exists = true;
}
}
return exists;
}
/**
* Gets a Preset for the specified 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
*
* @param Player The Player who's Preset should be gotten
* @param name The name of the Preset to get
* @return The Preset, if it exists, or null otherwise
*/
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 static Preset getPreset(final Player player, final String name) {
if (!presets.containsKey(player.getUniqueId())) {
return 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
for (final Preset preset : presets.get(player.getUniqueId())) {
if (preset.name.equalsIgnoreCase(name)) {
return preset;
}
}
return null;
}
2017-01-16 06:48:20 +00:00
2016-01-17 22:17:19 +00:00
public static void loadExternalPresets() {
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 HashMap<String, ArrayList<String>> presets = new HashMap<String, ArrayList<String>>();
for (final String name : config.getKeys(false)) {
if (!presets.containsKey(name)) {
2017-01-16 06:48:20 +00:00
if (!config.getStringList(name).isEmpty() && config.getStringList(name).size() <= 9) {
presets.put(name.toLowerCase(), (ArrayList<String>) config.getStringList(name));
}
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-17 22:17:19 +00:00
}
externalPresets = presets;
}
2017-01-16 06:48:20 +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
public static boolean externalPresetExists(final String name) {
for (final String preset : externalPresets.keySet()) {
2016-01-17 22:17:19 +00:00
if (name.equalsIgnoreCase(preset)) {
return true;
}
}
return false;
}
/**
* Gets the contents of a Preset for the specified 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
*
* @param player The Player who's Preset should be gotten
* @param name The name of the Preset who's contents should be gotten
2015-08-27 05:25:09 +00:00
* @return HashMap of ability names keyed to hotbar slots, if the Preset
* exists, or null otherwise
*/
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 static HashMap<Integer, String> getPresetContents(final Player player, final String name) {
if (!presets.containsKey(player.getUniqueId())) {
return 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
}
for (final Preset preset : presets.get(player.getUniqueId())) {
if (preset.name.equalsIgnoreCase(name)) {
return preset.abilities;
}
}
return null;
}
2017-01-16 06:48:20 +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
public static boolean bindExternalPreset(final Player player, final String name) {
2016-01-17 22:17:19 +00:00
boolean boundAll = true;
int slot = 0;
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-17 22:17:19 +00:00
if (bPlayer == null) {
return false;
}
2017-01-16 06:48:20 +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 HashMap<Integer, String> abilities = new HashMap<Integer, String>();
2016-01-17 22:17:19 +00:00
if (externalPresetExists(name.toLowerCase())) {
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 String ability : externalPresets.get(name.toLowerCase())) {
2016-01-17 22:17:19 +00:00
slot++;
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 = CoreAbility.getAbility(ability);
2016-01-17 22:17:19 +00:00
if (coreAbil != null) {
abilities.put(slot, coreAbil.getName());
}
}
for (int i = 1; i <= 9; 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 CoreAbility coreAbil = CoreAbility.getAbility(abilities.get(i));
if (coreAbil != null && !bPlayer.canBind(coreAbil)) {
2016-01-17 22:17:19 +00:00
abilities.remove(i);
boundAll = false;
}
}
bPlayer.setAbilities(abilities);
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.updateAllSlots(player);
2016-01-17 22:17:19 +00:00
return boundAll;
}
return false;
}
/**
* Deletes the Preset from the database.
*/
public void delete() {
try {
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 PreparedStatement ps = DBConnection.sql.getConnection().prepareStatement(deleteQuery);
ps.setString(1, this.uuid.toString());
ps.setString(2, this.name);
ps.execute();
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
presets.get(this.uuid).remove(this);
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
} catch (final SQLException e) {
e.printStackTrace();
}
}
/**
* Gets the name of the preset.
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 The name of the preset
*/
public String getName() {
return this.name;
}
/**
* Saves the Preset to the database.
*/
2016-01-15 01:07:59 +00:00
public void save(final Player player) {
try {
PreparedStatement ps = DBConnection.sql.getConnection().prepareStatement(loadNameQuery);
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
ps.setString(1, this.uuid.toString());
ps.setString(2, this.name);
final ResultSet rs = ps.executeQuery();
if (!rs.next()) { // if the preset doesn't exist in the DB, create it.
ps = DBConnection.sql.getConnection().prepareStatement(insertQuery);
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
ps.setString(1, this.uuid.toString());
ps.setString(2, this.name);
ps.execute();
}
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
} catch (final SQLException e) {
e.printStackTrace();
}
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 Integer i : this.abilities.keySet()) {
new BukkitRunnable() {
PreparedStatement ps;
@Override
public void run() {
try {
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
this.ps = DBConnection.sql.getConnection().prepareStatement(updateQuery1 + i + updateQuery2);
this.ps.setString(1, Preset.this.abilities.get(i));
this.ps.setString(2, Preset.this.uuid.toString());
this.ps.setString(3, Preset.this.name);
this.ps.execute();
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
} catch (final SQLException e) {
e.printStackTrace();
}
2015-08-27 05:25:09 +00:00
}
}.runTaskAsynchronously(ProjectKorra.plugin);
}
2017-01-16 06:48:20 +00:00
2016-01-15 01:07:59 +00:00
new BukkitRunnable() {
@Override
public void run() {
try {
Thread.sleep(1500);
reloadPreset(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
} catch (final InterruptedException e) {
2016-01-15 01:07:59 +00:00
e.printStackTrace();
}
}
}.runTaskAsynchronously(ProjectKorra.plugin);
}
}