mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
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
This commit is contained in:
parent
9fb35ecc60
commit
c6021dd970
1 changed files with 7 additions and 14 deletions
|
@ -1,19 +1,12 @@
|
|||
package com.projectkorra.projectkorra.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.PriorityQueue;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import com.projectkorra.projectkorra.ability.CoreAbility;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.projectkorra.projectkorra.ability.CoreAbility;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class TempArmor {
|
||||
|
||||
|
@ -208,10 +201,6 @@ public class TempArmor {
|
|||
* TempArmor instance was started, if the display queue is empty.
|
||||
*/
|
||||
public void revert() {
|
||||
if (this.removeAbilOnForceRevert && this.ability != null && !this.ability.isRemoved()) {
|
||||
this.ability.remove();
|
||||
}
|
||||
|
||||
final PriorityQueue<TempArmor> queue = INSTANCES.get(this.entity);
|
||||
|
||||
if (queue.contains(this)) {
|
||||
|
@ -231,6 +220,10 @@ public class TempArmor {
|
|||
INSTANCES.remove(this.entity);
|
||||
ORIGINAL.remove(this.entity);
|
||||
}
|
||||
|
||||
if (this.removeAbilOnForceRevert && this.ability != null && !this.ability.isRemoved()) {
|
||||
this.ability.remove();
|
||||
}
|
||||
}
|
||||
|
||||
public static void cleanup() {
|
||||
|
|
Loading…
Reference in a new issue