chat sale msgs
This commit is contained in:
parent
7b11baf24b
commit
e1efcabfbf
@ -1,5 +1,6 @@
|
||||
package mineplex.core.notifier;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -17,7 +18,7 @@ import mineplex.core.updater.event.UpdateEvent;
|
||||
|
||||
public class NotificationManager extends MiniPlugin
|
||||
{
|
||||
private boolean _enabled = false;
|
||||
private boolean _enabled = true;
|
||||
|
||||
private CoreClientManager _clientManager;
|
||||
|
||||
@ -48,8 +49,19 @@ public class NotificationManager extends MiniPlugin
|
||||
// if (event.getType() == UpdateType.MIN_16)
|
||||
// sale();
|
||||
|
||||
if (event.getType() == UpdateType.MIN_08)
|
||||
christmasSale();
|
||||
}
|
||||
|
||||
private void christmasSale()
|
||||
{
|
||||
Bukkit.broadcastMessage(C.cWhite + " ");
|
||||
Bukkit.broadcastMessage(C.cRedB + " MASSIVE WINTER SALE");
|
||||
Bukkit.broadcastMessage(C.cWhiteB + " 50% OFF ALL RANKS");
|
||||
Bukkit.broadcastMessage(" " + C.cGreen + C.Line + "www.mineplex.com/shop");
|
||||
Bukkit.broadcastMessage(C.cWhite + " ");
|
||||
}
|
||||
|
||||
private void sale()
|
||||
{
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
|
@ -35,6 +35,7 @@ import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.game.games.uhc.UHC;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.Location;
|
||||
@ -61,6 +62,26 @@ public class GameManager implements Listener
|
||||
Manager.getPluginManager().registerEvents(this, Manager.getPlugin());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void displaySale(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.MIN_08)
|
||||
return;
|
||||
|
||||
if (Manager.GetGame() == null)
|
||||
return;
|
||||
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
if (!Manager.GetGame().IsAlive(player))
|
||||
{
|
||||
player.sendMessage(C.cWhite + " ");
|
||||
player.sendMessage(C.cRedB + " MASSIVE WINTER SALE");
|
||||
player.sendMessage(C.cWhiteB + " 50% OFF ALL RANKS");
|
||||
player.sendMessage(" " + C.cGreen + C.Line + "www.mineplex.com/shop");
|
||||
player.sendMessage(C.cWhite + " ");
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void DisplayIP(UpdateEvent event)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user