mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-30 09:06:46 +01:00
Moving the FakeEntityDamageByEntity event to the top of the listener
This commit is contained in:
parent
14f1a91eeb
commit
cb9a9282dd
@ -67,7 +67,7 @@ public class Combat
|
||||
if(!pluginx.misc.bleedTracker.contains(target)) //Bleed
|
||||
Swords.bleedCheck(attacker, target, pluginx);
|
||||
|
||||
if (!(event instanceof FakeEntityDamageByEntityEvent) && PPa.getSerratedStrikesMode())
|
||||
if (PPa.getSerratedStrikesMode())
|
||||
Swords.applySerratedStrikes(attacker, event, pluginx);
|
||||
|
||||
if(target instanceof Player)
|
||||
@ -82,13 +82,10 @@ public class Combat
|
||||
Axes.axeCriticalCheck(attacker, event, pluginx); //Critical hit
|
||||
|
||||
//Impact
|
||||
if(!(event instanceof FakeEntityDamageByEntityEvent))
|
||||
{
|
||||
Axes.impact(attacker, target);
|
||||
Axes.impact(attacker, target);
|
||||
|
||||
if (PPa.getSkullSplitterMode())
|
||||
Axes.applyAoeDamage(attacker, event, pluginx);
|
||||
}
|
||||
if (PPa.getSkullSplitterMode())
|
||||
Axes.applyAoeDamage(attacker, event, pluginx);
|
||||
|
||||
if(target instanceof Player)
|
||||
PvPExperienceGain(attacker, PPa, (Player) target, event.getDamage(), SkillType.AXES);
|
||||
|
@ -46,6 +46,7 @@ import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.events.FakeEntityDamageByEntityEvent;
|
||||
import com.gmail.nossr50.party.Party;
|
||||
import com.gmail.nossr50.skills.Acrobatics;
|
||||
import com.gmail.nossr50.skills.Archery;
|
||||
@ -65,6 +66,10 @@ public class mcEntityListener implements Listener
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onEntityDamageByEntity(EntityDamageByEntityEvent event)
|
||||
{
|
||||
//Lets just put this here...
|
||||
if(event instanceof FakeEntityDamageByEntityEvent)
|
||||
return;
|
||||
|
||||
Entity defender = event.getEntity();
|
||||
Entity attacker = event.getDamager();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user