mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-12-17 14:28:46 +01:00
fix spectral arrows (#5173)
This commit is contained in:
@@ -181,7 +181,7 @@ public final class CombatUtils {
|
||||
}
|
||||
|
||||
private static void processCrossbowsCombat(@NotNull LivingEntity target, @NotNull Player player,
|
||||
@NotNull EntityDamageByEntityEvent event, @NotNull Arrow arrow) {
|
||||
@NotNull EntityDamageByEntityEvent event, @NotNull AbstractArrow arrow) {
|
||||
double initialDamage = event.getDamage();
|
||||
|
||||
final McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
@@ -384,7 +384,7 @@ public final class CombatUtils {
|
||||
}
|
||||
|
||||
private static void processArcheryCombat(@NotNull LivingEntity target, @NotNull Player player,
|
||||
@NotNull EntityDamageByEntityEvent event, @NotNull Arrow arrow) {
|
||||
@NotNull EntityDamageByEntityEvent event, @NotNull AbstractArrow arrow) {
|
||||
double initialDamage = event.getDamage();
|
||||
|
||||
final McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||
@@ -566,7 +566,7 @@ public final class CombatUtils {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (painSource instanceof Arrow arrow) {
|
||||
} else if (painSource instanceof AbstractArrow arrow) {
|
||||
ProjectileSource projectileSource = arrow.getShooter();
|
||||
boolean isCrossbow = isCrossbowProjectile(arrow);
|
||||
if (projectileSource instanceof Player player) {
|
||||
@@ -1055,7 +1055,7 @@ public final class CombatUtils {
|
||||
*
|
||||
* @param arrow the projectile
|
||||
*/
|
||||
public static void delayArrowMetaCleanup(@NotNull Arrow arrow) {
|
||||
public static void delayArrowMetaCleanup(@NotNull AbstractArrow arrow) {
|
||||
mcMMO.p.getFoliaLib().getScheduler().runLater(() -> ProjectileUtils.cleanupProjectileMetadata(arrow), 20*120);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user