Fix power removed twice upon death sometimes with McMMO.

This commit is contained in:
Olof Larsson 2013-08-27 10:56:47 +02:00
parent 35af6ac0ea
commit a72bebecb6

View File

@ -68,6 +68,7 @@ import com.massivecraft.factions.event.FactionsEventPowerChange.PowerChangeReaso
import com.massivecraft.factions.util.VisualizeUtil; import com.massivecraft.factions.util.VisualizeUtil;
import com.massivecraft.mcore.ps.PS; import com.massivecraft.mcore.ps.PS;
import com.massivecraft.mcore.util.MUtil; import com.massivecraft.mcore.util.MUtil;
import com.massivecraft.mcore.util.PlayerUtil;
import com.massivecraft.mcore.util.Txt; import com.massivecraft.mcore.util.Txt;
public class FactionsListenerMain implements Listener public class FactionsListenerMain implements Listener
@ -186,6 +187,10 @@ public class FactionsListenerMain implements Listener
// If a player dies ... // If a player dies ...
Player player = event.getEntity(); 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 // Check Disabled
if (UConf.isDisabled(player)) return; if (UConf.isDisabled(player)) return;