Commit graph

2226 commits

Author SHA1 Message Date
jayoevans
aee46d53c3 Added new cooldown system 2019-10-22 18:25:21 +10:00
jayoevans
3641f4ab9b Setup Element back-end 2019-10-22 14:44:05 +10:00
jayoevans
299cec824e Initial rework of the BendingPlayer back-end 2019-10-22 11:49:47 +10:00
Josh
a8a8daa6d0 Fix catapult and metalclips not respecting invincible or region protection (#1027)
## Fixes
* Fixes catapult launching player with invincible toggled or protected region
* Fixes metalclip working on players with invincible toggled
2019-09-28 12:00:31 -07:00
Josh
da76d0ac12 Fix Preset command not being able to list page numbers higher than 1 (#1024)
## Fixes
* Fixes listing preset pages. Previously doing "/b preset list 2" would just return the help message
2019-09-10 18:54:18 -07:00
Benford Whitaker
2091e58c35 AirBlast and AirBurst Changes (#1017)
## Removals
* Removes `AirBurst#getAffectedEntities()`, shouldn't allow direct access to the list

## Misc. Changes
* Lowers "friction" in AirBlast knockback for entities on the ground
* Ignore "friction" in AirBlast when the AirBurst source isn't null
* Changes entity velocity comparison to only add vectors angled > pi/3 from push vector
* Increase default AirBurst push option
2019-09-08 20:41:49 -07:00
Benford Whitaker
0f2940f5eb Remove revertBlock recursive calls in EarthAbility and Collapse (#1023)
## Fixes
* Fixes recursive calls to `EarthAbility#revertBlock(Block)`
2019-09-08 20:19:49 -07:00
Hernán Indíbil de la Cruz Calvo
861f0055d5 Fix WaterReturn not finding bottles after potions (#1021)
## Additions
Static Function that returns the slot id of the first water bottle found, -1 if none found. Used to not repeat code that should be the same (hasWaterBottle and emptyWaterBottle start finding this index, but they don't use the same code).

## Fixes
Fixes an error in hasWaterBottle function. In the former version of the WaterReturn.java file, hasWaterBottle only tests if the first item with Material.POTION in the inventory is of type PotionType.WATER. Having a random potion in the inventory in any slot before a Water Bottle makes this to return false, instead of checking all the potions in the Player Inventory. This causes the player to be unable to use the bottle as a water source. The new code checks all the potions.

## Misc. Changes
Since the items in an inventory aren't usually sorted (players don't sort items by id in their inventories), the "contains" method iterates all over the items on the inventory until it finds one with the specified material. The "first" method does the same, but instead of returning a boolean, it gives us the slot index of the item or -1 if not found. Since in "fillBottle" method we are going to calculate that index after checking whether the item is in the inventory or not, I've calculated this index with the "first" method and checking if it is greater or equals than 0 (not -1). Doing so we don't repeat the search task and we have a little improvement in efficiency terms.
2019-09-02 09:53:51 -07:00
Benford Whitaker
c4be31c3b9 Fix Charged FireBlast radius and cooldown (#1019)
## Fixes
* Fixes Charged FireBlast radius being too big
* Fixes Charged FireBlast cooldown happening without using the ability
2019-08-31 19:42:32 -07:00
Josh
34fa6d08b8 Fix cooldowns of fire abilities with a duration, getClosestEntity, and Surge Wall diagonal check (#1016)
## Fixes
* Fixes getClosestEntity to not rely on a distance check for if the entity is returned, but instead purely get the closest entity from getEntitiesAroundPoint
* Fixes SurgeWall to not do that new diagonal check, fixes Ice wall glitching out

## Misc. Changes
* Changes JetBlaze hitbox size, was way too big
* Changes FireJet, WallOfFire, and the FireJet Combos cooldowns to activate when the move completes
2019-08-31 16:28:31 -07:00
Benford Whitaker
5d9e1d5b05 Fix infinite recursion in GeneralMethods from incorrect method call (#1014)
## Fixes
* Fixes infinite recursion in `GeneralMethods#getTargetedLocation(Player, int)`
2019-08-26 00:18:58 -07:00
Benford Whitaker
cd9968a1c1 Fix EarthBlast and Suffocate, and clean up RaiseEarth (#1009)
## Additions
* Adds logic for EarthBlast being used on ceilings
* Adds default cooldown to Suffocate

## Changes
* Fixes Suffocate being usable through walls
* Improves logic for EarthBlast pathing in general

## Removals
* `ALL_AFFECTED_BLOCKS` in RaiseEarth isn't actually used, removes it.
2019-08-25 21:18:40 -07:00
Benford Whitaker
3972104586 Fix config issues in AirBlast, AirSuction, and EarthSmash (#1008)
## Additions
* Adds self/others options for AirSuction

## Fixes
* Fixes AirBlast push self and others being mixed up
* Fixes AirBlast not using self push at all
  * #1006 
* Fixes EarthSmash using nonexistent AvatarState config options

## Removals
* Removes unnecessary arithmetic from AirBlast and AirSuction in determining knockback power
    * Defaults in config have been changed to make up for removing the arithmetic
2019-08-22 14:45:23 -07:00
Josh
5637750166 Change AirSweep and FireJet + Lightning (#1007)
## Additions
* Adds HorizontalVelocityTracker to AirSweep
* Adds GeneralMethods#getMainHandLocation(final Player player)

## Changes
* Changed AirSweep and AirSwipe to originate from a Player's main hand location
* Changed the knockback caused by AirSweep more consistent in the air and on the ground
* Disable Lightning use when using FireJet
2019-08-22 14:04:04 -07:00
Numin
77a461260d Fix FireBlast ignoring config values (#1005)
## Fixes
* Fixes FireBlast not using it's FlameParticleRadius and SmokeParticleRadius config values.
2019-08-17 14:39:04 -07:00
Benford Whitaker
c05deb2f15 bad isEnabled checks (#1004)
## Fixes
* Add null checks before several `CoreAbility.getAbility(someclass).isEnabled()`

## Misc. Changes
* Changes `CoreAbility.getAbility(..)` javadoc to describe when it returns null
* Changes cooldown DB table create query to use proper primary key
2019-08-17 14:30:50 -07:00
Benford Whitaker
8f5ab79b7a Remove BindChangeEvent (#1003)
## Removals
* Removes unused BindChangeEvent
2019-08-02 22:05:51 -07:00
Josh
a57e599e62 crash fix (#994)
## Fixes
* Server crash with AirSwipe (or any move that can cause high velocity) on falling blocks or tnt
* Error with PhaseChange if you switch worlds while using
* Server crash with EarthGrab when used over void
2019-08-01 12:47:44 -07:00
Benford Whitaker
a174664ecf Add getClosest(Living)Entity methods (#1002)
## Additions
* Adds GeneralMethods#getClosestEntity(Location, double)
* Adds GeneralMethods#getClosestLivingEntity(Location, double)

## Misc. Changes
* Changes GeneralMethods#isUndead(Entity) to use `default`, removes warnings
* Changes GeneralMethods#isWeapon(Material) to use `default`, removes warnings
2019-08-01 12:40:27 -07:00
Josh
e1c977ca7d Catch any exception for custom worldguard flag register (#993)
## Misc. Changes
* Changes exception for WorldGuard bending flag
* Skip jukeboxes for TempBlocks to prevent invalid record type when trying to revert them
2019-07-03 10:08:41 -07:00
Benford Whitaker
0faa8b6398 remove import command permission (#992)
## Removals
* Removes bending.command.import permission node from plugin.yml
2019-06-23 18:51:40 -07:00
Benford Whitaker
864f67ef37 earthtunnel again (#991)
## Misc. Changes
* change isOre in earthtunnel back to a switch statement but properly implemented
2019-06-23 16:55:58 -07:00
Benford Whitaker
f311305720 earthtunnel changes (#990)
## Misc. Changes
* Made changes to earthtunnel to properly use TempBlock
2019-06-23 14:00:05 -07:00
Christopher Martin
e0d9774474
Format Codebase (#989)
## Misc. Changes
* Auto-formatted the codebase with a few minor fixes by hand
2019-06-22 22:31:50 -07:00
Benford Whitaker
3d9f99bc57 earthpillars bug + earthblast & iceblast improvements (#988)
## Additions
* Improved earthblast and iceblast aiming.

## Fixes
* Fixed earthpillars bug where using the ability while not around entities creates a loop until the player is around other entities.
2019-06-22 15:31:10 -07:00
Josh
e757cea57a improvements/updates/fixes (#987)
## Additions
* use spigot method for entities around point, should be more optimized
* optimizations to water and air spout to not continually set flying
* optimization 1 for revertchecker: do not use block.getChunk as this will load the chunk on the server and instead use hashmap of coords
* optimization 2 for revertcheck: use paperlib to allow servers running paper to load the chunk for a revert block async
* optimize tempblock revert to load chunk async before updating state
* create local folder repo and update pom for local jar files, this is necessary to use the maven shade plugin. Put a comment in the pom for how to add new dependencies
* add specific timings for hot spots in the code: player move event, physics event, and bending manager. Should help server owners diagnose lag from PK
* optimize move event to ignore head movements without directional movement
* optimize physics event to check for air prior to checking for tempblocks
* optimize tempblock set/revert to not apply physics for blocks that dont emit light
* check for concrete powder in move earth
* optimize isWater to hit actual water blocks first
* optimize PhaseChange list check, hot spot due to being called in physics event
* add "large" abilities collision with each other
* remove HorizontalVelocityTracker that has lasted over 30 seconds, also don't create a tracker for non-living entities
* add config to ignore ores completely for EarthTunnel (good for mining)
* add config option for multiple blocks to be changed per earthtunnel run, allowing for much faster earth tunnels
* add config option to allow snow to be used for ice blast
* add config options for avatar state cooldowns for IceBlast and IceBullet
* add config option for ice trap type moves to not place blocks in players head or feet
* add PlaceholderAPI support for %projectkorra_slot<1-9>% %projectkorra_element% %projectkorra_elementcolor% %projectkorra_elements%
* add "bending" WorldGuard flag. Used for allowing or denying bending in worldguard regions. Will fallback to the old method of the build flag if the custom flag fails to register or isn't set
## Fixes
* wrong plugin version
* remove unnecessary code from avatar state causing cooldown removal
* fix error in EarthGrab remove
* fix error with TempArmor remove if some armor was null
* fix NPE and CME in WaterArms
* fix sound error in AirSuction
* fix NPE in player chat
* fix error when damaging item frame
* fix NPE in FireManipulation getting locations
* fix NPE in WaterSpout getting locations
* fix NPE in HeatControl
* prevent placing blocks in earth tunnel air, and fix error with placing blocks in tempblocks
* fix AirSweep affecting toggled invincible
* fix illumination torch replacing fences allowing players to pass through them
* fix AirShield vector
* fix AirSwipe not being removed
* fix AirSuction not checking worlds
* remove firestream tasks on JetBlast/JetBlaze removal
* division by 0 fix for tornado (entity location and origin location being equal)
* NaN vector fix for airstream (location and destination being equal)
* use actual list of undead for isUndead from the wiki
* fix BloodBending affecting armor stands
* fix AirSweep vector
* fix IceBullet combo to function better
* fix isMeltable to use ElementalAbility functions
* fix Paralyze trying to paralyze non-living entities
## Removals
* remove plotsquared support, and bentobox leftovers
* remove unnecessary flight handlers
2019-06-21 12:17:40 -07:00
Jay Evans
ea73c04788
ProjectKorra MC1.13
WIP 1.13
2019-02-05 14:40:38 +10:00
Simplicitee
a84a7fcced BentoBox removal, dependency update 2019-02-04 23:37:13 -05:00
Simplicitee
f476388ef1
Merge pull request #10 from PhanaticD/wip-1.13
even more fixes
2019-01-28 12:58:59 -05:00
PhanaticD
6e9f37ffc7 fix flight multiability showing crossed out 2019-01-28 11:57:53 -05:00
Simplicitee
c6528c039c
Merge pull request #9 from PhanaticD/wip-1.13
worldguard version id change
2019-01-27 17:06:47 -05:00
PhanaticD
360914223a worldguard version id change 2019-01-26 05:55:11 -05:00
Simplicitee
0bbad24c34
Merge pull request #8 from PhanaticD/wip-1.13
more fixes
2019-01-25 22:59:53 -05:00
PhanaticD
1757e7ad1a add same logic I did for chi move passive/stances to air passive and avatar state effects, everywhere else it looks like TempPotionEffect is used which is basically just a more complicated way of doing the same thing as this change 2019-01-24 11:14:34 -05:00
PhanaticD
375da96239 these checks are not needed any more 2019-01-24 03:11:28 -05:00
PhanaticD
038e8ab216 maybe fix https://pastebin.com/raw/UUd9Ay31 not tested as it is rare 2019-01-23 12:58:39 -05:00
PhanaticD
dfe5035485 make moving earth revert lavaflow to avoid messes 2019-01-22 04:15:27 -05:00
PhanaticD
65241039b1 allow lavaflow on moved earth if its back in its original position 2019-01-22 02:33:04 -05:00
PhanaticD
f293a96946 fix up chi passive and chi stance potion effects system 2019-01-22 01:34:06 -05:00
PhanaticD
bb6a561b19 actually track down and fully fix the issues with metalclips 2019-01-21 06:08:22 -05:00
PhanaticD
c06c3637fe another try at fixing CME in metalclips 2019-01-21 03:56:51 -05:00
PhanaticD
a1866b7c1c fix IllegalStateException in movementhandler shutdown 2019-01-21 03:36:08 -05:00
PhanaticD
6e615c75eb some more protection checks for earthsmash 2019-01-20 06:40:35 -05:00
PhanaticD
1c15f9209e add dynamic cooldown feature for airshield, off by default 2019-01-20 05:30:52 -05:00
PhanaticD
e4df313132 fix cooldown for fireshield not applying 2019-01-20 04:14:54 -05:00
PhanaticD
fa8b051121 fix waterbubble dupe 2019-01-20 01:20:17 -05:00
PhanaticD
d6c9717d25 fix up metalclips 2019-01-20 01:04:25 -05:00
PhanaticD
ac2c8b8be3 add reflection tostrings for ability and bplayer, and print out if there is a error during progress. Will look like this: https://gyazo.com/c9191195b9e8ace960fc15cb451870ed 2019-01-19 22:39:48 -05:00
PhanaticD
c6021dd970 run the remove of the ability after the revert, since earth armor will run revert as part of its remove if this revert hasnt completed 2019-01-19 04:16:25 -05:00
Simplicitee
9fb35ecc60
Merge pull request #7 from PhanaticD/wip-1.13
some more fixes
2019-01-18 23:46:45 -05:00