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

This commit is contained in:
Jonathan Williams 2013-09-01 23:28:22 -07:00
commit 43c3f8cc87
16 changed files with 54 additions and 16 deletions

View File

@ -82,7 +82,7 @@ public abstract class Game implements Listener
private ArrayList<GameTeam> _teamList = new ArrayList<GameTeam>();
//Player Preferences
private NautHashMap<Player, Kit> _playerKit = new NautHashMap<Player, Kit>();
protected NautHashMap<Player, Kit> _playerKit = new NautHashMap<Player, Kit>();
private NautHashMap<GameTeam, ArrayList<Player>> _teamPreference = new NautHashMap<GameTeam, ArrayList<Player>>();
private NautHashMap<Player, HashMap<String,GemData>> _gemCount = new NautHashMap<Player, HashMap<String,GemData>>();

View File

@ -96,6 +96,7 @@ public class TurfForts extends TeamGame
this.BlockBreakAllow.add(35);
this.ItemDrop = false;
this.ItemPickup = false;
this.DamageSelf = false;
}
@Override
@ -133,6 +134,8 @@ public class TurfForts extends TeamGame
if (event.GetLog().GetKiller() == null)
return;
Player killed = (Player)event.GetEvent().getEntity();
Player killer = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName());
if (killer == null)
@ -140,6 +143,12 @@ public class TurfForts extends TeamGame
if (GetTeam(killer) == null)
return;
if (GetTeam(killed) == null)
return;
if (GetTeam(killer).equals(GetTeam(killed)))
return;
if (GetTeam(killer).GetColor() == ChatColor.RED)
{
@ -325,6 +334,9 @@ public class TurfForts extends TeamGame
@EventHandler
public void Damage(CustomDamageEvent event)
{
if (event.IsCancelled())
return;
if (!_fight)
{
event.SetCancelled("Build Time");

View File

@ -15,6 +15,7 @@ import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
import org.bukkit.event.entity.PlayerDeathEvent;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
@ -22,6 +23,7 @@ import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.GameTeam;
import nautilus.game.arcade.game.SoloGame;
import nautilus.game.arcade.game.GameTeam.PlayerState;
import nautilus.game.arcade.game.standalone.smash.kits.*;
@ -209,4 +211,28 @@ public class SuperSmash extends SoloGame
{
event.getDrops().clear();
}
@Override
public void SetKit(Player player, Kit kit, boolean announce)
{
GameTeam team = GetTeam(player);
if (team != null)
{
if (!team.KitAllowed(kit))
{
player.playSound(player.getLocation(), Sound.NOTE_BASS, 2f, 0.5f);
UtilPlayer.message(player, F.main("Kit", F.elem(team.GetFormattedName()) + " cannot use " + F.elem(kit.GetFormattedName() + " Kit") + "."));
return;
}
}
_playerKit.put(player, kit);
if (announce)
{
player.playSound(player.getLocation(), Sound.ORB_PICKUP, 2f, 1f);
UtilPlayer.message(player, F.main("Kit", "You equipped " + F.elem(kit.GetFormattedName() + " Kit") + "."));
kit.ApplyKit(player);
}
}
}

View File

@ -57,7 +57,7 @@ public class KitBlaze extends SmashKit
//Disguise
DisguiseBlaze disguise = new DisguiseBlaze(player);
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
disguise.SetName(C.cYellow + player.getName());
disguise.SetCustomNameVisible(true);
Manager.GetDisguise().disguise(disguise);
}

View File

@ -49,7 +49,7 @@ public class KitChicken extends SmashKit
//Disguise
DisguiseChicken disguise = new DisguiseChicken(player);
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
disguise.SetName(C.cYellow + player.getName());
disguise.SetCustomNameVisible(true);
Manager.GetDisguise().disguise(disguise);
}

View File

@ -59,7 +59,7 @@ public class KitEnderman extends SmashKit
//Disguise
DisguiseEnderman disguise = new DisguiseEnderman(player);
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
disguise.SetName(C.cYellow + player.getName());
disguise.SetCustomNameVisible(true);
disguise.a(false);
Manager.GetDisguise().disguise(disguise);

View File

@ -50,7 +50,7 @@ public class KitGolem extends SmashKit
//Disguise
DisguiseIronGolem disguise = new DisguiseIronGolem(player);
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
disguise.SetName(C.cYellow + player.getName());
disguise.SetCustomNameVisible(true);
Manager.GetDisguise().disguise(disguise);
}

View File

@ -46,7 +46,7 @@ public class KitKnight extends SmashKit
//Disguise
DisguiseSpider disguise = new DisguiseSpider(player);
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
disguise.SetName(C.cYellow + player.getName());
disguise.SetCustomNameVisible(true);
Manager.GetDisguise().disguise(disguise);
}

View File

@ -56,7 +56,7 @@ public class KitSkeleton extends SmashKit
//Disguise
DisguiseSkeleton disguise = new DisguiseSkeleton(player);
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
disguise.SetName(C.cYellow + player.getName());
disguise.SetCustomNameVisible(true);
Manager.GetDisguise().disguise(disguise);
}

View File

@ -49,7 +49,7 @@ public class KitSkySquid extends SmashKit
//Disguise
DisguiseSquid disguise = new DisguiseSquid(player);
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
disguise.SetName(C.cYellow + player.getName());
disguise.SetCustomNameVisible(true);
Manager.GetDisguise().disguise(disguise);
}

View File

@ -48,7 +48,7 @@ public class KitSlime extends SmashKit
//Disguise
DisguiseSlime disguise = new DisguiseSlime(player);
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
disguise.SetName(C.cYellow + player.getName());
disguise.SetCustomNameVisible(true);
Manager.GetDisguise().disguise(disguise);

View File

@ -55,7 +55,7 @@ public class KitSnowman extends SmashKit
//Disguise
DisguiseSnowman disguise = new DisguiseSnowman(player);
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
disguise.SetName(C.cYellow + player.getName());
disguise.SetCustomNameVisible(true);
Manager.GetDisguise().disguise(disguise);
}

View File

@ -49,7 +49,7 @@ public class KitSpider extends SmashKit
//Disguise
DisguiseSpider disguise = new DisguiseSpider(player);
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
disguise.SetName(C.cYellow + player.getName());
disguise.SetCustomNameVisible(true);
Manager.GetDisguise().disguise(disguise);
}

View File

@ -47,7 +47,7 @@ public class KitWitherSkeleton extends SmashKit
//Disguise
DisguiseSpider disguise = new DisguiseSpider(player);
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
disguise.SetName(C.cYellow + player.getName());
disguise.SetCustomNameVisible(true);
Manager.GetDisguise().disguise(disguise);
}

View File

@ -62,7 +62,7 @@ public class PerkSlimeRocket extends Perk implements IThrown
DisguiseSlime slime = (DisguiseSlime)Manager.GetDisguise().getDisguise(player);
if (slime.GetSize() != size)
if (slime != null && slime.GetSize() != size)
{
slime.SetSize(size);
Manager.GetDisguise().updateDisguise(slime);

View File

@ -517,9 +517,9 @@ public class GameLobbyManager implements IPacketRunnable, Listener
}
else if (_advertiseStage == 1)
{
WriteAdvertiseLine("BRIDGE ULTRA RANK", 0, 159, (byte)4);
WriteAdvertiseLine("UNLOCKS EVERY KIT", 1, 159, (byte)15);
WriteAdvertiseLine("IN THE BRIDGES", 2, 159, (byte)15);
WriteAdvertiseLine("GAME ULTRA RANKS", 0, 159, (byte)4);
WriteAdvertiseLine("UNLOCK EVERY KIT", 1, 159, (byte)15);
WriteAdvertiseLine("IN THAT GAME", 2, 159, (byte)15);
WriteAdvertiseLine("www.mineplex.com", 4, 159, (byte)15);
}