mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 11:40:40 +00:00
Revert "Revert "Try to fix FreezeMelt NPE""
This reverts commit 287006936a
.
This commit is contained in:
parent
287006936a
commit
676a794ba1
2 changed files with 4 additions and 1 deletions
Binary file not shown.
|
@ -91,7 +91,10 @@ 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 (Methods.getBoundAbility(player) != null && Methods.getBoundAbility(player).equalsIgnoreCase("OctopusForm")) {
|
if (Methods.getBoundAbility(player) == null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (Methods.getBoundAbility(player).equalsIgnoreCase("OctopusForm")) {
|
||||||
if (block.getLocation().distance(player.getLocation()) <= OctopusForm.radius + 2)
|
if (block.getLocation().distance(player.getLocation()) <= OctopusForm.radius + 2)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue