Event first

This commit is contained in:
Olof Larsson
2014-06-04 16:47:01 +02:00
parent e43f63cf59
commit 56768aca55
38 changed files with 134 additions and 134 deletions

View File

@@ -6,8 +6,8 @@ import org.bukkit.entity.Player;
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.factions.entity.UConf;
import com.massivecraft.factions.entity.UPlayer;
import com.massivecraft.factions.event.FactionsEventPowerChange;
import com.massivecraft.factions.event.FactionsEventPowerChange.PowerChangeReason;
import com.massivecraft.factions.event.EventFactionsPowerChange;
import com.massivecraft.factions.event.EventFactionsPowerChange.PowerChangeReason;
import com.massivecraft.massivecore.ModuloRepeatTask;
import com.massivecraft.massivecore.util.TimeUnit;
@@ -51,7 +51,7 @@ public class TaskPlayerPowerUpdate extends ModuloRepeatTask
UPlayer uplayer = UPlayer.get(player);
double newPower = uplayer.getPower() + uplayer.getPowerPerHour() * millis / TimeUnit.MILLIS_PER_HOUR;
FactionsEventPowerChange event = new FactionsEventPowerChange(null, uplayer, PowerChangeReason.TIME, newPower);
EventFactionsPowerChange event = new EventFactionsPowerChange(null, uplayer, PowerChangeReason.TIME, newPower);
event.run();
if (event.isCancelled()) continue;
newPower = event.getNewPower();