mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-12 03:59:06 +00:00
commit
5f47ff465b
4 changed files with 22 additions and 4 deletions
|
@ -110,6 +110,9 @@ public class FreezeMelt {
|
||||||
public static boolean canThaw(Block block) {
|
public static boolean canThaw(Block block) {
|
||||||
if (frozenblocks.containsKey(block)) {
|
if (frozenblocks.containsKey(block)) {
|
||||||
for (Player player : block.getWorld().getPlayers()) {
|
for (Player player : block.getWorld().getPlayers()) {
|
||||||
|
if (!player.isOnline()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (GeneralMethods.getBoundAbility(player) == null) {
|
if (GeneralMethods.getBoundAbility(player) == null) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,9 +155,11 @@ public class IceBlast {
|
||||||
source.revertBlock();
|
source.revertBlock();
|
||||||
progressing = false;
|
progressing = false;
|
||||||
}
|
}
|
||||||
BendingPlayer bPlayer = GeneralMethods.getBendingPlayer(player.getName());
|
if (player.isOnline()) {
|
||||||
if (bPlayer != null) {
|
BendingPlayer bPlayer = GeneralMethods.getBendingPlayer(player.getName());
|
||||||
bPlayer.addCooldown("IceBlast", cooldown);
|
if (bPlayer != null) {
|
||||||
|
bPlayer.addCooldown("IceBlast", cooldown);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
instances.remove(id);
|
instances.remove(id);
|
||||||
}
|
}
|
||||||
|
@ -228,8 +230,12 @@ public class IceBlast {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void progress() {
|
private void progress() {
|
||||||
|
if (player.isDead() || !player.isOnline()) {
|
||||||
|
cancel();
|
||||||
|
return;
|
||||||
|
}
|
||||||
BendingPlayer bPlayer = GeneralMethods.getBendingPlayer(player.getName());
|
BendingPlayer bPlayer = GeneralMethods.getBendingPlayer(player.getName());
|
||||||
if (player.isDead() || !player.isOnline() || !GeneralMethods.canBend(player.getName(), "IceBlast") || bPlayer.isOnCooldown("IceBlast")) {
|
if (!GeneralMethods.canBend(player.getName(), "IceBlast") || bPlayer.isOnCooldown("IceBlast")) {
|
||||||
cancel();
|
cancel();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,6 +159,11 @@ public class OctopusForm {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void progress() {
|
private void progress() {
|
||||||
|
if (player.isDead() || !player.isOnline()) {
|
||||||
|
remove();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!GeneralMethods.canBend(player.getName(), "OctopusForm")) {
|
if (!GeneralMethods.canBend(player.getName(), "OctopusForm")) {
|
||||||
remove();
|
remove();
|
||||||
returnWater();
|
returnWater();
|
||||||
|
|
|
@ -563,6 +563,10 @@ public class Torrent {
|
||||||
frozenblocks.remove(block);
|
frozenblocks.remove(block);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (!player.isOnline()) {
|
||||||
|
thaw(block);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (block.getBlock().getWorld() != player.getWorld()) {
|
if (block.getBlock().getWorld() != player.getWorld()) {
|
||||||
thaw(block);
|
thaw(block);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue