Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
## 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)`
  • Loading branch information
ChristopherWMM authored Aug 7, 2018
1 parent 08165ed commit 9ae9c07
Show file tree
Hide file tree
Showing 239 changed files with 18,025 additions and 15,800 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ jdk:
notifications:
slack:
rooms:
- projectkorra:h9WFZqQ2o6fuCkI69ko28XgF#general
- projectkorra:h9WFZqQ2o6fuCkI69ko28XgF#devs
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@ You can view the changelogs for the plugin you're running in the thread created

## API

There are several ways Developers can hook into the ProjectKorra API. Developers looking to learn how to use our API, a tutorial on creating your own abilities can be found [here](http://projectkorra.com/wiki/index.php?title=Creating_A_ProjectKorra_Ability). Additionally, You can view the [Javadocs](http://projectkorra.com/docs) for more detailed information.
There are several ways Developers can hook into the ProjectKorra API. Developers looking to learn how to use our API, a tutorial on creating your own abilities can be found [here](https://github.com/ProjectKorra/ProjectKorra/wiki/Creating-an-Addon-Ability). Additionally, You can view the [Javadocs](http://projectkorra.com/docs) for more detailed information.

## Configuration

The ProjectKorra (Core) configuration will have its own wiki page explaining all that you need to know. (Link Coming Soon)

## Commands / Permissions

An extensive list of the available commands and permissions can be found on the wiki by clicking [here](http://projectkorra.com/wiki/index.php?title=ProjectKorra_(Core)_Commands_and_Permissions)
An extensive list of the available commands and permissions can be found on the wiki by clicking [here](https://github.com/ProjectKorra/ProjectKorra/wiki/Commands)

## Bending

Players may choose any of the disciplines below and play. Each discipline has its own page dedicated to it, below is just a brief summary of what each element is capable of doing.

### [Airbending](http://projectkorra.com/wiki/index.php?title=Airbending)
### [Airbending](https://github.com/ProjectKorra/ProjectKorra/wiki/Airbending)

- Specializes in mobility and defense.
- The land is an ideal spot for an airbender, despite being able to bend in water as well.
Expand All @@ -57,7 +57,7 @@ Players may choose any of the disciplines below and play. Each discipline has it
- Increases speed, decreasing rate of hunger, and takes no fall damage.
- Comes with the Flight and SpiritualProjection subelements.

### [Waterbending](http://projectkorra.com/wiki/index.php?title=Waterbending)
### [Waterbending](https://github.com/ProjectKorra/ProjectKorra/wiki/Waterbending)

- Specializes in maneuverability in and on the water.
- Oceans are perfect for Waterbenders.
Expand All @@ -66,26 +66,26 @@ Players may choose any of the disciplines below and play. Each discipline has it
- Opens up possibilities in bodies of water that are otherwise closed to the other disciplines.
- Comes with Bloodbending, Healing, Icebending and Plantbending subelements.

### [Earthbending](http://projectkorra.com/wiki/index.php?title=Earthbending)
### [Earthbending](https://github.com/ProjectKorra/ProjectKorra/wiki/Earthbending)

- Specializes in manipulating the earth around them.
- Any area containing land is perfect for an earthbender.
- Techniques range from using Earth to guard yourself (Armor and Walls), using Earth to launch yourself, digging, blasting earth at other places, and much more.
- Fundamentally the same as Waterbenders, with a mix of offensive and defensive playstyles.
- Comes with the Sand, Metal and Lavabending subelements.

### [Firebending](http://projectkorra.com/wiki/index.php?title=Firebending)
### [Firebending](https://github.com/ProjectKorra/ProjectKorra/wiki/Firebending)

- Very offensive playstyle.
- Any environment other than water is suitable for Firebenders.
- By default, abilities range from extinguishing fires, creating rings of fire on the gruond, creating walls of fire, lightning, shooting fire blasts, and much more.
- Very little mobility and defense.
- Comes with the Lightning and Combustion subelements.

### [Chiblocking](http://projectkorra.com/wiki/index.php?title=Chiblocking)
### [Chiblocking](https://github.com/ProjectKorra/ProjectKorra/wiki/Chiblocking)

- Specializes in bare handed combat.
- Can block a user's chi, temporarily disabling their bending.
- Takes less fall damage, jump higher, and run faster.
- Strikes deal more damage than normal.
- Not very good when it comes to defense.
- Not very good when it comes to defense.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.projectkorra</groupId>
<artifactId>projectkorra</artifactId>
<version>1.8.6</version>
<version>1.8.7</version>
<packaging>jar</packaging>
<name>ProjectKorra</name>

Expand Down
62 changes: 32 additions & 30 deletions src/com/projectkorra/projectkorra/BendingManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
import org.bukkit.entity.Player;

import com.projectkorra.projectkorra.ability.CoreAbility;
import com.projectkorra.projectkorra.ability.FireAbility;
import com.projectkorra.projectkorra.ability.ElementalAbility;
import com.projectkorra.projectkorra.configuration.ConfigManager;
import com.projectkorra.projectkorra.earthbending.metal.MetalClips;
import com.projectkorra.projectkorra.object.HorizontalVelocityTracker;
import com.projectkorra.projectkorra.util.ActionBar;
import com.projectkorra.projectkorra.util.Flight;
import com.projectkorra.projectkorra.util.RevertChecker;
import com.projectkorra.projectkorra.util.TempArmor;
import com.projectkorra.projectkorra.util.TempPotionEffect;
import com.projectkorra.projectkorra.waterbending.blood.Bloodbending;
import com.projectkorra.rpg.RPGMethods;
Expand All @@ -31,17 +31,17 @@ public class BendingManager implements Runnable {

public BendingManager() {
instance = this;
time = System.currentTimeMillis();
this.time = System.currentTimeMillis();
}

public static BendingManager getInstance() {
return instance;
}

public void handleCooldowns() {
for (UUID uuid : BendingPlayer.getPlayers().keySet()) {
BendingPlayer bPlayer = BendingPlayer.getPlayers().get(uuid);
for (String abil : bPlayer.getCooldowns().keySet()) {
for (final UUID uuid : BendingPlayer.getPlayers().keySet()) {
final BendingPlayer bPlayer = BendingPlayer.getPlayers().get(uuid);
for (final String abil : bPlayer.getCooldowns().keySet()) {
if (System.currentTimeMillis() >= bPlayer.getCooldown(abil)) {
bPlayer.removeCooldown(abil);
}
Expand All @@ -50,24 +50,24 @@ public void handleCooldowns() {
}

public void handleDayNight() {
for (World world : Bukkit.getServer().getWorlds()) {
if (!times.containsKey(world)) {
if (FireAbility.isDay(world)) {
times.put(world, true);
for (final World world : Bukkit.getServer().getWorlds()) {
if (!this.times.containsKey(world)) {
if (ElementalAbility.isDay(world)) {
this.times.put(world, true);
} else {
times.put(world, false);
this.times.put(world, false);
}
} else {
if (GeneralMethods.hasRPG()) {
if (RPGMethods.isFullMoon(world) || RPGMethods.isLunarEclipse(world) || RPGMethods.isSolarEclipse(world) || RPGMethods.isSozinsComet(world)) {
continue;
}
}
if (times.get(world) && !FireAbility.isDay(world)) {
if (this.times.get(world) && !ElementalAbility.isDay(world)) {
// The hashmap says it is day, but it is not.
times.put(world, false); // Sets time to night.
for (Player player : world.getPlayers()) {
BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
this.times.put(world, false); // Sets time to night.
for (final Player player : world.getPlayers()) {
final BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
if (bPlayer == null) {
continue;
}
Expand All @@ -80,11 +80,11 @@ public void handleDayNight() {
}
}

if (!times.get(world) && FireAbility.isDay(world)) {
if (!this.times.get(world) && ElementalAbility.isDay(world)) {
// The hashmap says it is night, but it is day.
times.put(world, true);
for (Player player : world.getPlayers()) {
BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
this.times.put(world, true);
for (final Player player : world.getPlayers()) {
final BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
if (bPlayer == null) {
continue;
}
Expand All @@ -101,28 +101,30 @@ public void handleDayNight() {
}
}

@Override
public void run() {
try {
interval = System.currentTimeMillis() - time;
time = System.currentTimeMillis();
ProjectKorra.time_step = interval;
this.interval = System.currentTimeMillis() - this.time;
this.time = System.currentTimeMillis();
ProjectKorra.time_step = this.interval;

CoreAbility.progressAll();
TempPotionEffect.progressAll();
handleDayNight();
Flight.handle();
this.handleDayNight();
RevertChecker.revertAirBlocks();
HorizontalVelocityTracker.updateAll();
handleCooldowns();
for (Player player : Bukkit.getServer().getOnlinePlayers()) {
if (MetalClips.isControlled(player)) {
ActionBar.sendActionBar(Element.METAL.getColor() + "* MetalClipped *", player);
} else if (Bloodbending.isBloodbent(player)) {
this.handleCooldowns();
TempArmor.cleanup();

for (final Player player : Bukkit.getOnlinePlayers()) {
if (Bloodbending.isBloodbent(player)) {
ActionBar.sendActionBar(Element.BLOOD.getColor() + "* Bloodbent *", player);
} else if (MetalClips.isControlled(player)) {
ActionBar.sendActionBar(Element.METAL.getColor() + "* MetalClipped *", player);
}
}
}
catch (Exception e) {
catch (final Exception e) {
e.printStackTrace();
}
}
Expand Down
Loading

0 comments on commit 9ae9c07

Please sign in to comment.