Modified onEntityDamage to MONITOR for plugin compatability.

This commit is contained in:
nossr50 2012-02-13 07:19:31 -08:00
parent 58dc45d344
commit 27e60ef85b
2 changed files with 7 additions and 6 deletions

View File

@ -1,6 +1,11 @@
Changelog: Changelog:
#Versions without changelogs probably had very small misc fixes, like tweaks to the source code #Versions without changelogs probably had very small misc fixes, like tweaks to the source code
Version 1.2.12
- Changed priority of onEntityDamage to come dead last to respect other plugins event cancelling
- Fixed /mcgod, & /mmoedit defaulting to true
- Fixed Fishing not handing out any XP
Version 1.2.11 Version 1.2.11
- Removed legacy Permission & PEX support. SuperPerms support only now. - Removed legacy Permission & PEX support. SuperPerms support only now.
- Made Smooth Brick to Mossy Brick and Dirt to Grass for green thumb configurable (Issue #120) - Made Smooth Brick to Mossy Brick and Dirt to Grass for green thumb configurable (Issue #120)

View File

@ -16,12 +16,10 @@
*/ */
package com.gmail.nossr50.listeners; package com.gmail.nossr50.listeners;
import org.bukkit.block.Block;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.entity.Wolf; import org.bukkit.entity.Wolf;
import org.bukkit.entity.TNTPrimed;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority; import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
@ -31,8 +29,6 @@ import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.entity.EntityDeathEvent; import org.bukkit.event.entity.EntityDeathEvent;
import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.event.entity.ExplosionPrimeEvent;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import com.gmail.nossr50.Combat; import com.gmail.nossr50.Combat;
@ -44,7 +40,6 @@ import com.gmail.nossr50.datatypes.SkillType;
import com.gmail.nossr50.locale.mcLocale; import com.gmail.nossr50.locale.mcLocale;
import com.gmail.nossr50.party.Party; import com.gmail.nossr50.party.Party;
import com.gmail.nossr50.skills.Acrobatics; import com.gmail.nossr50.skills.Acrobatics;
import com.gmail.nossr50.skills.BlastMining;
import com.gmail.nossr50.skills.Skills; import com.gmail.nossr50.skills.Skills;
import com.gmail.nossr50.skills.Taming; import com.gmail.nossr50.skills.Taming;
@ -57,11 +52,12 @@ public class mcEntityListener implements Listener
this.plugin = plugin; this.plugin = plugin;
} }
@EventHandler(priority = EventPriority.LOW) @EventHandler(priority = EventPriority.MONITOR)
public void onEntityDamage(EntityDamageEvent event) public void onEntityDamage(EntityDamageEvent event)
{ {
if(event.isCancelled()) if(event.isCancelled())
return; return;
//Check for world pvp flag //Check for world pvp flag
if(event instanceof EntityDamageByEntityEvent) if(event instanceof EntityDamageByEntityEvent)
{ {