mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-09-11 12:49:32 +00:00
Merge remote-tracking branch 'refs/remotes/ProjectKorra/master'
This commit is contained in:
commit
a8b6f1ea7f
Binary file not shown.
|
@ -130,8 +130,16 @@ public class Suffocate implements ConfigLoadable {
|
|||
targets.add((LivingEntity) ent);
|
||||
} else {
|
||||
//Entity ent = GeneralMethods.getTargetedEntity(player, range, new ArrayList<Entity>());
|
||||
Location location = GeneralMethods.getTargetedLocation(player, 6, transparent);
|
||||
List<Entity> entities = GeneralMethods.getEntitiesAroundPoint(location, 1.5);
|
||||
List<Entity> entities = new ArrayList<Entity>();
|
||||
for (int i = 0; i < 6; i++) {
|
||||
Location location = GeneralMethods.getTargetedLocation(player, i, transparent);
|
||||
entities = GeneralMethods.getEntitiesAroundPoint(location, 1.7);
|
||||
if (entities.contains(player))
|
||||
entities.remove(player);
|
||||
if (entities != null && !entities.isEmpty() && !entities.contains(player)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (entities == null || entities.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -100,6 +100,9 @@ public class ChiCombo {
|
|||
remove.add(instances.indexOf(c));
|
||||
}
|
||||
for (int i : remove) {
|
||||
if (i >= instances.size()) {
|
||||
continue;
|
||||
}
|
||||
instances.remove(i);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ public class HelpCommand extends PKCommand {
|
|||
else if (args.size() == 0) {
|
||||
List<String> strings = new ArrayList<String>();
|
||||
for (PKCommand command : instances.values()) {
|
||||
if (!command.getName().equalsIgnoreCase("help")) {
|
||||
if (!command.getName().equalsIgnoreCase("help") && sender.hasPermission("bending.command." + command.getName())) {
|
||||
strings.add(command.getProperUse());
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ public class HelpCommand extends PKCommand {
|
|||
if (isNumeric(arg)) {
|
||||
List<String> strings = new ArrayList<String>();
|
||||
for (PKCommand command : instances.values()) {
|
||||
if (!command.getName().equalsIgnoreCase("help")) {
|
||||
if (!command.getName().equalsIgnoreCase("help") && sender.hasPermission("bending.command." + command.getName())) {
|
||||
strings.add(command.getProperUse());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ public class RemoveCommand extends PKCommand {
|
|||
return;
|
||||
}
|
||||
sender.sendMessage(GeneralMethods.getElementColor(e) + "You have removed your " + e.toString().toLowerCase() + "bending.");
|
||||
Bukkit.getServer().getPluginManager().callEvent(new PlayerChangeElementEvent(sender, (Player) sender, e, Result.REMOVE));
|
||||
return;
|
||||
} else {
|
||||
sender.sendMessage(ChatColor.RED + "You do not have that element!");
|
||||
|
|
|
@ -697,8 +697,8 @@ public class EarthMethods {
|
|||
if (sourceblock.getType() == Material.AIR || sourceblock.isLiquid()) {
|
||||
info.getState().update(true);
|
||||
} else {
|
||||
GeneralMethods.dropItems(block,
|
||||
GeneralMethods.getDrops(block, info.getState().getType(), info.getState().getRawData(), pickaxe));
|
||||
// GeneralMethods.dropItems(block,
|
||||
// GeneralMethods.getDrops(block, info.getState().getType(), info.getState().getRawData(), pickaxe));
|
||||
}
|
||||
|
||||
if (GeneralMethods.isAdjacentToThreeOrMoreSources(block)) {
|
||||
|
|
|
@ -503,6 +503,9 @@ public class EarthSmash {
|
|||
for (EarthSmash smash : instances) {
|
||||
if (reqState == null || smash.state == reqState)
|
||||
for (Block block : blocks) {
|
||||
if (block == null || smash.loc == null) {
|
||||
continue;
|
||||
}
|
||||
if (block.getLocation().getWorld() == smash.loc.getWorld() && block.getLocation().distanceSquared(smash.loc) <= Math.pow(2.5, 2))
|
||||
return smash;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,10 @@ import com.projectkorra.projectkorra.GeneralMethods;
|
|||
import com.projectkorra.projectkorra.ability.AvatarState;
|
||||
import com.projectkorra.projectkorra.airbending.AirMethods;
|
||||
import com.projectkorra.projectkorra.configuration.ConfigLoadable;
|
||||
import com.projectkorra.projectkorra.earthbending.EarthMethods;
|
||||
import com.projectkorra.projectkorra.util.ParticleEffect;
|
||||
import com.projectkorra.projectkorra.util.TempBlock;
|
||||
import com.projectkorra.projectkorra.waterbending.WaterMethods;
|
||||
|
||||
public class WallOfFire implements ConfigLoadable {
|
||||
|
||||
|
@ -97,13 +100,18 @@ public class WallOfFire implements ConfigLoadable {
|
|||
}
|
||||
|
||||
private void affect(Entity entity) {
|
||||
entity.setFireTicks((int) (FIRETICKS * 20));
|
||||
GeneralMethods.setVelocity(entity, new Vector(0, 0, 0));
|
||||
if (entity instanceof LivingEntity) {
|
||||
LivingEntity e = (LivingEntity) entity;
|
||||
Block block = e.getEyeLocation().getBlock();
|
||||
if (TempBlock.isTempBlock(block) && WaterMethods.isIcebendable(block)) {
|
||||
return;
|
||||
}
|
||||
GeneralMethods.damageEntity(player, entity, damage, "WallOfFire");
|
||||
new Enflamed(entity, player);
|
||||
AirMethods.breakBreathbendingHold(entity);
|
||||
}
|
||||
entity.setFireTicks((int) (FIRETICKS * 20));
|
||||
GeneralMethods.setVelocity(entity, new Vector(0, 0, 0));
|
||||
}
|
||||
|
||||
private void damage() {
|
||||
|
@ -128,6 +136,9 @@ public class WallOfFire implements ConfigLoadable {
|
|||
|
||||
private void display() {
|
||||
for (Block block : blocks) {
|
||||
if (!EarthMethods.isTransparentToEarthbending(player, block)) {
|
||||
continue;
|
||||
}
|
||||
ParticleEffect.FLAME.display(block.getLocation(), 0.6F, 0.6F, 0.6F, 0, 3);
|
||||
ParticleEffect.SMOKE.display(block.getLocation(), 0.6F, 0.6F, 0.6F, 0, 1);
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ public class Preset {
|
|||
HashMap<Integer, String> abilities = (HashMap<Integer, String>) preset.abilities.clone();
|
||||
boolean boundAll = true;
|
||||
for (int i = 1; i <= 9; i++) {
|
||||
if (!GeneralMethods.canBend(player.getName(), abilities.get(i))) {
|
||||
if (!GeneralMethods.canBind(player.getName(), abilities.get(i))) {
|
||||
abilities.remove(i);
|
||||
boundAll = false;
|
||||
}
|
||||
|
|
|
@ -89,8 +89,16 @@ public class Bloodbending {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
Location location = GeneralMethods.getTargetedLocation(player, 6, transparent);
|
||||
List<Entity> entities = GeneralMethods.getEntitiesAroundPoint(location, 1.5);
|
||||
List<Entity> entities = new ArrayList<Entity>();
|
||||
for (int i = 0; i < 6; i++) {
|
||||
Location location = GeneralMethods.getTargetedLocation(player, i, transparent);
|
||||
entities = GeneralMethods.getEntitiesAroundPoint(location, 1.7);
|
||||
if (entities.contains(player))
|
||||
entities.remove(player);
|
||||
if (entities != null && !entities.isEmpty() && !entities.contains(player)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (entities == null || entities.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public class HealingWaters {
|
|||
Entity entity = GeneralMethods.getTargetedEntity(player, range, new ArrayList<Entity>());
|
||||
if (entity instanceof LivingEntity && inWater(entity) && player.isSneaking()) {
|
||||
giveHPToEntity((LivingEntity) entity);
|
||||
} else if ((player.isSneaking() && shift) || (player.isSneaking() && shift)){
|
||||
} else if ((player.isSneaking() && shift) || !shift){
|
||||
giveHP(player);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue