diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/spawn/Spawn.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/spawn/Spawn.java index 7e05a5fe9..aae254487 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/spawn/Spawn.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/spawn/Spawn.java @@ -4,6 +4,7 @@ import java.util.Set; import org.bukkit.Bukkit; import org.bukkit.ChatColor; +import org.bukkit.Effect; import org.bukkit.GameMode; import org.bukkit.Location; import org.bukkit.Material; @@ -61,6 +62,12 @@ public class Spawn extends MiniPlugin private WeightSet _spawns; private WeightSet _shops; private ClansManager _clansManager; + + private long _songEastLast = 0; + private long _songWestLast = 0; + + private long _songEastLength = 345000; //Blocks + private long _songWestLength = 185000; //Chirp public Spawn(JavaPlugin plugin, ClansManager clansManager) { @@ -450,4 +457,21 @@ public class Spawn extends MiniPlugin UtilPlayer.message(player, F.main("Clans", message)); } } + + @EventHandler + public void playDatMusicALLDAYLONG(UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + return; + + if (UtilTime.elapsed(_songEastLast, _songEastLength)) + { + getEastSpawn().getWorld().playEffect(getEastSpawn(), Effect.RECORD_PLAY, 2258); //Blocks + } + + if (UtilTime.elapsed(_songWestLast, _songWestLength)) + { + getEastSpawn().getWorld().playEffect(getEastSpawn(), Effect.RECORD_PLAY, 2259); //Chirp + } + } }