Adds config option to Bending Preview (#526)

* Fixes NPE with surge wave & bottles

* Fixed bracket :S

For some reason it PR'd my bracket and code separate? Weird.

* Changed dayfactor placement so that it's correct with avatar state factor

* Added config option for Bending Preview
This commit is contained in:
Loony 2016-07-29 19:21:55 +01:00 committed by OmniCypher
parent 3c2f26a962
commit 693f3f61eb
2 changed files with 3 additions and 0 deletions

View file

@ -563,6 +563,7 @@ public class GeneralMethods {
String displayedMessage = null;
BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
if (ConfigManager.defaultConfig.get().getBoolean("Properties.BendingPreview") == true) {
if (ability != null) {
if (bPlayer.isOnCooldown(ability)) {
displayedMessage = ability.getElement().getColor() + "" + ChatColor.STRIKETHROUGH + ability.getName();
@ -575,6 +576,7 @@ public class GeneralMethods {
ActionBar.sendActionBar(displayedMessage, player);
}
}
public static List<Block> getBlocksAlongLine(Location ploc, Location tloc, World w) {
List<Block> blocks = new ArrayList<Block>();

View file

@ -397,6 +397,7 @@ public class ConfigManager {
ArrayList<String> snowBlocks = new ArrayList<>();
snowBlocks.add("SNOW");
config.addDefault("Properties.BendingPreview", true);
config.addDefault("Properties.ImportEnabled", true);
config.addDefault("Properties.BendingAffectFallingSand.Normal", true);
config.addDefault("Properties.BendingAffectFallingSand.NormalStrengthMultiplier", 1.0);