mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-08-17 08:57:40 +00:00
Fix ChiCombo NPE and FallDamage
This commit is contained in:
parent
4f4335e498
commit
3d2676a999
|
@ -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