mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-23 00:15:05 +00:00
Fix NPEs
This commit is contained in:
parent
cf9b781de1
commit
996e470089
2 changed files with 12 additions and 7 deletions
|
@ -240,6 +240,9 @@ public class IceSpikeBlast extends IceAbility {
|
||||||
destination = target.getEyeLocation();
|
destination = target.getEyeLocation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sourceBlock == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
location = sourceBlock.getLocation();
|
location = sourceBlock.getLocation();
|
||||||
if (destination.distanceSquared(location) < 1) {
|
if (destination.distanceSquared(location) < 1) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -341,6 +341,7 @@ public class SurgeWall extends WaterAbility {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void finalRemoveWater(Block block) {
|
private static void finalRemoveWater(Block block) {
|
||||||
|
if (block != null) {
|
||||||
if (AFFECTED_BLOCKS.containsKey(block)) {
|
if (AFFECTED_BLOCKS.containsKey(block)) {
|
||||||
TempBlock.revertBlock(block, Material.AIR);
|
TempBlock.revertBlock(block, Material.AIR);
|
||||||
AFFECTED_BLOCKS.remove(block);
|
AFFECTED_BLOCKS.remove(block);
|
||||||
|
@ -350,6 +351,7 @@ public class SurgeWall extends WaterAbility {
|
||||||
WALL_BLOCKS.remove(block);
|
WALL_BLOCKS.remove(block);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void addWater(Block block) {
|
private void addWater(Block block) {
|
||||||
if (GeneralMethods.isRegionProtectedFromBuild(this, block.getLocation())) {
|
if (GeneralMethods.isRegionProtectedFromBuild(this, block.getLocation())) {
|
||||||
|
|
Loading…
Reference in a new issue