mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Rupture fires a FakeEntityDamageByEntityEvent fixes #4122
This commit is contained in:
parent
326ff1cd70
commit
12abd68add
@ -2,12 +2,12 @@ Version 2.1.118
|
||||
Fixed another dupe bug
|
||||
Blast Mining no longer reduces debris from explosions due to some issues with the Bukkit API
|
||||
Modified locale string 'Mining.Blast.Effect' to remove debris reduction mention
|
||||
Rupture now fires a FakeEntityDamageByEntityEvent before damaging its victims (cancelling it will be ignored)
|
||||
|
||||
Version 2.1.117
|
||||
Fixed a rare http error when polling Mojang for UUIDs
|
||||
Fixed a bug that allowed duping
|
||||
|
||||
|
||||
Version 2.1.116
|
||||
Fixed directional plants not maintaining their direction when replanted
|
||||
|
||||
|
@ -2,6 +2,7 @@ package com.gmail.nossr50.runnables.skills;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||
import com.gmail.nossr50.events.fake.FakeEntityDamageByEntityEvent;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.MobHealthbarUtils;
|
||||
import com.gmail.nossr50.util.player.NotificationManager;
|
||||
@ -12,6 +13,7 @@ import com.gmail.nossr50.util.sounds.SoundType;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
@ -115,6 +117,10 @@ public class BleedTimerTask extends BukkitRunnable {
|
||||
|
||||
// debugMessage+="TargetHealthBeforeDMG=["+String.valueOf(target.getHealth())+"], ";
|
||||
|
||||
//Fire a fake event
|
||||
FakeEntityDamageByEntityEvent fakeEntityDamageByEntityEvent = (FakeEntityDamageByEntityEvent) CombatUtils.sendEntityDamageEvent(containerEntry.getValue().damageSource, target, EntityDamageEvent.DamageCause.CUSTOM, damage);
|
||||
Bukkit.getPluginManager().callEvent(fakeEntityDamageByEntityEvent);
|
||||
|
||||
CombatUtils.dealNoInvulnerabilityTickDamageRupture(target, damage, containerEntry.getValue().damageSource, toolTier);
|
||||
|
||||
double victimHealthAftermath = target.getHealth();
|
||||
|
Loading…
Reference in New Issue
Block a user