mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-12-22 16:05:01 +00:00
Fixed Disabled Abilities Loading
• Fixes disabled abilities still being able to be bound (some) and used • Fixes Torrent flood issue with bottlebending • Fixed Combos not being able to be disabled
This commit is contained in:
parent
6419ba6201
commit
4cad1dd5c3
6 changed files with 6 additions and 6 deletions
|
@ -248,7 +248,7 @@ public class BendingPlayer {
|
|||
}
|
||||
|
||||
public boolean canBind(CoreAbility ability) {
|
||||
if (ability == null || !player.isOnline()) {
|
||||
if (ability == null || !player.isOnline() || !ability.isEnabled()) {
|
||||
return false;
|
||||
} else if (!player.hasPermission("bending.ability." + ability.getName())) {
|
||||
return false;
|
||||
|
|
|
@ -384,7 +384,7 @@ public class GeneralMethods {
|
|||
for (int i = 1; i <= 9; i++) {
|
||||
String slot = rs2.getString("slot" + i);
|
||||
|
||||
if (slot != null && !slot.equalsIgnoreCase("null")) {
|
||||
if (slot != null && !slot.equalsIgnoreCase("null") && CoreAbility.getAbility(slot) != null && CoreAbility.getAbility(slot).isEnabled()) {
|
||||
abilities.put(i, slot);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -517,7 +517,7 @@ public abstract class CoreAbility implements Ability {
|
|||
|
||||
String tag = null;
|
||||
if (this instanceof ComboAbility) {
|
||||
tag = "Abilities." + elementName + "." + elementName + "Combo" + ".Enabled";
|
||||
tag = "Abilities." + elementName + "." + elementName + "Combo." + getName() + ".Enabled";
|
||||
} else {
|
||||
tag = "Abilities." + elementName + "." + getName() + ".Enabled";
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ public class BindCommand extends PKCommand {
|
|||
}
|
||||
|
||||
CoreAbility coreAbil = CoreAbility.getAbility(args.get(0));
|
||||
if (coreAbil == null || coreAbil.isHiddenAbility()) {
|
||||
if (coreAbil == null || coreAbil.isHiddenAbility() || !coreAbil.isEnabled()) {
|
||||
sender.sendMessage(ChatColor.RED + abilityDoesntExist);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ public class FireBlast extends FireAbility {
|
|||
private boolean powerFurnace;
|
||||
private boolean showParticles;
|
||||
private boolean dissipate;
|
||||
private boolean isFireBurst;
|
||||
private boolean isFireBurst = false;
|
||||
private int ticks;
|
||||
private long cooldown;
|
||||
private double speedFactor;
|
||||
|
|
|
@ -473,7 +473,7 @@ public class Torrent extends WaterAbility {
|
|||
Block block = eyeLoc.add(eyeLoc.getDirection().normalize()).getBlock();
|
||||
if (isTransparent(player, block) && isTransparent(player, eyeLoc.getBlock())) {
|
||||
block.setType(Material.WATER);
|
||||
block.setData((byte) 0);
|
||||
block.setData((byte) 8);
|
||||
Torrent tor = new Torrent(player);
|
||||
|
||||
if (tor.sourceSelected || tor.settingUp) {
|
||||
|
|
Loading…
Reference in a new issue