Better party chat logging in console, some style changes to admin/party chat as well

This commit is contained in:
nossr50
2020-10-27 13:09:01 -07:00
parent d183d1217c
commit 2f506b72bb
14 changed files with 144 additions and 48 deletions

View File

@ -50,14 +50,14 @@ public class ArcheryManager extends SkillManager {
* Calculate bonus XP awarded for Archery when hitting a far-away target.
*
* @param target The {@link LivingEntity} damaged by the arrow
* @param damager The {@link Entity} who shot the arrow
* @param arrow The {@link Entity} who shot the arrow
*/
public double distanceXpBonusMultiplier(LivingEntity target, Entity damager) {
public double distanceXpBonusMultiplier(LivingEntity target, Entity arrow) {
//Hacky Fix - some plugins spawn arrows and assign them to players after the ProjectileLaunchEvent fires
if(!damager.hasMetadata(mcMMO.arrowDistanceKey))
return damager.getLocation().distance(target.getLocation());
if(!arrow.hasMetadata(mcMMO.arrowDistanceKey))
return arrow.getLocation().distance(target.getLocation());
Location firedLocation = (Location) damager.getMetadata(mcMMO.arrowDistanceKey).get(0).value();
Location firedLocation = (Location) arrow.getMetadata(mcMMO.arrowDistanceKey).get(0).value();
Location targetLocation = target.getLocation();
if (firedLocation.getWorld() != targetLocation.getWorld()) {