Cleanup FloorIsLava Achievement
This commit is contained in:
parent
95de01611a
commit
6bf284d0c9
@ -9,7 +9,6 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
@ -35,15 +34,17 @@ public class FloorIsLavaTracker extends StatTracker<CakeWars>
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void live(GameStateChangeEvent event)
|
||||
public void gameStateChange(GameStateChangeEvent event)
|
||||
{
|
||||
if (event.GetState() != GameState.Live)
|
||||
if (event.GetState() == GameState.Live)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_successful.addAll(getGame().GetPlayers(true));
|
||||
}
|
||||
else if (event.GetState() == GameState.End)
|
||||
{
|
||||
_successful.forEach(player -> addStat(player, "FloorIsLava", 1, true, false));
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void updateFloor(UpdateEvent event)
|
||||
@ -67,15 +68,4 @@ public class FloorIsLavaTracker extends StatTracker<CakeWars>
|
||||
return !blocks.contains(block) && !blocks.contains(block.getRelative(BlockFace.DOWN)) && !getGame().getCakeShopModule().isNearShop(location);
|
||||
});
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void onGameStateChange(GameStateChangeEvent event)
|
||||
{
|
||||
if (event.GetState() != GameState.End)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_successful.forEach(player -> addStat(player, "FloorIsLava", 1, true, false));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user