PC-413 (Fixed)
Fixed some aggressive auto-formatting
This commit is contained in:
parent
4a0558d5c8
commit
cb2dd508bd
@ -157,7 +157,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
private Portal _portal;
|
private Portal _portal;
|
||||||
private ArcadeShop _arcadeShop;
|
private ArcadeShop _arcadeShop;
|
||||||
|
|
||||||
// Champions Modules
|
//Champions Modules
|
||||||
private boolean _enabled = true;
|
private boolean _enabled = true;
|
||||||
private ClassManager _classManager;
|
private ClassManager _classManager;
|
||||||
private SkillFactory _skillFactory;
|
private SkillFactory _skillFactory;
|
||||||
@ -207,21 +207,22 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
// Games
|
// Games
|
||||||
private Game _game;
|
private Game _game;
|
||||||
|
|
||||||
// Youtuber Kits
|
//Youtuber Kits
|
||||||
private HashSet<Player> _youtube = new HashSet<Player>();
|
private HashSet<Player> _youtube = new HashSet<Player>();
|
||||||
|
|
||||||
// Server Property
|
//Server Property
|
||||||
private Rank _requiredRank;
|
private Rank _requiredRank;
|
||||||
|
|
||||||
// Game commands
|
//Game commands
|
||||||
public static final String GAME_CMD_MODE_FILE = "GAME_CMD_MODE.dat";
|
public static final String GAME_CMD_MODE_FILE = "GAME_CMD_MODE.dat";
|
||||||
private boolean _gameCommandMode;
|
private boolean _gameCommandMode;
|
||||||
|
|
||||||
public ArcadeManager(Arcade plugin, ServerStatusManager serverStatusManager, GameServerConfig serverConfig, CoreClientManager clientManager, DonationManager donationManager,
|
public ArcadeManager(Arcade plugin, ServerStatusManager serverStatusManager, GameServerConfig serverConfig,
|
||||||
DamageManager damageManager, StatsManager statsManager, IncognitoManager incognitoManager, AchievementManager achievementManager, DisguiseManager disguiseManager, Creature creature,
|
CoreClientManager clientManager, DonationManager donationManager, DamageManager damageManager,
|
||||||
Teleport teleport, Blood blood, Chat chat, Portal portal, PreferencesManager preferences, InventoryManager inventoryManager, PacketHandler packetHandler, CosmeticManager cosmeticManager,
|
StatsManager statsManager, IncognitoManager incognitoManager, AchievementManager achievementManager, DisguiseManager disguiseManager, Creature creature, Teleport teleport, Blood blood, Chat chat,
|
||||||
ProjectileManager projectileManager, PetManager petManager, HologramManager hologramManager, String webAddress, PollManager pollManager, NpcManager npcManager,
|
Portal portal, PreferencesManager preferences, InventoryManager inventoryManager, PacketHandler packetHandler,
|
||||||
CustomDataManager customDataManager, Punish punish, EloManager eloManager)
|
CosmeticManager cosmeticManager, ProjectileManager projectileManager, PetManager petManager, HologramManager hologramManager, String webAddress, PollManager pollManager,
|
||||||
|
NpcManager npcManager, CustomDataManager customDataManager, Punish punish, EloManager eloManager)
|
||||||
{
|
{
|
||||||
super("Game Manager", plugin);
|
super("Game Manager", plugin);
|
||||||
|
|
||||||
@ -242,17 +243,17 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
|
|
||||||
_brandingManager = new BrandingManager(plugin);
|
_brandingManager = new BrandingManager(plugin);
|
||||||
|
|
||||||
// Dont see a reason to ever just use the normal one
|
//Dont see a reason to ever just use the normal one
|
||||||
// if (serverConfig.GameList.contains(GameType.ChampionsDominate)
|
// if (serverConfig.GameList.contains(GameType.ChampionsDominate)
|
||||||
// || serverConfig.GameList.contains(GameType.ChampionsTDM)
|
// || serverConfig.GameList.contains(GameType.ChampionsTDM)
|
||||||
// || serverConfig.GameList.contains(GameType.ChampionsCTF))
|
// || serverConfig.GameList.contains(GameType.ChampionsCTF))
|
||||||
// {
|
// {
|
||||||
// _conditionManager = new SkillConditionManager(plugin);
|
// _conditionManager = new SkillConditionManager(plugin);
|
||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
// _conditionManager = new ConditionManager(plugin);
|
// _conditionManager = new ConditionManager(plugin);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
_clientManager = clientManager;
|
_clientManager = clientManager;
|
||||||
_serverStatusManager = serverStatusManager;
|
_serverStatusManager = serverStatusManager;
|
||||||
@ -303,8 +304,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
_gameTournamentManager = new GameTournamentManager(this);
|
_gameTournamentManager = new GameTournamentManager(this);
|
||||||
new GameStatManager(this);
|
new GameStatManager(this);
|
||||||
FacebookManager facebookManager = new FacebookManager(plugin, clientManager, donationManager, inventoryManager);
|
FacebookManager facebookManager = new FacebookManager(plugin, clientManager, donationManager, inventoryManager);
|
||||||
_bonusManager = new BonusManager(plugin, clientManager, serverStatusManager, donationManager, pollManager, npcManager, hologramManager, statsManager, _inventoryManager, petManager,
|
_bonusManager = new BonusManager(plugin, clientManager, serverStatusManager, donationManager, pollManager , npcManager, hologramManager, statsManager, _inventoryManager, petManager, facebookManager, _cosmeticManager.getGadgetManager());
|
||||||
facebookManager, _cosmeticManager.getGadgetManager());
|
|
||||||
new GameLootManager(this, petManager, _bonusManager.getRewardManager());
|
new GameLootManager(this, petManager, _bonusManager.getRewardManager());
|
||||||
new GameSpectatorManager(this);
|
new GameSpectatorManager(this);
|
||||||
_gameWorldManager = new GameWorldManager(this);
|
_gameWorldManager = new GameWorldManager(this);
|
||||||
@ -312,7 +312,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
_hologramManager = hologramManager;
|
_hologramManager = hologramManager;
|
||||||
_idleManager = new IdleManager(this);
|
_idleManager = new IdleManager(this);
|
||||||
TitanGiveawayManager titanGiveaway = new TitanGiveawayManager(getPlugin(), clientManager, serverStatusManager);
|
TitanGiveawayManager titanGiveaway = new TitanGiveawayManager(getPlugin(), clientManager, serverStatusManager);
|
||||||
// new HolidayManager(this, titanGiveaway);
|
// new HolidayManager(this, titanGiveaway);
|
||||||
new ValentinesGiftManager(plugin, clientManager, _bonusManager.getRewardManager(), inventoryManager, _cosmeticManager.getGadgetManager(), statsManager);
|
new ValentinesGiftManager(plugin, clientManager, _bonusManager.getRewardManager(), inventoryManager, _cosmeticManager.getGadgetManager(), statsManager);
|
||||||
new GameTestingManager(this);
|
new GameTestingManager(this);
|
||||||
new PlayerDisguiseManager(plugin, _clientManager);
|
new PlayerDisguiseManager(plugin, _clientManager);
|
||||||
@ -322,15 +322,18 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
new SoupAddon(plugin, this);
|
new SoupAddon(plugin, this);
|
||||||
new TeamArmorAddon(plugin, this);
|
new TeamArmorAddon(plugin, this);
|
||||||
|
|
||||||
// Champions Modules
|
//Champions Modules
|
||||||
_energy = new Energy(plugin);
|
_energy = new Energy(plugin);
|
||||||
|
|
||||||
_itemFactory = new ItemFactory(_plugin, _blockRestore, _conditionManager, damageManager, _energy, _fire, _projectileManager, webAddress);
|
_itemFactory = new ItemFactory(_plugin, _blockRestore, _conditionManager, damageManager, _energy,
|
||||||
|
_fire, _projectileManager, webAddress);
|
||||||
|
|
||||||
_skillFactory = new SkillFactory(plugin, damageManager, this, _damageManager.GetCombatManager(), _conditionManager, _projectileManager, _disguiseManager, _blockRestore, _fire, new Movement(
|
_skillFactory = new SkillFactory(plugin, damageManager, this, _damageManager.GetCombatManager(),
|
||||||
plugin), teleport, _energy, webAddress);
|
_conditionManager, _projectileManager, _disguiseManager, _blockRestore, _fire, new Movement(plugin), teleport,
|
||||||
|
_energy, webAddress);
|
||||||
|
|
||||||
_classManager = new ClassManager(plugin, clientManager, donationManager, _cosmeticManager.getGadgetManager(), _skillFactory, _itemFactory, webAddress);
|
_classManager = new ClassManager(plugin, clientManager, donationManager, _cosmeticManager.getGadgetManager(), _skillFactory, _itemFactory,
|
||||||
|
webAddress);
|
||||||
|
|
||||||
_classShopManager = new ClassShopManager(_plugin, _classManager, _skillFactory, _itemFactory, _achievementManager, clientManager);
|
_classShopManager = new ClassShopManager(_plugin, _classManager, _skillFactory, _itemFactory, _achievementManager, clientManager);
|
||||||
|
|
||||||
@ -556,10 +559,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
return _serverStatusManager;
|
return _serverStatusManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CustomDataManager getCustomDataManager()
|
public CustomDataManager getCustomDataManager() { return _customDataManager; }
|
||||||
{
|
|
||||||
return _customDataManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ChatColor GetColor(Player player)
|
public ChatColor GetColor(Player player)
|
||||||
{
|
{
|
||||||
@ -687,7 +687,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
{
|
{
|
||||||
event.setMaxPlayers(_serverConfig.MaxPlayers);
|
event.setMaxPlayers(_serverConfig.MaxPlayers);
|
||||||
|
|
||||||
// MPS
|
//MPS
|
||||||
if (_gameHostManager != null && _gameHostManager.isPrivateServer())
|
if (_gameHostManager != null && _gameHostManager.isPrivateServer())
|
||||||
{
|
{
|
||||||
if (_gameHostManager.isHostExpired())
|
if (_gameHostManager.isHostExpired())
|
||||||
@ -703,23 +703,23 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String extrainformation = "|" + _serverConfig.ServerType + "|" + (_game == null ? "Unknown" : _game.GetName()) + "|"
|
String extrainformation = "|" + _serverConfig.ServerType + "|" + (_game == null ? "Unknown" : _game.GetName())
|
||||||
+ ((_game == null || _game.WorldData == null) ? "Unknown" : _game.WorldData.MapName);
|
+ "|" + ((_game == null || _game.WorldData == null) ? "Unknown" : _game.WorldData.MapName);
|
||||||
|
|
||||||
if (_gameHostManager.isPrivateServer() && _gameHostManager.hasRank(Rank.TWITCH))
|
if (_gameHostManager.isPrivateServer() && _gameHostManager.hasRank(Rank.TWITCH))
|
||||||
extrainformation += "|HostRank." + _gameHostManager.getHostRank().toString();
|
extrainformation += "|HostRank." + _gameHostManager.getHostRank().toString();
|
||||||
|
|
||||||
// Always Joinable
|
//Always Joinable
|
||||||
// if (_game != null && _game.JoinInProgress)
|
// if (_game != null && _game.JoinInProgress)
|
||||||
// {
|
// {
|
||||||
// event.setMotd(ChatColor.GREEN + "Recruiting" + extrainformation);
|
// event.setMotd(ChatColor.GREEN + "Recruiting" + extrainformation);
|
||||||
// }
|
// }
|
||||||
// UHC Timed
|
//UHC Timed
|
||||||
if (_game != null && _game.GetType() == GameType.UHC)
|
if (_game != null && _game.GetType() == GameType.UHC)
|
||||||
{
|
{
|
||||||
event.setMotd(((UHC) _game).getMotdStatus() + extrainformation);
|
event.setMotd(((UHC) _game).getMotdStatus() + extrainformation);
|
||||||
}
|
}
|
||||||
// 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)
|
||||||
@ -731,7 +731,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
event.setMotd(ChatColor.GREEN + "Recruiting" + extrainformation);
|
event.setMotd(ChatColor.GREEN + "Recruiting" + extrainformation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// In Progress
|
//In Progress
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
event.setMotd(ChatColor.YELLOW + "In Progress" + extrainformation);
|
event.setMotd(ChatColor.YELLOW + "In Progress" + extrainformation);
|
||||||
@ -810,15 +810,17 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
if (_game != null && !_game.GiveClock)
|
if (_game != null && !_game.GiveClock)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (player.getOpenInventory().getType() != InventoryType.CRAFTING && player.getOpenInventory().getType() != InventoryType.CREATIVE)
|
if (player.getOpenInventory().getType() != InventoryType.CRAFTING &&
|
||||||
|
player.getOpenInventory().getType() != InventoryType.CREATIVE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!UtilGear.isMat(player.getInventory().getItem(8), Material.WATCH) && !UtilGear.isMat(player.getInventory().getItem(8), Material.SPECKLED_MELON))
|
if (!UtilGear.isMat(player.getInventory().getItem(8), Material.WATCH) && !UtilGear.isMat(player.getInventory().getItem(8), Material.SPECKLED_MELON))
|
||||||
{
|
{
|
||||||
player.getInventory().setItem(
|
player.getInventory().setItem(
|
||||||
8,
|
8,
|
||||||
ItemStackFactory.Instance.CreateStack(Material.WATCH, (byte) 0, 1, (short) 0, C.cGreen + "Return to Hub", new String[] { "", ChatColor.RESET + "Click while holding this",
|
ItemStackFactory.Instance.CreateStack(Material.WATCH, (byte) 0, 1, (short) 0, C.cGreen
|
||||||
ChatColor.RESET + "to return to the Hub." }));
|
+ "Return to Hub", new String[]{"", ChatColor.RESET + "Click while holding this",
|
||||||
|
ChatColor.RESET + "to return to the Hub."}));
|
||||||
|
|
||||||
UtilInv.Update(player);
|
UtilInv.Update(player);
|
||||||
}
|
}
|
||||||
@ -829,7 +831,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
{
|
{
|
||||||
if (Bukkit.getServer().hasWhitelist())
|
if (Bukkit.getServer().hasWhitelist())
|
||||||
{
|
{
|
||||||
if (_requiredRank != null)
|
if(_requiredRank != null)
|
||||||
{
|
{
|
||||||
if (_clientManager.Get(event.getPlayer().getName()).GetRank().has(event.getPlayer(), _requiredRank, false))
|
if (_clientManager.Get(event.getPlayer().getName()).GetRank().has(event.getPlayer(), _requiredRank, false))
|
||||||
{
|
{
|
||||||
@ -857,8 +859,9 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_clientManager.Get(event.getPlayer().getName()).GetRank().has(event.getPlayer(), Rank.MODERATOR, false) || _clientManager.Get(event.getPlayer().getName()).GetRank() == Rank.MAPDEV
|
if (_clientManager.Get(event.getPlayer().getName()).GetRank().has(event.getPlayer(), Rank.MODERATOR, false) ||
|
||||||
|| _clientManager.Get(event.getPlayer().getName()).GetRank() == Rank.MAPLEAD)
|
_clientManager.Get(event.getPlayer().getName()).GetRank() == Rank.MAPDEV ||
|
||||||
|
_clientManager.Get(event.getPlayer().getName()).GetRank() == Rank.MAPLEAD)
|
||||||
{
|
{
|
||||||
event.allow();
|
event.allow();
|
||||||
event.setResult(PlayerLoginEvent.Result.ALLOWED);
|
event.setResult(PlayerLoginEvent.Result.ALLOWED);
|
||||||
@ -951,11 +954,8 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if a player is participating in/has been participating in the
|
* Checks if a player is participating in/has been participating in the current game
|
||||||
* current game
|
* @param player The player to check
|
||||||
*
|
|
||||||
* @param player
|
|
||||||
* The player to check
|
|
||||||
* @return Whether they are/have been playing
|
* @return Whether they are/have been playing
|
||||||
*/
|
*/
|
||||||
public boolean hasBeenPlaying(Player player)
|
public boolean hasBeenPlaying(Player player)
|
||||||
@ -1019,7 +1019,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
// Arrows go bye bye.
|
// Arrows go bye bye.
|
||||||
((CraftPlayer) player).getHandle().o(0);
|
((CraftPlayer) player).getHandle().o(0);
|
||||||
|
|
||||||
// Remove all conditions
|
//Remove all conditions
|
||||||
GetCondition().EndCondition(player, null, null);
|
GetCondition().EndCondition(player, null, null);
|
||||||
for (PotionEffect potion : player.getActivePotionEffects())
|
for (PotionEffect potion : player.getActivePotionEffects())
|
||||||
player.removePotionEffect(potion.getType());
|
player.removePotionEffect(potion.getType());
|
||||||
@ -1037,8 +1037,9 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
{
|
{
|
||||||
TimingManager.start("ArcadeManager LoadFiles");
|
TimingManager.start("ArcadeManager LoadFiles");
|
||||||
|
|
||||||
File folder = new File(".." + File.separatorChar + ".." + File.separatorChar + "update" + File.separatorChar + "maps" + File.separatorChar + gameName);
|
File folder = new File(".." + File.separatorChar + ".." + File.separatorChar + "update" + File.separatorChar
|
||||||
System.out.println(folder.getAbsolutePath() + " -=-=-=-=-=");
|
+ "maps" + File.separatorChar + gameName);
|
||||||
|
System.out.println(folder.getAbsolutePath()+" -=-=-=-=-=" );
|
||||||
if (!folder.exists())
|
if (!folder.exists())
|
||||||
folder.mkdirs();
|
folder.mkdirs();
|
||||||
|
|
||||||
@ -1345,7 +1346,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void cosmeticState(GameStateChangeEvent event)
|
public void cosmeticState(GameStateChangeEvent event)
|
||||||
{
|
{
|
||||||
// Disable
|
//Disable
|
||||||
if (event.GetState() == GameState.Recruit)
|
if (event.GetState() == GameState.Recruit)
|
||||||
{
|
{
|
||||||
getCosmeticManager().setActive(true);
|
getCosmeticManager().setActive(true);
|
||||||
@ -1386,44 +1387,53 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
getCosmeticManager().getGadgetManager().setGadgetEnabled(playerCount <= 40);
|
getCosmeticManager().getGadgetManager().setGadgetEnabled(playerCount <= 40);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*public void saveBasicStats(final Game game)
|
||||||
* public void saveBasicStats(final Game game) { if (!IsTournamentServer())
|
{
|
||||||
* return;
|
if (!IsTournamentServer())
|
||||||
*
|
return;
|
||||||
* final Map<UUID, Boolean> data = new HashMap<>();
|
|
||||||
*
|
|
||||||
* for (Player loser : game.getLosers()) data.put(loser.getUniqueId(),
|
|
||||||
* false);
|
|
||||||
*
|
|
||||||
* for (Player winner : game.getWinners()) data.put(winner.getUniqueId(),
|
|
||||||
* true);
|
|
||||||
*
|
|
||||||
* Bukkit.getScheduler().runTaskAsynchronously(getPlugin(), new Runnable() {
|
|
||||||
*
|
|
||||||
* @Override public void run() {
|
|
||||||
* getArcadeRepository().saveBasicStats(game.GetType(),
|
|
||||||
* IsTournamentServer(), (int) (System.currentTimeMillis() -
|
|
||||||
* game.getGameLiveTime()), data); } }); }
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
final Map<UUID, Boolean> data = new HashMap<>();
|
||||||
* public void saveLeaderboardStats(Game game) { final TournamentType type =
|
|
||||||
* TournamentType.getTournamentType(game.GetType());
|
for (Player loser : game.getLosers())
|
||||||
*
|
data.put(loser.getUniqueId(), false);
|
||||||
* if (type != null) { final Map<UUID, Boolean> data = new HashMap<>();
|
|
||||||
*
|
for (Player winner : game.getWinners())
|
||||||
* for (Player loser : game.getLosers()) data.put(loser.getUniqueId(),
|
data.put(winner.getUniqueId(), true);
|
||||||
* false);
|
|
||||||
*
|
Bukkit.getScheduler().runTaskAsynchronously(getPlugin(), new Runnable()
|
||||||
* for (Player winner : game.getWinners()) data.put(winner.getUniqueId(),
|
{
|
||||||
* true);
|
@Override
|
||||||
*
|
public void run()
|
||||||
* Bukkit.getScheduler().runTaskAsynchronously(getPlugin(), new Runnable() {
|
{
|
||||||
*
|
getArcadeRepository().saveBasicStats(game.GetType(), IsTournamentServer(), (int) (System.currentTimeMillis() - game.getGameLiveTime()), data);
|
||||||
* @Override public void run() {
|
}
|
||||||
* getArcadeRepository().saveLeaderboardStats(0, type.ordinal(), data); }
|
});
|
||||||
* }); } }
|
}*/
|
||||||
*/
|
|
||||||
|
/*public void saveLeaderboardStats(Game game)
|
||||||
|
{
|
||||||
|
final TournamentType type = TournamentType.getTournamentType(game.GetType());
|
||||||
|
|
||||||
|
if (type != null)
|
||||||
|
{
|
||||||
|
final Map<UUID, Boolean> data = new HashMap<>();
|
||||||
|
|
||||||
|
for (Player loser : game.getLosers())
|
||||||
|
data.put(loser.getUniqueId(), false);
|
||||||
|
|
||||||
|
for (Player winner : game.getWinners())
|
||||||
|
data.put(winner.getUniqueId(), true);
|
||||||
|
|
||||||
|
Bukkit.getScheduler().runTaskAsynchronously(getPlugin(), new Runnable()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
getArcadeRepository().saveLeaderboardStats(0, type.ordinal(), data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
public boolean isGameInProgress()
|
public boolean isGameInProgress()
|
||||||
{
|
{
|
||||||
@ -1494,7 +1504,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
_energy.registerSelf();
|
_energy.registerSelf();
|
||||||
_eloManager.registerSelf();
|
_eloManager.registerSelf();
|
||||||
|
|
||||||
// Class Shop
|
//Class Shop
|
||||||
_plugin.getServer().getPluginManager().registerEvents(_classShop, _plugin);
|
_plugin.getServer().getPluginManager().registerEvents(_classShop, _plugin);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1506,7 +1516,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
_energy.deregisterSelf();
|
_energy.deregisterSelf();
|
||||||
_eloManager.deregisterSelf();
|
_eloManager.deregisterSelf();
|
||||||
|
|
||||||
// Class Shop
|
//Class Shop
|
||||||
HandlerList.unregisterAll(_classShop);
|
HandlerList.unregisterAll(_classShop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1526,8 +1536,8 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
if (teleport)
|
if (teleport)
|
||||||
player.teleport(GetGame().GetSpectatorLocation());
|
player.teleport(GetGame().GetSpectatorLocation());
|
||||||
|
|
||||||
// Set Spec State
|
//Set Spec State
|
||||||
UtilAction.velocity(player, new Vector(0, 1, 0));
|
UtilAction.velocity(player, new Vector(0,1,0));
|
||||||
player.setAllowFlight(true);
|
player.setAllowFlight(true);
|
||||||
player.setFlying(true);
|
player.setFlying(true);
|
||||||
player.setFlySpeed(0.1f);
|
player.setFlySpeed(0.1f);
|
||||||
@ -1537,7 +1547,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
|
|
||||||
GetCondition().Factory().Cloak("Spectator", player, player, 7777, true, true);
|
GetCondition().Factory().Cloak("Spectator", player, player, 7777, true, true);
|
||||||
|
|
||||||
// Game Team
|
//Game Team
|
||||||
GetGame().GetScoreboard().SetPlayerTeam(player, "SPEC");
|
GetGame().GetScoreboard().SetPlayerTeam(player, "SPEC");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1552,9 +1562,9 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
{
|
{
|
||||||
_requiredRank = null;
|
_requiredRank = null;
|
||||||
|
|
||||||
for (File file : new File(".").listFiles())
|
for(File file : new File(".").listFiles())
|
||||||
{
|
{
|
||||||
if (!file.getName().startsWith("RequiredRank"))
|
if(!file.getName().startsWith("RequiredRank"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -1582,7 +1592,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
_requiredRank = rank;
|
_requiredRank = rank;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority=EventPriority.LOWEST)
|
||||||
public void explosionCancel(EntityExplodeEvent event)
|
public void explosionCancel(EntityExplodeEvent event)
|
||||||
{
|
{
|
||||||
if (GetGame() == null || !GetGame().InProgress())
|
if (GetGame() == null || !GetGame().InProgress())
|
||||||
@ -1627,8 +1637,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether this server has a file, stating that it allows game
|
* Returns whether this server has a file, stating that it allows game commands.
|
||||||
* commands.
|
|
||||||
*
|
*
|
||||||
* @return Whether this server is in game command mode.
|
* @return Whether this server is in game command mode.
|
||||||
*/
|
*/
|
||||||
@ -1648,8 +1657,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
/**
|
/**
|
||||||
* Sets this server's game command mode state.
|
* Sets this server's game command mode state.
|
||||||
*
|
*
|
||||||
* @param state
|
* @param state Whether to enable or disable game commands.
|
||||||
* Whether to enable or disable game commands.
|
|
||||||
*/
|
*/
|
||||||
public void setGameCommandMode(boolean state)
|
public void setGameCommandMode(boolean state)
|
||||||
{
|
{
|
||||||
@ -1661,8 +1669,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
|||||||
* <p>
|
* <p>
|
||||||
* Sends a denial alert if they can't.
|
* Sends a denial alert if they can't.
|
||||||
*
|
*
|
||||||
* @param player
|
* @param player The player attempting to use the command.
|
||||||
* The player attempting to use the command.
|
|
||||||
* @return Whether or not the player can successfully use the command.
|
* @return Whether or not the player can successfully use the command.
|
||||||
*/
|
*/
|
||||||
public boolean canPlayerUseGameCmd(Player player)
|
public boolean canPlayerUseGameCmd(Player player)
|
||||||
|
Loading…
Reference in New Issue
Block a user