mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
Fix ChiCombo NPE and FallDamage
This commit is contained in:
parent
4f4335e498
commit
3d2676a999
1 changed files with 4 additions and 1 deletions
|
@ -55,7 +55,9 @@ public class ChiCombo extends ChiAbility implements ComboAbility {
|
|||
* @param duration The time in milliseconds the target will be paralyzed
|
||||
*/
|
||||
private static void paralyze(Entity target, Long duration) {
|
||||
PARALYZED_ENTITIES.put(target, (System.currentTimeMillis() + duration));
|
||||
if (target != null) {
|
||||
PARALYZED_ENTITIES.put(target, (System.currentTimeMillis() + duration));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -86,6 +88,7 @@ public class ChiCombo extends ChiAbility implements ComboAbility {
|
|||
*/
|
||||
public static void handleParalysis() {
|
||||
for (Entity entity : PARALYZED_ENTITIES.keySet()) {
|
||||
entity.setFallDistance(0);
|
||||
if (PARALYZED_ENTITIES.get(entity) <= System.currentTimeMillis()) {
|
||||
PARALYZED_ENTITIES.remove(entity);
|
||||
|
||||
|
|
Loading…
Reference in a new issue