Merge branch 'master' of ssh://dev1.mineplex.com:7999/min/master
This commit is contained in:
commit
43c3f8cc87
@ -82,7 +82,7 @@ public abstract class Game implements Listener
|
|||||||
private ArrayList<GameTeam> _teamList = new ArrayList<GameTeam>();
|
private ArrayList<GameTeam> _teamList = new ArrayList<GameTeam>();
|
||||||
|
|
||||||
//Player Preferences
|
//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<GameTeam, ArrayList<Player>> _teamPreference = new NautHashMap<GameTeam, ArrayList<Player>>();
|
||||||
private NautHashMap<Player, HashMap<String,GemData>> _gemCount = new NautHashMap<Player, HashMap<String,GemData>>();
|
private NautHashMap<Player, HashMap<String,GemData>> _gemCount = new NautHashMap<Player, HashMap<String,GemData>>();
|
||||||
|
|
||||||
|
@ -96,6 +96,7 @@ public class TurfForts extends TeamGame
|
|||||||
this.BlockBreakAllow.add(35);
|
this.BlockBreakAllow.add(35);
|
||||||
this.ItemDrop = false;
|
this.ItemDrop = false;
|
||||||
this.ItemPickup = false;
|
this.ItemPickup = false;
|
||||||
|
this.DamageSelf = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -133,6 +134,8 @@ public class TurfForts extends TeamGame
|
|||||||
|
|
||||||
if (event.GetLog().GetKiller() == null)
|
if (event.GetLog().GetKiller() == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Player killed = (Player)event.GetEvent().getEntity();
|
||||||
|
|
||||||
Player killer = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName());
|
Player killer = UtilPlayer.searchExact(event.GetLog().GetKiller().GetName());
|
||||||
if (killer == null)
|
if (killer == null)
|
||||||
@ -140,6 +143,12 @@ public class TurfForts extends TeamGame
|
|||||||
|
|
||||||
if (GetTeam(killer) == null)
|
if (GetTeam(killer) == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (GetTeam(killed) == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (GetTeam(killer).equals(GetTeam(killed)))
|
||||||
|
return;
|
||||||
|
|
||||||
if (GetTeam(killer).GetColor() == ChatColor.RED)
|
if (GetTeam(killer).GetColor() == ChatColor.RED)
|
||||||
{
|
{
|
||||||
@ -325,6 +334,9 @@ public class TurfForts extends TeamGame
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void Damage(CustomDamageEvent event)
|
public void Damage(CustomDamageEvent event)
|
||||||
{
|
{
|
||||||
|
if (event.IsCancelled())
|
||||||
|
return;
|
||||||
|
|
||||||
if (!_fight)
|
if (!_fight)
|
||||||
{
|
{
|
||||||
event.SetCancelled("Build Time");
|
event.SetCancelled("Build Time");
|
||||||
|
@ -15,6 +15,7 @@ import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
|
|||||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||||
|
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
|
import mineplex.core.common.util.F;
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
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.ArcadeManager;
|
||||||
import nautilus.game.arcade.GameType;
|
import nautilus.game.arcade.GameType;
|
||||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||||
|
import nautilus.game.arcade.game.GameTeam;
|
||||||
import nautilus.game.arcade.game.SoloGame;
|
import nautilus.game.arcade.game.SoloGame;
|
||||||
import nautilus.game.arcade.game.GameTeam.PlayerState;
|
import nautilus.game.arcade.game.GameTeam.PlayerState;
|
||||||
import nautilus.game.arcade.game.standalone.smash.kits.*;
|
import nautilus.game.arcade.game.standalone.smash.kits.*;
|
||||||
@ -209,4 +211,28 @@ public class SuperSmash extends SoloGame
|
|||||||
{
|
{
|
||||||
event.getDrops().clear();
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ public class KitBlaze extends SmashKit
|
|||||||
|
|
||||||
//Disguise
|
//Disguise
|
||||||
DisguiseBlaze disguise = new DisguiseBlaze(player);
|
DisguiseBlaze disguise = new DisguiseBlaze(player);
|
||||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
disguise.SetName(C.cYellow + player.getName());
|
||||||
disguise.SetCustomNameVisible(true);
|
disguise.SetCustomNameVisible(true);
|
||||||
Manager.GetDisguise().disguise(disguise);
|
Manager.GetDisguise().disguise(disguise);
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ public class KitChicken extends SmashKit
|
|||||||
|
|
||||||
//Disguise
|
//Disguise
|
||||||
DisguiseChicken disguise = new DisguiseChicken(player);
|
DisguiseChicken disguise = new DisguiseChicken(player);
|
||||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
disguise.SetName(C.cYellow + player.getName());
|
||||||
disguise.SetCustomNameVisible(true);
|
disguise.SetCustomNameVisible(true);
|
||||||
Manager.GetDisguise().disguise(disguise);
|
Manager.GetDisguise().disguise(disguise);
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ public class KitEnderman extends SmashKit
|
|||||||
|
|
||||||
//Disguise
|
//Disguise
|
||||||
DisguiseEnderman disguise = new DisguiseEnderman(player);
|
DisguiseEnderman disguise = new DisguiseEnderman(player);
|
||||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
disguise.SetName(C.cYellow + player.getName());
|
||||||
disguise.SetCustomNameVisible(true);
|
disguise.SetCustomNameVisible(true);
|
||||||
disguise.a(false);
|
disguise.a(false);
|
||||||
Manager.GetDisguise().disguise(disguise);
|
Manager.GetDisguise().disguise(disguise);
|
||||||
|
@ -50,7 +50,7 @@ public class KitGolem extends SmashKit
|
|||||||
|
|
||||||
//Disguise
|
//Disguise
|
||||||
DisguiseIronGolem disguise = new DisguiseIronGolem(player);
|
DisguiseIronGolem disguise = new DisguiseIronGolem(player);
|
||||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
disguise.SetName(C.cYellow + player.getName());
|
||||||
disguise.SetCustomNameVisible(true);
|
disguise.SetCustomNameVisible(true);
|
||||||
Manager.GetDisguise().disguise(disguise);
|
Manager.GetDisguise().disguise(disguise);
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ public class KitKnight extends SmashKit
|
|||||||
|
|
||||||
//Disguise
|
//Disguise
|
||||||
DisguiseSpider disguise = new DisguiseSpider(player);
|
DisguiseSpider disguise = new DisguiseSpider(player);
|
||||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
disguise.SetName(C.cYellow + player.getName());
|
||||||
disguise.SetCustomNameVisible(true);
|
disguise.SetCustomNameVisible(true);
|
||||||
Manager.GetDisguise().disguise(disguise);
|
Manager.GetDisguise().disguise(disguise);
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ public class KitSkeleton extends SmashKit
|
|||||||
|
|
||||||
//Disguise
|
//Disguise
|
||||||
DisguiseSkeleton disguise = new DisguiseSkeleton(player);
|
DisguiseSkeleton disguise = new DisguiseSkeleton(player);
|
||||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
disguise.SetName(C.cYellow + player.getName());
|
||||||
disguise.SetCustomNameVisible(true);
|
disguise.SetCustomNameVisible(true);
|
||||||
Manager.GetDisguise().disguise(disguise);
|
Manager.GetDisguise().disguise(disguise);
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ public class KitSkySquid extends SmashKit
|
|||||||
|
|
||||||
//Disguise
|
//Disguise
|
||||||
DisguiseSquid disguise = new DisguiseSquid(player);
|
DisguiseSquid disguise = new DisguiseSquid(player);
|
||||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
disguise.SetName(C.cYellow + player.getName());
|
||||||
disguise.SetCustomNameVisible(true);
|
disguise.SetCustomNameVisible(true);
|
||||||
Manager.GetDisguise().disguise(disguise);
|
Manager.GetDisguise().disguise(disguise);
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ public class KitSlime extends SmashKit
|
|||||||
|
|
||||||
//Disguise
|
//Disguise
|
||||||
DisguiseSlime disguise = new DisguiseSlime(player);
|
DisguiseSlime disguise = new DisguiseSlime(player);
|
||||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
disguise.SetName(C.cYellow + player.getName());
|
||||||
disguise.SetCustomNameVisible(true);
|
disguise.SetCustomNameVisible(true);
|
||||||
Manager.GetDisguise().disguise(disguise);
|
Manager.GetDisguise().disguise(disguise);
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ public class KitSnowman extends SmashKit
|
|||||||
|
|
||||||
//Disguise
|
//Disguise
|
||||||
DisguiseSnowman disguise = new DisguiseSnowman(player);
|
DisguiseSnowman disguise = new DisguiseSnowman(player);
|
||||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
disguise.SetName(C.cYellow + player.getName());
|
||||||
disguise.SetCustomNameVisible(true);
|
disguise.SetCustomNameVisible(true);
|
||||||
Manager.GetDisguise().disguise(disguise);
|
Manager.GetDisguise().disguise(disguise);
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ public class KitSpider extends SmashKit
|
|||||||
|
|
||||||
//Disguise
|
//Disguise
|
||||||
DisguiseSpider disguise = new DisguiseSpider(player);
|
DisguiseSpider disguise = new DisguiseSpider(player);
|
||||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
disguise.SetName(C.cYellow + player.getName());
|
||||||
disguise.SetCustomNameVisible(true);
|
disguise.SetCustomNameVisible(true);
|
||||||
Manager.GetDisguise().disguise(disguise);
|
Manager.GetDisguise().disguise(disguise);
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ public class KitWitherSkeleton extends SmashKit
|
|||||||
|
|
||||||
//Disguise
|
//Disguise
|
||||||
DisguiseSpider disguise = new DisguiseSpider(player);
|
DisguiseSpider disguise = new DisguiseSpider(player);
|
||||||
disguise.SetName(Manager.GetGame().GetTeam(player).GetColor() + player.getName());
|
disguise.SetName(C.cYellow + player.getName());
|
||||||
disguise.SetCustomNameVisible(true);
|
disguise.SetCustomNameVisible(true);
|
||||||
Manager.GetDisguise().disguise(disguise);
|
Manager.GetDisguise().disguise(disguise);
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ public class PerkSlimeRocket extends Perk implements IThrown
|
|||||||
|
|
||||||
|
|
||||||
DisguiseSlime slime = (DisguiseSlime)Manager.GetDisguise().getDisguise(player);
|
DisguiseSlime slime = (DisguiseSlime)Manager.GetDisguise().getDisguise(player);
|
||||||
if (slime.GetSize() != size)
|
if (slime != null && slime.GetSize() != size)
|
||||||
{
|
{
|
||||||
slime.SetSize(size);
|
slime.SetSize(size);
|
||||||
Manager.GetDisguise().updateDisguise(slime);
|
Manager.GetDisguise().updateDisguise(slime);
|
||||||
|
@ -517,9 +517,9 @@ public class GameLobbyManager implements IPacketRunnable, Listener
|
|||||||
}
|
}
|
||||||
else if (_advertiseStage == 1)
|
else if (_advertiseStage == 1)
|
||||||
{
|
{
|
||||||
WriteAdvertiseLine("BRIDGE ULTRA RANK", 0, 159, (byte)4);
|
WriteAdvertiseLine("GAME ULTRA RANKS", 0, 159, (byte)4);
|
||||||
WriteAdvertiseLine("UNLOCKS EVERY KIT", 1, 159, (byte)15);
|
WriteAdvertiseLine("UNLOCK EVERY KIT", 1, 159, (byte)15);
|
||||||
WriteAdvertiseLine("IN THE BRIDGES", 2, 159, (byte)15);
|
WriteAdvertiseLine("IN THAT GAME", 2, 159, (byte)15);
|
||||||
|
|
||||||
WriteAdvertiseLine("www.mineplex.com", 4, 159, (byte)15);
|
WriteAdvertiseLine("www.mineplex.com", 4, 159, (byte)15);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user