Fix merging with develop

This commit is contained in:
Sam 2017-05-12 23:07:20 +01:00
parent ff07d38d00
commit dc2d317652

View File

@ -5,8 +5,6 @@ import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
import mineplex.core.google.GoogleSheetsManager; import mineplex.core.google.GoogleSheetsManager;
import net.minecraft.server.v1_8_R3.EntityLiving;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.GameMode; import org.bukkit.GameMode;
@ -40,6 +38,8 @@ import mineplex.core.MiniPlugin;
import mineplex.core.account.CoreClient; import mineplex.core.account.CoreClient;
import mineplex.core.account.CoreClientManager; import mineplex.core.account.CoreClientManager;
import mineplex.core.achievement.AchievementManager; import mineplex.core.achievement.AchievementManager;
import mineplex.core.antihack.compedaccount.CompromisedAccountManager;
import mineplex.core.antihack.compedaccount.PriorityCause;
import mineplex.core.blockrestore.BlockRestore; import mineplex.core.blockrestore.BlockRestore;
import mineplex.core.blood.Blood; import mineplex.core.blood.Blood;
import mineplex.core.bonuses.BonusManager; import mineplex.core.bonuses.BonusManager;
@ -124,7 +124,6 @@ import mineplex.minecraft.game.core.condition.ConditionManager;
import mineplex.minecraft.game.core.damage.DamageManager; import mineplex.minecraft.game.core.damage.DamageManager;
import mineplex.minecraft.game.core.fire.Fire; import mineplex.minecraft.game.core.fire.Fire;
import mineplex.serverdata.Region; import mineplex.serverdata.Region;
import nautilus.game.arcade.addons.SoupAddon; import nautilus.game.arcade.addons.SoupAddon;
import nautilus.game.arcade.booster.GameBoosterManager; import nautilus.game.arcade.booster.GameBoosterManager;
import nautilus.game.arcade.command.CancelNextGameCommand; import nautilus.game.arcade.command.CancelNextGameCommand;
@ -169,6 +168,7 @@ import nautilus.game.arcade.managers.lobby.current.NewGameLobbyManager;
import nautilus.game.arcade.managers.lobby.legacy.LegacyGameLobbyManager; import nautilus.game.arcade.managers.lobby.legacy.LegacyGameLobbyManager;
import nautilus.game.arcade.player.ArcadePlayer; import nautilus.game.arcade.player.ArcadePlayer;
import nautilus.game.arcade.shop.ArcadeShop; import nautilus.game.arcade.shop.ArcadeShop;
import net.minecraft.server.v1_8_R3.EntityLiving;
public class ArcadeManager extends MiniPlugin implements IRelation public class ArcadeManager extends MiniPlugin implements IRelation
{ {
@ -264,13 +264,14 @@ public class ArcadeManager extends MiniPlugin implements IRelation
public final boolean IsHolidayEnabled; public final boolean IsHolidayEnabled;
private final Titles _titles; private final Titles _titles;
private final CompromisedAccountManager _compromisedAccountManager = require(CompromisedAccountManager.class);
public ArcadeManager(Arcade plugin, ServerStatusManager serverStatusManager, GameServerConfig serverConfig, public ArcadeManager(Arcade plugin, ServerStatusManager serverStatusManager, GameServerConfig serverConfig,
CoreClientManager clientManager, DonationManager donationManager, DamageManager damageManager, CoreClientManager clientManager, DonationManager donationManager, DamageManager damageManager,
StatsManager statsManager, IncognitoManager incognitoManager, AchievementManager achievementManager, DisguiseManager disguiseManager, Creature creature, Teleport teleport, Blood blood, Chat chat, StatsManager statsManager, IncognitoManager incognitoManager, AchievementManager achievementManager, DisguiseManager disguiseManager, Creature creature, Teleport teleport, Blood blood, Chat chat,
Portal portal, PreferencesManager preferences, InventoryManager inventoryManager, PacketHandler packetHandler, Portal portal, PreferencesManager preferences, InventoryManager inventoryManager, PacketHandler packetHandler,
CosmeticManager cosmeticManager, ProjectileManager projectileManager, PetManager petManager, HologramManager hologramManager, PollManager pollManager, CosmeticManager cosmeticManager, ProjectileManager projectileManager, PetManager petManager, HologramManager hologramManager, PollManager pollManager,
NpcManager npcManager, CustomDataManager customDataManager, Punish punish, EloManager eloManager, ThankManager thankManager, BoosterManager boosterManager) NpcManager npcManager, CustomDataManager customDataManager, Punish punish, EloManager eloManager, ThankManager thankManager, BoosterManager boosterManager)
{ {
super("Game Manager", plugin); super("Game Manager", plugin);
@ -497,7 +498,6 @@ public class ArcadeManager extends MiniPlugin implements IRelation
scoreboard.get(ArcadeScoreboardLine.PLAYERS_NAME).write(C.cYellow + C.Bold + "Players"); scoreboard.get(ArcadeScoreboardLine.PLAYERS_NAME).write(C.cYellow + C.Bold + "Players");
scoreboard.get(ArcadeScoreboardLine.KIT_NAME).write(C.cGray + C.Bold + "Kit"); scoreboard.get(ArcadeScoreboardLine.KIT_NAME).write(C.cGray + C.Bold + "Kit");
scoreboard.get(ArcadeScoreboardLine.GEM_NAME).write(C.cGreen + C.Bold + "Gems");
scoreboard.get(ArcadeScoreboardLine.SERVER_NAME).write(C.cAqua + C.Bold + "Server"); scoreboard.get(ArcadeScoreboardLine.SERVER_NAME).write(C.cAqua + C.Bold + "Server");
scoreboard.get(ArcadeScoreboardLine.SERVER_VALUE).write(_plugin.getConfig().getString("serverstatus.name")); scoreboard.get(ArcadeScoreboardLine.SERVER_VALUE).write(_plugin.getConfig().getString("serverstatus.name"));
} }
@ -522,7 +522,16 @@ public class ArcadeManager extends MiniPlugin implements IRelation
} }
scoreboard.get(ArcadeScoreboardLine.PLAYERS_VALUE).write(_gameManager.getValidPlayersForGameStart().size() + "/" + GetPlayerFull()); scoreboard.get(ArcadeScoreboardLine.PLAYERS_VALUE).write(_gameManager.getValidPlayersForGameStart().size() + "/" + GetPlayerFull());
scoreboard.get(ArcadeScoreboardLine.GEM_VALUE).write(donationManager.Get(scoreboard.getOwner()).getBalance(GlobalCurrency.GEM)); if (GetGame() != null && GetGame().CrownsEnabled)
{
scoreboard.get(ArcadeScoreboardLine.GEM_NAME).write(C.cGold + C.Bold + "Crowns");
scoreboard.get(ArcadeScoreboardLine.GEM_VALUE).write(donationManager.getCrowns(scoreboard.getOwner()));
}
else
{
scoreboard.get(ArcadeScoreboardLine.GEM_NAME).write(C.cGreen + C.Bold + "Gems");
scoreboard.get(ArcadeScoreboardLine.GEM_VALUE).write(donationManager.Get(scoreboard.getOwner()).getBalance(GlobalCurrency.GEM));
}
if (GetGame() != null) if (GetGame() != null)
{ {
@ -794,11 +803,6 @@ public class ArcadeManager extends MiniPlugin implements IRelation
return _customDataManager; return _customDataManager;
} }
public GoogleSheetsManager getSheetsManager()
{
return _sheetsManager;
}
public ChatColor GetColor(Player player) public ChatColor GetColor(Player player)
{ {
if (_game == null) if (_game == null)
@ -952,21 +956,21 @@ public class ArcadeManager extends MiniPlugin implements IRelation
} }
//Recruiting //Recruiting
else */if (_game == null || _game.GetState() == GameState.Recruit) else */if (_game == null || _game.GetState() == GameState.Recruit)
{
if (_game != null && _game.GetCountdown() != -1)
{ {
if (_game != null && _game.GetCountdown() != -1) event.setMotd(ChatColor.GREEN + "Starting in " + _game.GetCountdown() + " Seconds" + extrainformation);
{
event.setMotd(ChatColor.GREEN + "Starting in " + _game.GetCountdown() + " Seconds" + extrainformation);
}
else
{
event.setMotd(ChatColor.GREEN + "Recruiting" + extrainformation);
}
} }
//In Progress
else else
{ {
event.setMotd(ChatColor.YELLOW + "In Progress" + extrainformation); event.setMotd(ChatColor.GREEN + "Recruiting" + extrainformation);
} }
}
//In Progress
else
{
event.setMotd(ChatColor.YELLOW + "In Progress" + extrainformation);
}
if (UtilServer.isTestServer(false)) if (UtilServer.isTestServer(false))
event.setMotd(ChatColor.GOLD + "Private Mineplex Test Server"); event.setMotd(ChatColor.GOLD + "Private Mineplex Test Server");
@ -981,6 +985,8 @@ public class ArcadeManager extends MiniPlugin implements IRelation
@EventHandler @EventHandler
public void MessageJoin(PlayerJoinEvent event) public void MessageJoin(PlayerJoinEvent event)
{ {
_compromisedAccountManager.triggerPriorityBan(event.getPlayer(), PriorityCause.JOIN_GAME);
if (_incognitoManager.Get(event.getPlayer()).Status) if (_incognitoManager.Get(event.getPlayer()).Status)
{ {
event.setJoinMessage(null); event.setJoinMessage(null);
@ -2072,4 +2078,14 @@ public class ArcadeManager extends MiniPlugin implements IRelation
{ {
return this._titles; return this._titles;
} }
}
public GoogleSheetsManager getSheetsManager()
{
return _sheetsManager;
}
public CompromisedAccountManager getCompromisedAccountManager()
{
return _compromisedAccountManager;
}
}