mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-18 22:24:35 +00:00
Air/WaterBubble will only work if player is
sneaking.
This commit is contained in:
parent
765daf6ddc
commit
acf4b83c79
1 changed files with 6 additions and 1 deletions
|
@ -104,6 +104,11 @@ public class AirBubble {
|
||||||
removeBubble();
|
removeBubble();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!player.isSneaking()) {
|
||||||
|
removeBubble();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (Methods.getBoundAbility(player) != null) {
|
if (Methods.getBoundAbility(player) != null) {
|
||||||
if (Methods.getBoundAbility(player).equalsIgnoreCase("AirBubble") && Methods.canBend(player.getName(), "AirBubble")) {
|
if (Methods.getBoundAbility(player).equalsIgnoreCase("AirBubble") && Methods.canBend(player.getName(), "AirBubble")) {
|
||||||
pushWater();
|
pushWater();
|
||||||
|
@ -131,7 +136,7 @@ public class AirBubble {
|
||||||
for (Player player : server.getOnlinePlayers()) {
|
for (Player player : server.getOnlinePlayers()) {
|
||||||
if (Methods.getBoundAbility(player) != null) {
|
if (Methods.getBoundAbility(player) != null) {
|
||||||
if (Methods.getBoundAbility(player).equalsIgnoreCase("AirBubble") || Methods.getBoundAbility(player).equalsIgnoreCase("WaterBubble")) {
|
if (Methods.getBoundAbility(player).equalsIgnoreCase("AirBubble") || Methods.getBoundAbility(player).equalsIgnoreCase("WaterBubble")) {
|
||||||
if (!instances.containsKey(player.getEntityId())) {
|
if (!instances.containsKey(player.getEntityId()) && player.isSneaking()) {
|
||||||
new AirBubble(player);
|
new AirBubble(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue