Merge branch 'master' of ssh://dev.mineplex.com:7999/min/Mineplex

This commit is contained in:
Chisstop 2014-03-05 14:35:01 -08:00
commit 60bc3f15bb
5 changed files with 34 additions and 31 deletions

View File

@ -34,7 +34,7 @@ public class NewsManager extends MiniPlugin
_news = new String[] _news = new String[]
{ {
"New SSM Kit: " + C.cYellow + C.Bold + "Skeletal Horse", "New SSM Kit: " + C.cYellow + C.Bold + "Skeletal Horse",
"Beta Servers Live! " + C.cPurple + C.Bold + "HERO ONLY", "Beta Servers Live! " + C.cPurple + C.Bold + "ULTRA ONLY",
"Beta Game: " + C.cYellow + C.Bold + "Sheep Quest", "Beta Game: " + C.cYellow + C.Bold + "Sheep Quest",
}; };
} }

View File

@ -390,11 +390,15 @@ public class ServerManager extends MiniPlugin
if (partyPlayer == null) if (partyPlayer == null)
continue; continue;
if ((serverInfo.Name.contains("BETA") && !_clientManager.Get(partyPlayer).GetRank().Has(Rank.HERO))) if (serverInfo.Name.contains("BETA"))
{ {
continue; if (!_clientManager.Get(partyPlayer).GetRank().Has(Rank.ULTRA))
continue;
} }
if (!_clientManager.Get(partyPlayer).GetRank().Has(Rank.MODERATOR) && serverInfo.CurrentPlayers >= serverInfo.MaxPlayers * 1.5)
continue;
if (_clientManager.Get(partyPlayer).GetRank().Has(Rank.ULTRA) || _donationManager.Get(partyPlayer.getName()).OwnsUnknownPackage(serverInfo.ServerType + " ULTRA")) if (_clientManager.Get(partyPlayer).GetRank().Has(Rank.ULTRA) || _donationManager.Get(partyPlayer.getName()).OwnsUnknownPackage(serverInfo.ServerType + " ULTRA"))
continue; continue;
@ -411,11 +415,15 @@ public class ServerManager extends MiniPlugin
if (partyPlayer == null) if (partyPlayer == null)
continue; continue;
if ((serverInfo.Name.contains("BETA") && !_clientManager.Get(partyPlayer).GetRank().Has(Rank.HERO))) if (serverInfo.Name.contains("BETA"))
{ {
continue; if (!_clientManager.Get(partyPlayer).GetRank().Has(Rank.ULTRA))
continue;
} }
if (!_clientManager.Get(partyPlayer).GetRank().Has(Rank.MODERATOR) && serverInfo.CurrentPlayers >= serverInfo.MaxPlayers * 1.5)
continue;
if (_clientManager.Get(partyPlayer).GetRank().Has(Rank.ULTRA) || _donationManager.Get(partyPlayer.getName()).OwnsUnknownPackage(serverInfo.ServerType + " ULTRA")) if (_clientManager.Get(partyPlayer).GetRank().Has(Rank.ULTRA) || _donationManager.Get(partyPlayer.getName()).OwnsUnknownPackage(serverInfo.ServerType + " ULTRA"))
{ {
partyPlayer.leaveVehicle(); partyPlayer.leaveVehicle();

View File

@ -61,15 +61,14 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
int slot = 10; int slot = 10;
int greenCount = 0; int greenCount = 0;
int yellowCount = 0; int yellowCount = 0;
String openFull = ChatColor.RESET + C.Line + "Get Ultra to join full servers!"; String openFull = ChatColor.RESET + C.Line + "Get Ultra to join full servers!";
String beta = ChatColor.RESET + C.Line + "Get Hero to join Beta servers!"; String beta = ChatColor.RESET + C.Line + "Get Ultra to join Beta servers!";
String openFullUltra = ChatColor.RESET + C.Line + "Click to join!"; String openFullUltra = ChatColor.RESET + C.Line + "Click to join!";
for (ServerInfo serverInfo : serverList) for (ServerInfo serverInfo : serverList)
{ {
boolean ownsUltraPackage = DonationManager.Get(Player.getName()).OwnsUnknownPackage(serverInfo.ServerType + " ULTRA") || Client.GetRank().Has(Rank.ULTRA); boolean ownsUltraPackage = DonationManager.Get(Player.getName()).OwnsUnknownPackage(serverInfo.ServerType + " ULTRA") || Client.GetRank().Has(Rank.ULTRA);
boolean hero = Client.GetRank().Has(Rank.HERO);
String inProgress = (serverInfo.Game == null || serverInfo.ServerType.equalsIgnoreCase("Competitive")) ? (ChatColor.RESET + C.Line + "Game in progress.") : (ChatColor.RESET + C.Line + "Click to spectate"); String inProgress = (serverInfo.Game == null || serverInfo.ServerType.equalsIgnoreCase("Competitive")) ? (ChatColor.RESET + C.Line + "Game in progress.") : (ChatColor.RESET + C.Line + "Click to spectate");
String inProgressLine2 = (serverInfo.Game == null || serverInfo.ServerType.equalsIgnoreCase("Competitive")) ? null : (ChatColor.RESET + C.Line + "and wait for next game!"); String inProgressLine2 = (serverInfo.Game == null || serverInfo.ServerType.equalsIgnoreCase("Competitive")) ? null : (ChatColor.RESET + C.Line + "and wait for next game!");
@ -99,7 +98,7 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
lore.add(ChatColor.RESET + ""); lore.add(ChatColor.RESET + "");
lore.add(ChatColor.RESET + serverInfo.MOTD); lore.add(ChatColor.RESET + serverInfo.MOTD);
if (serverInfo.Name.contains("BETA") && !hero) if (serverInfo.Name.contains("BETA") && !ownsUltraPackage)
{ {
lore.add(beta); lore.add(beta);
} }

View File

@ -19,18 +19,13 @@ import org.bukkit.GameMode;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftEntity; import org.bukkit.craftbukkit.v1_6_R3.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer; import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
import org.bukkit.entity.Chicken;
import org.bukkit.entity.Entity;
import org.bukkit.entity.IronGolem;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.entity.Skeleton;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.block.BlockBurnEvent; import org.bukkit.event.block.BlockBurnEvent;
import org.bukkit.event.block.BlockFadeEvent; import org.bukkit.event.block.BlockFadeEvent;
import org.bukkit.event.block.BlockSpreadEvent; import org.bukkit.event.block.BlockSpreadEvent;
import org.bukkit.event.block.LeavesDecayEvent; import org.bukkit.event.block.LeavesDecayEvent;
import org.bukkit.event.entity.CreatureSpawnEvent; import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerLoginEvent; import org.bukkit.event.player.PlayerLoginEvent;
import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerQuitEvent;
@ -39,9 +34,11 @@ import org.bukkit.event.server.ServerListPingEvent;
import mineplex.minecraft.game.classcombat.Class.ClassManager; import mineplex.minecraft.game.classcombat.Class.ClassManager;
import mineplex.minecraft.game.classcombat.Class.IPvpClass; import mineplex.minecraft.game.classcombat.Class.IPvpClass;
import mineplex.minecraft.game.classcombat.Skill.SkillFactory; import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
import mineplex.minecraft.game.classcombat.itempack.ItemPackFactory;
import mineplex.minecraft.game.classcombat.shop.ClassCombatCustomBuildShop; import mineplex.minecraft.game.classcombat.shop.ClassCombatCustomBuildShop;
import mineplex.minecraft.game.classcombat.shop.ClassShopManager; import mineplex.minecraft.game.classcombat.shop.ClassShopManager;
import mineplex.minecraft.game.core.IRelation; import mineplex.minecraft.game.core.IRelation;
import mineplex.minecraft.game.core.combat.CombatManager;
import mineplex.minecraft.game.core.condition.ConditionManager; import mineplex.minecraft.game.core.condition.ConditionManager;
import mineplex.minecraft.game.core.condition.Condition.ConditionType; import mineplex.minecraft.game.core.condition.Condition.ConditionType;
import mineplex.minecraft.game.core.damage.DamageManager; import mineplex.minecraft.game.core.damage.DamageManager;
@ -58,7 +55,9 @@ import mineplex.core.common.util.*;
import mineplex.core.creature.Creature; import mineplex.core.creature.Creature;
import mineplex.core.disguise.DisguiseManager; import mineplex.core.disguise.DisguiseManager;
import mineplex.core.donation.DonationManager; import mineplex.core.donation.DonationManager;
import mineplex.core.movement.Movement;
import mineplex.core.packethandler.PacketHandler; import mineplex.core.packethandler.PacketHandler;
import mineplex.core.energy.Energy;
import mineplex.core.explosion.Explosion; import mineplex.core.explosion.Explosion;
import mineplex.core.portal.Portal; import mineplex.core.portal.Portal;
import mineplex.core.projectile.ProjectileManager; import mineplex.core.projectile.ProjectileManager;
@ -140,16 +139,17 @@ public class ArcadeManager extends MiniPlugin implements IRelation
_firework = new FireworkHandler(); _firework = new FireworkHandler();
_fire = new Fire(plugin, conditionManager, damageManager); _fire = new Fire(plugin, conditionManager, damageManager);
_projectileManager = new ProjectileManager(plugin); _projectileManager = new ProjectileManager(plugin);
/*
_skillFactory = new SkillFactory(plugin, damageManager, this, new CombatManager(plugin), conditionManager, _projectileManager, _blockRestore, _fire, new Movement(plugin), plugin.GetTeleport(), new Energy(plugin), webAddress);
_classManager = new ClassManager(plugin, clientManager, donationManager, _skillFactory, webAddress);
_classShopManager = new ClassShopManager(_plugin, _classManager, _skillFactory, new ItemPackFactory(_plugin));
_classCustomBuildShop = new ClassCombatCustomBuildShop(_classShopManager, clientManager, donationManager, webAddress);
*/
if (serverConfig.GameList.contains(GameType.Champions))
{
_skillFactory = new SkillFactory(plugin, damageManager, this, new CombatManager(plugin), conditionManager, _projectileManager, _blockRestore, _fire, new Movement(plugin), plugin.GetTeleport(), new Energy(plugin), webAddress);
_classManager = new ClassManager(plugin, clientManager, donationManager, _skillFactory, webAddress);
_classShopManager = new ClassShopManager(_plugin, _classManager, _skillFactory, new ItemPackFactory(_plugin));
_classCustomBuildShop = new ClassCombatCustomBuildShop(_classShopManager, clientManager, donationManager, webAddress);
}
//_statsManager = new StatsManager(plugin); //_statsManager = new StatsManager(plugin);
_portal = portal; _portal = portal;

View File

@ -74,8 +74,8 @@ public class Champions extends TeamGame
this.PrepareFreeze = false; this.PrepareFreeze = false;
this.DeathSpectateSecs = 8; this.DeathSpectateSecs = 8;
//_shop = new ClassCombatCustomBuildShop(null, null, manager.GetDonation(), "Class Setup"); _shop = new ClassCombatCustomBuildShop(null, null, manager.GetDonation(), "Class Setup");
} }
@Override @Override
@ -96,8 +96,7 @@ public class Champions extends TeamGame
_emerald.add(new Emerald(this, loc)); _emerald.add(new Emerald(this, loc));
} }
/* NPCs /*
for (Location loc : WorldData.GetDataLocs("GRAY")) //Knight for (Location loc : WorldData.GetDataLocs("GRAY")) //Knight
SpawnNPC(Knight, loc); SpawnNPC(Knight, loc);
@ -112,8 +111,7 @@ public class Champions extends TeamGame
for (Location loc : WorldData.GetDataLocs("ORANGE")) //Mage for (Location loc : WorldData.GetDataLocs("ORANGE")) //Mage
SpawnNPC(Mage, loc); SpawnNPC(Mage, loc);
*/
*/
} }
@EventHandler @EventHandler
@ -122,11 +120,9 @@ public class Champions extends TeamGame
if (event.GetState() != GameState.Recruit) if (event.GetState() != GameState.Recruit)
return; return;
/*
for (GameTeam team : GetTeamList()) for (GameTeam team : GetTeamList())
if (team.GetColor() == ChatColor.AQUA) if (team.GetColor() == ChatColor.AQUA)
team.SetColor(ChatColor.BLUE); team.SetColor(ChatColor.BLUE);
*/
} }
@EventHandler @EventHandler