mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 19:50:37 +00:00
Fix NPE with Disabled Stock Abilities
This commit is contained in:
parent
2932bd32e0
commit
15b542fb98
3 changed files with 8 additions and 1 deletions
|
@ -19,7 +19,7 @@ public class AbilityModuleManager {
|
|||
private final AbilityLoader<AbilityModule> loader;
|
||||
|
||||
public static HashSet<String> abilities;
|
||||
public static HashSet<String> disabledStockAbilities;
|
||||
public static HashSet<String> disabledStockAbilities;
|
||||
public static List<String> waterbendingabilities;
|
||||
public static List<String> airbendingabilities;
|
||||
public static List<String> earthbendingabilities;
|
||||
|
@ -55,6 +55,7 @@ public class AbilityModuleManager {
|
|||
igniteabilities = new HashSet<String>();
|
||||
metalbendingabilities = new HashSet<String>();
|
||||
ability = loader.load(AbilityModule.class);
|
||||
disabledStockAbilities = new HashSet<String>();
|
||||
fill();
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.bukkit.ChatColor;
|
|||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.World.Environment;
|
||||
import org.bukkit.block.Block;
|
||||
|
@ -2012,5 +2013,9 @@ public class Methods {
|
|||
}
|
||||
return cap;
|
||||
}
|
||||
|
||||
public static void playFirebendingSound(Location location) {
|
||||
location.getWorld().playSound(location, Sound.FIRE, 10, 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -159,6 +159,7 @@ public class Combustion {
|
|||
private void advanceLocation() {
|
||||
ParticleEffect.FIREWORKS_SPARK.display(location, (float) Math.random(), (float) Math.random(), (float) Math.random(), 0, 5);
|
||||
ParticleEffect.FLAME.display(location, (float) Math.random(), (float) Math.random(), (float) Math.random(), 0, 2);
|
||||
Methods.playFirebendingSound(location);
|
||||
location = location.add(direction.clone().multiply(speedfactor));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue