mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-22 07:55:05 +00:00
Fixed memory issues with PhaseChange and Torrent. (#727)
Thanks to PhanaticD for reporting these issues.
This commit is contained in:
parent
29a6cb8d05
commit
34be68bb40
2 changed files with 3 additions and 2 deletions
|
@ -582,7 +582,8 @@ public class Torrent extends WaterAbility {
|
|||
Player player = FROZEN_BLOCKS.get(block);
|
||||
BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
|
||||
if (bPlayer == null) {
|
||||
return;
|
||||
FROZEN_BLOCKS.remove(block);
|
||||
continue;
|
||||
} else if (block.getBlock().getType() != Material.ICE) {
|
||||
FROZEN_BLOCKS.remove(block);
|
||||
continue;
|
||||
|
|
|
@ -431,10 +431,10 @@ public class PhaseChange extends IceAbility {
|
|||
public void revertFrozenBlocks() {
|
||||
if (active_types.contains(PhaseChangeType.FREEZE)) {
|
||||
for (TempBlock tb : blocks) {
|
||||
PLAYER_BY_BLOCK.remove(tb);
|
||||
tb.revertBlock();
|
||||
}
|
||||
blocks.clear();
|
||||
PLAYER_BY_BLOCK.remove(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue