Merge branch 'master' of ssh://184.154.0.242:7999/min/mineplex into SkyWars
This commit is contained in:
commit
7583e4170b
@ -9,6 +9,7 @@ import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
@ -41,9 +42,41 @@ public class NotificationManager extends MiniPlugin
|
||||
if (!_enabled)
|
||||
return;
|
||||
|
||||
if (event.getType() != UpdateType.MIN_08)
|
||||
return;
|
||||
//if (event.getType() == UpdateType.MIN_08)
|
||||
// hugeSale();
|
||||
|
||||
if (event.getType() == UpdateType.MIN_16)
|
||||
sale();
|
||||
}
|
||||
|
||||
private void sale()
|
||||
{
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
{
|
||||
Rank rank = _clientManager.Get(player).GetRank();
|
||||
|
||||
if (rank.Has(Rank.LEGEND))
|
||||
continue;
|
||||
|
||||
if (rank == Rank.ALL)
|
||||
{
|
||||
UtilPlayer.message(player, C.cWhite + "Summer Sale! " + player.getName() + " Purchase " + C.cAqua + C.Bold + "Ultra RANK" + C.cWhite + " for $15");
|
||||
}
|
||||
else if (rank == Rank.ULTRA)
|
||||
{
|
||||
UtilPlayer.message(player, C.cWhite + "Summer Sale! " + player.getName() + " Upgrade to " + C.cPurple + C.Bold + "HERO RANK" + C.cWhite + " for $15!");
|
||||
}
|
||||
else if (rank == Rank.HERO)
|
||||
{
|
||||
UtilPlayer.message(player, C.cWhite + "Summer Sale! " + player.getName() + " Upgrade to " + C.cGreen + C.Bold + "LEGEND RANK" + C.cWhite + " for $15!");
|
||||
}
|
||||
|
||||
UtilPlayer.message(player, C.cWhite + " Visit " + F.link("www.mineplex.com/shop") + " for 50% Off Ranks!");
|
||||
}
|
||||
}
|
||||
|
||||
private void hugeSale()
|
||||
{
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
{
|
||||
Rank rank = _clientManager.Get(player).GetRank();
|
||||
|
@ -42,6 +42,7 @@ public enum GameType
|
||||
Runner("Runner"),
|
||||
SearchAndDestroy("Search and Destroy"),
|
||||
Sheep("Sheep Quest"),
|
||||
Skywars("SkyWars"),
|
||||
Smash("Super Smash Mobs"),
|
||||
SmashTeams("Super Smash Mobs Teams", "Super Smash Mobs"),
|
||||
SmashDomination("Super Smash Mobs Domination", "Super Smash Mobs"),
|
||||
|
Loading…
Reference in New Issue
Block a user