mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-11-20 09:59:33 +00:00
Hot fix (#698)
This commit is contained in:
parent
1c282ca550
commit
7e4ef6d5a2
4 changed files with 14 additions and 4 deletions
|
@ -247,12 +247,21 @@ public class BendingPlayer {
|
|||
return false;
|
||||
} else if (!player.hasPermission("bending." + element.getName() + ".passive")) {
|
||||
return false;
|
||||
} else if (!isToggled() || !hasElement(element) || !isElementToggled(element)) {
|
||||
} else if (!hasElement(element)) {
|
||||
return false;
|
||||
} else if (isChiBlocked() || isParalyzed() || isBloodbent()) {
|
||||
return false;
|
||||
} else if (disabledWorlds != null && disabledWorlds.contains(player.getWorld().getName())) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean canUsePassive(Element element) {
|
||||
if (!isToggled() || !isElementToggled(element)) {
|
||||
return false;
|
||||
} else if (isChiBlocked() || isParalyzed() || isBloodbent()) {
|
||||
return false;
|
||||
} else if (GeneralMethods.isRegionProtectedFromBuild(player, player.getLocation())) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1030,7 +1030,7 @@ public class PKListener implements Listener {
|
|||
|
||||
Bukkit.getScheduler().runTaskLater(ProjectKorra.plugin, new Runnable() {
|
||||
public void run() {
|
||||
player.sendMessage(ChatColor.GREEN + "This server is running ProjectKorra version " + ProjectKorra.plugin.getDescription().getVersion() + " for bending! Find out more at http://www.projectkorra.com!");
|
||||
player.sendMessage(ChatColor.GOLD + "This server is running ProjectKorra version " + ProjectKorra.plugin.getDescription().getVersion() + " for bending! Find out more at http://www.projectkorra.com!");
|
||||
}
|
||||
}, 20 * 5);
|
||||
}
|
||||
|
|
|
@ -214,9 +214,11 @@ public abstract class CoreAbility implements Ability {
|
|||
if (bPlayer == null || !abil.getPlayer().isOnline()) {
|
||||
abil.remove();
|
||||
return;
|
||||
} else if (!bPlayer.canBendPassive(abil.getElement())) {
|
||||
} else if (!bPlayer.canBendPassive(abil.getElement())) { // Check for if the passive should be removed
|
||||
abil.remove();
|
||||
return;
|
||||
} else if (!bPlayer.canUsePassive(abil.getElement())) { // Check for if the passive should be prevented from happening, but not remove it
|
||||
return;
|
||||
}
|
||||
}
|
||||
abil.progress();
|
||||
|
|
|
@ -6,7 +6,6 @@ import java.util.HashSet;
|
|||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
|
|
Loading…
Reference in a new issue