-Fixed EarthTunnel dropping blocks
-Fixed EarthTunnel not breaking blocks from certain moves
-Fixed EarthTunnel on RaiseEarth leaving blocks behind
-Metal Clips throw option is now enabled by default 
-Trying to bend a subelement says "You are not a {subelement}" instead of "you don't have access to {subelement}"
-WaterSpout can now be activated above water
-Added check to see if player can bend Packed Ice when they move onto it
from another block
-IceArms can form under water
-Aliases now works for /bending choose {element} {player}
This commit is contained in:
Matt 2016-08-20 14:37:46 -04:00 committed by OmniCypher
parent cec9df3ca7
commit 1ede291efd
5 changed files with 25 additions and 8 deletions

View file

@ -78,7 +78,7 @@ public class BindCommand extends PKCommand {
} else if (coreAbil == null || !bPlayer.canBind(coreAbil)) {
if (coreAbil != null && coreAbil.getElement() != Element.AVATAR && !bPlayer.hasElement(coreAbil.getElement())) {
if (coreAbil.getElement() instanceof SubElement) {
sender.sendMessage(ChatColor.RED + this.noSubElement.replace("{subelement}", coreAbil.getElement().getName() + coreAbil.getElement().getType().getBending()));
sender.sendMessage(ChatColor.RED + this.noSubElement.replace("{subelement}", coreAbil.getElement().getName() + coreAbil.getElement().getType().getBender()));
} else {
sender.sendMessage(ChatColor.RED + this.noElement.replace("{element}", coreAbil.getElement().getName() + coreAbil.getElement().getType().getBender()));
}

View file

@ -71,12 +71,12 @@ public class ChooseCommand extends PKCommand {
else if (element.equalsIgnoreCase("f")) element = "fire";
else if (element.equalsIgnoreCase("w")) element = "water";
else if (element.equalsIgnoreCase("c")) element = "chi";
Element target = Element.getElement(element);
if (Arrays.asList(Element.getAllElements()).contains(target)) {
Element targetElement = Element.getElement(element);
if (Arrays.asList(Element.getAllElements()).contains(targetElement)) {
if (!hasPermission(sender, element)) {
return;
}
add(sender, (Player) sender, target);
add(sender, (Player) sender, targetElement);
return;
} else {
sender.sendMessage(ChatColor.RED + invalidElement);
@ -93,6 +93,11 @@ public class ChooseCommand extends PKCommand {
return;
}
String element = args.get(0).toLowerCase();
if (element.equalsIgnoreCase("a")) element = "air";
else if (element.equalsIgnoreCase("e")) element = "earth";
else if (element.equalsIgnoreCase("f")) element = "fire";
else if (element.equalsIgnoreCase("w")) element = "water";
else if (element.equalsIgnoreCase("c")) element = "chi";
Element targetElement = Element.getElement(element);
if (Arrays.asList(Element.getAllElements()).contains(targetElement)) {
add(sender, target, targetElement);

View file

@ -199,7 +199,7 @@ public class ConfigManager {
config.addDefault("Commands.Bind.ElementToggledOff", "You have that ability's element toggled off currently.");
config.addDefault("Commands.Bind.SuccessfullyBound", "Succesfully bound {ability} to slot {slot}.");
config.addDefault("Commands.Bind.NoElement", "You are not a {element}!");
config.addDefault("Commands.Bind.NoSubElement", "You don't have access to {subelement}!");
config.addDefault("Commands.Bind.NoSubElement", "You are not a {subelement}!");
config.addDefault("Commands.Add.Description", "This command will allow the user to add an element to the targeted <Player>, or themselves if the target is not specified. This command is typically reserved for server administrators.");
config.addDefault("Commands.Add.SuccessfullyAddedCFW", "You are now also a {element}.");
@ -914,7 +914,7 @@ public class ConfigManager {
config.addDefault("Abilities.Earth.MetalClips.CrushCooldown", 2000);
config.addDefault("Abilities.Earth.MetalClips.ShootCooldown", 1500);
config.addDefault("Abilities.Earth.MetalClips.Duration", 10000);
config.addDefault("Abilities.Earth.MetalClips.ThrowEnabled", false);
config.addDefault("Abilities.Earth.MetalClips.ThrowEnabled", true);
config.addDefault("Abilities.Earth.RaiseEarth.Enabled", true);
config.addDefault("Abilities.Earth.RaiseEarth.Speed", 10);

View file

@ -209,7 +209,9 @@ public class WaterArmsSpear extends WaterAbility {
getIceBlocks().remove(block);
}
new TempBlock(block, Material.ICE, (byte) 0);
TempBlock tempBlock = new TempBlock(block, Material.AIR, (byte) 0);
tempBlock.setType(Material.ICE);
getIceBlocks().put(block, System.currentTimeMillis() + spearDuration + (long) (Math.random() * 500));
}
}

View file

@ -51,14 +51,16 @@ public class WaterSpout extends WaterAbility {
this.useBlockSpiral = getConfig().getBoolean("Abilities.Water.WaterSpout.BlockSpiral");
this.height = getConfig().getDouble("Abilities.Water.WaterSpout.Height");
this.interval = getConfig().getLong("Abilities.Water.WaterSpout.Interval");
hadFly = player.isFlying();
canFly = player.getAllowFlight();
maxHeight = getNightFactor(height);
WaterSpoutWave spoutWave = new WaterSpoutWave(player, WaterSpoutWave.AbilityType.CLICK);
if (spoutWave.isStarted() && !spoutWave.isRemoved()) {
return;
}
Block topBlock = GeneralMethods.getTopBlock(player.getLocation(), 0, -50);
Block topBlock = GeneralMethods.getTopBlock(player.getLocation(), (int)-getNightFactor(height), (int)-getNightFactor(height));
if (topBlock == null) {
topBlock = player.getLocation().getBlock();
}
@ -255,6 +257,13 @@ public class WaterSpout extends WaterAbility {
}
if (isIcebendable(blocki) || isSnow(blocki)) {
if (isIcebendable(blocki)) {
if (blocki.getType() == Material.PACKED_ICE && !canBendOnPackedIce) {
remove();
return -1;
}
}
if (!TempBlock.isTempBlock(blocki)) {
revertBaseBlock();
baseBlock = new TempBlock(blocki, Material.STATIONARY_WATER, (byte) 8);
@ -266,6 +275,7 @@ public class WaterSpout extends WaterAbility {
}
return i;
}
if ((blocki.getType() != Material.AIR && (!isPlant(blocki) || !bPlayer.canPlantbend()))) {
revertBaseBlock();
return -1;