From a72bebecb65f90d41d300c479522a2d8a13a2241 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Tue, 27 Aug 2013 10:56:47 +0200 Subject: [PATCH] Fix power removed twice upon death sometimes with McMMO. --- .../factions/listeners/FactionsListenerMain.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/com/massivecraft/factions/listeners/FactionsListenerMain.java b/src/com/massivecraft/factions/listeners/FactionsListenerMain.java index 3278e97f..a59c389e 100644 --- a/src/com/massivecraft/factions/listeners/FactionsListenerMain.java +++ b/src/com/massivecraft/factions/listeners/FactionsListenerMain.java @@ -68,6 +68,7 @@ import com.massivecraft.factions.event.FactionsEventPowerChange.PowerChangeReaso import com.massivecraft.factions.util.VisualizeUtil; import com.massivecraft.mcore.ps.PS; import com.massivecraft.mcore.util.MUtil; +import com.massivecraft.mcore.util.PlayerUtil; import com.massivecraft.mcore.util.Txt; public class FactionsListenerMain implements Listener @@ -186,6 +187,10 @@ public class FactionsListenerMain implements Listener // If a player dies ... Player player = event.getEntity(); + // ... and this is the first death event this tick ... + // (yeah other plugins can case death event to fire twice the same tick) + if (PlayerUtil.isDuplicateDeathEvent(event)) return; + // Check Disabled if (UConf.isDisabled(player)) return;