Removed flower trail from games

This commit is contained in:
LCastr0 2017-04-07 17:46:53 -03:00
parent 8bcb5bc948
commit e4fc53d5ce

View File

@ -13,6 +13,8 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.inventory.ItemStack;
import mineplex.core.arcadeevents.CoreGameStartEvent;
import mineplex.core.arcadeevents.CoreGameStopEvent;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.RGBData;
@ -34,6 +36,7 @@ public class ParticleSpringHalo extends ParticleGadget
private Map<Player, ColoredCircleEffect> _effects = new HashMap<>();
private List<SpringHaloData> _springHaloData = new ArrayList<>();
private Map<Player, List<SpringHaloData>> _playerSpringHaloData = new HashMap<>();
private boolean _enableTrail = true;
public ParticleSpringHalo(GadgetManager manager)
{
@ -101,6 +104,9 @@ public class ParticleSpringHalo extends ParticleGadget
if (!isActive(event.getPlayer()))
return;
if (!_enableTrail)
return;
Player player = event.getPlayer();
Block block = event.getFrom().getBlock();
@ -163,4 +169,16 @@ public class ParticleSpringHalo extends ParticleGadget
}
}
@EventHandler
public void onGameStart(CoreGameStartEvent event)
{
_enableTrail = false;
}
@EventHandler
public void onGameEnd(CoreGameStopEvent event)
{
_enableTrail = true;
}
}