From 27e60ef85bebc2d1c5f5a4d0d6780cea7acfc3ac Mon Sep 17 00:00:00 2001 From: nossr50 Date: Mon, 13 Feb 2012 07:19:31 -0800 Subject: [PATCH] Modified onEntityDamage to MONITOR for plugin compatability. --- Changelog.txt | 5 +++++ .../com/gmail/nossr50/listeners/mcEntityListener.java | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 1060d5eee..b2af2452c 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,6 +1,11 @@ Changelog: #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 - 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) diff --git a/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java b/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java index 20c6bb8b8..18a24f48e 100644 --- a/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java @@ -16,12 +16,10 @@ */ package com.gmail.nossr50.listeners; -import org.bukkit.block.Block; import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.entity.Wolf; -import org.bukkit.entity.TNTPrimed; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; 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.DamageCause; import org.bukkit.event.entity.EntityDeathEvent; -import org.bukkit.event.entity.EntityExplodeEvent; -import org.bukkit.event.entity.ExplosionPrimeEvent; import org.bukkit.inventory.ItemStack; 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.party.Party; import com.gmail.nossr50.skills.Acrobatics; -import com.gmail.nossr50.skills.BlastMining; import com.gmail.nossr50.skills.Skills; import com.gmail.nossr50.skills.Taming; @@ -57,11 +52,12 @@ public class mcEntityListener implements Listener this.plugin = plugin; } - @EventHandler(priority = EventPriority.LOW) + @EventHandler(priority = EventPriority.MONITOR) public void onEntityDamage(EntityDamageEvent event) { if(event.isCancelled()) return; + //Check for world pvp flag if(event instanceof EntityDamageByEntityEvent) {