mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-12 03:59:06 +00:00
Merge remote-tracking branch 'refs/remotes/ProjectKorra/master'
This commit is contained in:
commit
0b2d05ff9e
2 changed files with 4 additions and 3 deletions
|
@ -622,9 +622,9 @@ public class PKListener implements Listener {
|
|||
double damage = ((e.getDistanceTraveled() - minimumDistance) < 0 ? 0 : e.getDistanceTraveled() - minimumDistance) / (e.getDifference().length());
|
||||
if (damage > 0) {
|
||||
if(damage <= maxDamage) {
|
||||
GeneralMethods.damageEntity(e.getInstigator(), e.getEntity(), damage, null);
|
||||
GeneralMethods.damageEntity(e.getInstigator(), e.getEntity(), damage, e.getAbility().toString());
|
||||
} else {
|
||||
GeneralMethods.damageEntity(e.getInstigator(), e.getEntity(), maxDamage, null);
|
||||
GeneralMethods.damageEntity(e.getInstigator(), e.getEntity(), maxDamage, e.getAbility().toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import com.projectkorra.projectkorra.earthbending.EarthMethods;
|
|||
import com.projectkorra.projectkorra.event.HorizontalVelocityChangeEvent;
|
||||
import com.projectkorra.projectkorra.waterbending.WaterMethods;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
@ -76,8 +77,8 @@ public class HorizontalVelocityTracker {
|
|||
for (Block b : blocks) {
|
||||
if (GeneralMethods.isSolid(b) && (entity.getLocation().getBlock().getRelative(BlockFace.EAST, 1).equals(b) || entity.getLocation().getBlock().getRelative(BlockFace.NORTH, 1).equals(b) || entity.getLocation().getBlock().getRelative(BlockFace.WEST, 1).equals(b) || entity.getLocation().getBlock().getRelative(BlockFace.SOUTH, 1).equals(b))) {
|
||||
if (!EarthMethods.isTransparentToEarthbending(instigator, b)) {
|
||||
ProjectKorra.plugin.getServer().getPluginManager().callEvent(new HorizontalVelocityChangeEvent(entity, instigator, lastVelocity, thisVelocity, diff, launchLocation, impactLocation, abil));
|
||||
hasBeenDamaged = true;
|
||||
ProjectKorra.plugin.getServer().getPluginManager().callEvent(new HorizontalVelocityChangeEvent(entity, instigator, lastVelocity, thisVelocity, diff, launchLocation, impactLocation, abil));
|
||||
remove();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue