From 637baed830196831fc4f3fff978bf971eb9951d1 Mon Sep 17 00:00:00 2001 From: William Burns Date: Thu, 31 Dec 2015 01:24:58 +0000 Subject: [PATCH] Small edits --- .../mineplex/hub/modules/NewYearCountdown.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/NewYearCountdown.java b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/NewYearCountdown.java index f7ba5f1c1..33b96bda1 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/NewYearCountdown.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/NewYearCountdown.java @@ -6,7 +6,6 @@ import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.util.*; import java.util.List; -import java.util.concurrent.TimeUnit; import org.bukkit.Color; import org.bukkit.FireworkEffect; @@ -24,9 +23,11 @@ import org.bukkit.util.Vector; import mineplex.core.MiniPlugin; import mineplex.core.command.CommandCenter; import mineplex.core.common.util.C; +import mineplex.core.common.util.UtilFirework; import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilShapes; +import mineplex.core.common.util.UtilTextBottom; import mineplex.core.common.util.UtilTextMiddle; import mineplex.core.common.util.UtilWorld; import mineplex.core.updater.UpdateType; @@ -44,6 +45,7 @@ public class NewYearCountdown extends MiniPlugin { private boolean _inProgress; private Location _center; + private Location _spawn; private int _stage; private BufferedImage _currentFrame; @@ -55,6 +57,7 @@ public class NewYearCountdown extends MiniPlugin NewYearMessage.class, new NewYearHandler(this)); _center = new Location(UtilWorld.getWorld("world"), 0.5, 85, 37.5); + _spawn = new Location(UtilWorld.getWorld("world"), 0.5, 74, 0.5); _inProgress = false; } @@ -108,6 +111,8 @@ public class NewYearCountdown extends MiniPlugin if (_stage <= 0) return; + UtilTextBottom.display(C.cWhiteB + "New Year's Countdown - " + C.cGoldB + formatTimer(_stage), UtilServer.getPlayers()); + _currentFrame = stringToBufferedImage(new Font("Tahoma", Font.PLAIN, 36), formatTimer(_stage)); } @@ -124,6 +129,7 @@ public class NewYearCountdown extends MiniPlugin { _currentFrame = stringToBufferedImage(new Font("Tahoma", Font.PLAIN, 20), "Happy New Year"); UtilTextMiddle.display(C.cGoldB + "2016", C.cYellowB + "Happy New Year!", UtilServer.getPlayers()); + //fireworkCircle(); } if (_stage <= -120) @@ -265,9 +271,17 @@ public class NewYearCountdown extends MiniPlugin f.setFireworkMeta(fm); } + private void fireworkCircle() + { + for (Location cur : UtilShapes.getPointsInCircle(_spawn, 35, 30)) + { + UtilFirework.launchFirework(cur, FireworkEffect.Type.BALL, Color.FUCHSIA, false, true, cur.toVector().setY(3).multiply(1), 2); + } + } + public UtilParticle.ParticleType getRandomParticle() { - List types = Arrays.asList(UtilParticle.ParticleType.FLAME, UtilParticle.ParticleType.HAPPY_VILLAGER, UtilParticle.ParticleType.RED_DUST); + List types = Arrays.asList(UtilParticle.ParticleType.FLAME, UtilParticle.ParticleType.HAPPY_VILLAGER, UtilParticle.ParticleType.RED_DUST, UtilParticle.ParticleType.FIREWORKS_SPARK); return types.get(new Random().nextInt(types.size())); }