Add SmasgDom, Smash Glags, Tiny Smash, Smash Sheep, Sky Smash, Changing Kits and OP Sheep
This commit is contained in:
parent
b34d652617
commit
7a55b131d4
@ -21,6 +21,7 @@ import nautilus.game.arcade.game.games.castlesiege.CastleSiege;
|
||||
import nautilus.game.arcade.game.games.champions.ChampionsCTF;
|
||||
import nautilus.game.arcade.game.games.champions.ChampionsDominate;
|
||||
import nautilus.game.arcade.game.games.champions.ChampionsTDM;
|
||||
import nautilus.game.arcade.game.games.champions.modes.SmashDom;
|
||||
import nautilus.game.arcade.game.games.christmas.Christmas;
|
||||
import nautilus.game.arcade.game.games.deathtag.DeathTag;
|
||||
import nautilus.game.arcade.game.games.dragonescape.DragonEscape;
|
||||
@ -34,6 +35,7 @@ import nautilus.game.arcade.game.games.evolution.Evolution;
|
||||
import nautilus.game.arcade.game.games.gladiators.Gladiators;
|
||||
import nautilus.game.arcade.game.games.gladiators.modes.ChampionsGladiators;
|
||||
import nautilus.game.arcade.game.games.gladiators.modes.OverpoweredGladiators;
|
||||
import nautilus.game.arcade.game.games.gladiators.modes.SmashGladiators;
|
||||
import nautilus.game.arcade.game.games.gravity.Gravity;
|
||||
import nautilus.game.arcade.game.games.halloween.Halloween;
|
||||
import nautilus.game.arcade.game.games.hideseek.HideSeek;
|
||||
@ -44,6 +46,7 @@ import nautilus.game.arcade.game.games.lobbers.BombLobbers;
|
||||
import nautilus.game.arcade.game.games.micro.Micro;
|
||||
import nautilus.game.arcade.game.games.micro.modes.CookieFight;
|
||||
import nautilus.game.arcade.game.games.micro.modes.OverpoweredMicroBattles;
|
||||
import nautilus.game.arcade.game.games.micro.modes.TinySmash;
|
||||
import nautilus.game.arcade.game.games.micro.modes.TinyWinners;
|
||||
import nautilus.game.arcade.game.games.milkcow.MilkCow;
|
||||
import nautilus.game.arcade.game.games.minecraftleague.MinecraftLeague;
|
||||
@ -62,9 +65,12 @@ import nautilus.game.arcade.game.games.runner.modes.FasterThanLight;
|
||||
import nautilus.game.arcade.game.games.searchanddestroy.SearchAndDestroy;
|
||||
import nautilus.game.arcade.game.games.sheep.SheepGame;
|
||||
import nautilus.game.arcade.game.games.sheep.modes.EweHeroes;
|
||||
import nautilus.game.arcade.game.games.sheep.modes.OverpoweredSheepQuest;
|
||||
import nautilus.game.arcade.game.games.sheep.modes.SmashSheep;
|
||||
import nautilus.game.arcade.game.games.skywars.SoloSkywars;
|
||||
import nautilus.game.arcade.game.games.skywars.TeamSkywars;
|
||||
import nautilus.game.arcade.game.games.skywars.modes.OverpoweredSkywars;
|
||||
import nautilus.game.arcade.game.games.skywars.modes.SkySmash;
|
||||
import nautilus.game.arcade.game.games.skywars.modes.UHCSkywars;
|
||||
import nautilus.game.arcade.game.games.smash.SoloSuperSmash;
|
||||
import nautilus.game.arcade.game.games.smash.SuperSmashDominate;
|
||||
@ -81,6 +87,7 @@ import nautilus.game.arcade.game.games.squidshooter.SquidShooter;
|
||||
import nautilus.game.arcade.game.games.stacker.Stacker;
|
||||
import nautilus.game.arcade.game.games.survivalgames.SoloSurvivalGames;
|
||||
import nautilus.game.arcade.game.games.survivalgames.TeamSurvivalGames;
|
||||
import nautilus.game.arcade.game.games.survivalgames.modes.ChangingKits;
|
||||
import nautilus.game.arcade.game.games.survivalgames.modes.OverpoweredSurvival;
|
||||
import nautilus.game.arcade.game.games.survivalgames.modes.UHCSurvivalgames;
|
||||
import nautilus.game.arcade.game.games.tug.Tug;
|
||||
@ -198,20 +205,37 @@ public enum GameType
|
||||
GameType.WitherAssault, GameType.Wizards, GameType.ZombieSurvival}, true),
|
||||
|
||||
Brawl(null, new GameMode[]{
|
||||
new GameMode(OverpoweredBridge.class, GameType.Bridge, "OP Bridges"), new GameMode(SpeedBridges.class, GameType.Bridge, "Speed Bridges"), new GameMode(LuckyBridges.class, GameType.Bridge, "Lucky Bridges"),
|
||||
new GameMode(OverpoweredGladiators.class, GameType.Gladiators, "OP Gladiators"), new GameMode(ChampionsGladiators.class, GameType.Gladiators, "Champions Gladiators"),
|
||||
new GameMode(OverpoweredSkywars.class, GameType.Skywars, "OP Skywars"), new GameMode(UHCSkywars.class, GameType.Skywars, "UHC Skywars"),
|
||||
new GameMode(TeamBuild.class, GameType.Build, "Team Master Builders"), new GameMode(DukesOfDecoration.class, GameType.Build, "Dukes Of Decoration"),
|
||||
new GameMode(CutClean.class, GameType.UHC, "Cut Clean"), new GameMode(GodBattles.class, GameType.UHC, "God Battles"),
|
||||
new GameMode(BloodDiamonds.class, GameType.UHC, "Blood Diamonds"), new GameMode(Assassins.class, GameType.UHC, "Assassins"),
|
||||
new GameMode(OverpoweredSurvival.class, GameType.SurvivalGames, "OP Survival Games"), new GameMode(UHCSurvivalgames.class, GameType.SurvivalGames, "UHC Survivalgames"),
|
||||
new GameMode(TinyWinners.class, GameType.Micro, "Tiny Winners"), new GameMode(OverpoweredMicroBattles.class, GameType.Micro, "OP Micro Battles"), new GameMode(CookieFight.class, GameType.Micro, "Cookie Fight"),
|
||||
new GameMode(UltraSpleef.class, GameType.Spleef, "Ultra Spleef"),
|
||||
new GameMode(RandomKitSSM.class, GameType.Smash, "Random Kit SSM"),
|
||||
new GameMode(EweHeroes.class, GameType.Sheep, "Heroes Of The Ewe"),
|
||||
new GameMode(FasterThanLight.class, GameType.Runner, "Faster Than Light"),
|
||||
new GameMode(BunnyHop.class, GameType.Quiver, "Bunny Hop"),
|
||||
new GameMode(Countdown.class, GameType.HideSeek, "Countdown"),
|
||||
new GameMode(OverpoweredBridge.class, GameType.Bridge, "OP Bridges"),
|
||||
new GameMode(SpeedBridges.class, GameType.Bridge, "Speed Bridges"),
|
||||
new GameMode(LuckyBridges.class, GameType.Bridge, "Lucky Bridges"),
|
||||
new GameMode(OverpoweredGladiators.class, GameType.Gladiators, "OP Gladiators"),
|
||||
new GameMode(ChampionsGladiators.class, GameType.Gladiators, "Champions Gladiators"),
|
||||
new GameMode(SmashGladiators.class, GameType.Gladiators, "Smash Gladiators"),
|
||||
new GameMode(OverpoweredSkywars.class, GameType.Skywars, "OP Skywars"),
|
||||
new GameMode(UHCSkywars.class, GameType.Skywars, "UHC Skywars"),
|
||||
new GameMode(SkySmash.class, GameType.Skywars, "Sky Smash"),
|
||||
new GameMode(TeamBuild.class, GameType.Build, "Team Master Builders"),
|
||||
new GameMode(DukesOfDecoration.class, GameType.Build, "Dukes Of Decoration"),
|
||||
new GameMode(CutClean.class, GameType.UHC, "Cut Clean"),
|
||||
new GameMode(GodBattles.class, GameType.UHC, "God Battles"),
|
||||
new GameMode(BloodDiamonds.class, GameType.UHC, "Blood Diamonds"),
|
||||
new GameMode(Assassins.class, GameType.UHC, "Assassins"),
|
||||
new GameMode(OverpoweredSurvival.class, GameType.SurvivalGames, "OP Survival Games"),
|
||||
new GameMode(UHCSurvivalgames.class, GameType.SurvivalGames, "UHC Survivalgames"),
|
||||
new GameMode(ChangingKits.class, GameType.SurvivalGames, "Changing Kits"),
|
||||
new GameMode(TinyWinners.class, GameType.Micro, "Tiny Winners"),
|
||||
new GameMode(OverpoweredMicroBattles.class, GameType.Micro, "OP Micro Battles"),
|
||||
new GameMode(CookieFight.class, GameType.Micro, "Cookie Fight"),
|
||||
new GameMode(TinySmash.class, GameType.Micro, "Tiny Smash"),
|
||||
new GameMode(UltraSpleef.class, GameType.Spleef, "Ultra Spleef"),
|
||||
new GameMode(RandomKitSSM.class, GameType.Smash, "Random Kit SSM"),
|
||||
new GameMode(EweHeroes.class, GameType.Sheep, "Heroes Of The Ewe"),
|
||||
new GameMode(SmashSheep.class, GameType.Sheep, "Smash Sheep"),
|
||||
new GameMode(OverpoweredSheepQuest.class, GameType.Sheep, "OP Sheep Quest"),
|
||||
new GameMode(FasterThanLight.class, GameType.Runner, "Faster Than Light"),
|
||||
new GameMode(BunnyHop.class, GameType.Quiver, "Bunny Hop"),
|
||||
new GameMode(Countdown.class, GameType.HideSeek, "Countdown"),
|
||||
new GameMode(SmashDom.class, GameType.ChampionsDominate, "Smash Dominate"),
|
||||
}, GameDisplay.Brawl, null, false, null, false, true);
|
||||
|
||||
GameDisplay _display;
|
||||
|
@ -853,6 +853,11 @@ public abstract class Game implements Listener
|
||||
}
|
||||
|
||||
public void SetKit(Player player, Kit kit, boolean announce)
|
||||
{
|
||||
SetKit(player, kit, announce, true);
|
||||
}
|
||||
|
||||
public void SetKit(Player player, Kit kit, boolean announce, boolean apply)
|
||||
{
|
||||
GameTeam team = GetTeam(player);
|
||||
if (team != null)
|
||||
@ -883,7 +888,7 @@ public abstract class Game implements Listener
|
||||
UtilPlayer.message(player, F.main("Kit", "You equipped " + F.elem(kit.GetFormattedName() + " Kit") + "."));
|
||||
}
|
||||
|
||||
if (InProgress())
|
||||
if (InProgress() && apply)
|
||||
{
|
||||
kit.ApplyKit(player);
|
||||
}
|
||||
|
@ -0,0 +1,106 @@
|
||||
package nautilus.game.arcade.game.games.champions.modes;
|
||||
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.game.games.common.Domination;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitBlaze;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitChicken;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitCow;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitCreeper;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitEnderman;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitGolem;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitMagmaCube;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitPig;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSheep;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSkeletalHorse;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSkeleton;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSkySquid;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSlime;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSnowman;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSpider;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitWitch;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitWitherSkeleton;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitWolf;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitZombie;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
|
||||
/**
|
||||
* SmashDom
|
||||
*
|
||||
* @author xXVevzZXx
|
||||
*/
|
||||
public class SmashDom extends Domination
|
||||
{
|
||||
|
||||
public SmashDom(ArcadeManager manager)
|
||||
{
|
||||
super(manager, GameType.Brawl, new Kit[]
|
||||
{
|
||||
new KitSkeleton(manager),
|
||||
new KitGolem(manager),
|
||||
new KitSpider(manager),
|
||||
new KitSlime(manager),
|
||||
|
||||
new KitCreeper(manager),
|
||||
new KitEnderman(manager),
|
||||
new KitSnowman(manager),
|
||||
new KitWolf(manager),
|
||||
|
||||
|
||||
new KitBlaze(manager),
|
||||
new KitWitch(manager),
|
||||
new KitChicken(manager),
|
||||
new KitSkeletalHorse(manager),
|
||||
new KitPig(manager),
|
||||
new KitSkySquid(manager),
|
||||
new KitWitherSkeleton(manager),
|
||||
new KitMagmaCube(manager),
|
||||
new KitZombie(manager),
|
||||
new KitCow(manager),
|
||||
|
||||
new KitSheep(manager)
|
||||
});
|
||||
|
||||
|
||||
Manager.GetDamage().UseSimpleWeaponDamage = false;
|
||||
Manager.getCosmeticManager().setHideParticles(true);
|
||||
|
||||
Manager.getClassManager().GetItemFactory().getProximityManager().setProxyLimit(6);
|
||||
|
||||
this.StrictAntiHack = true;
|
||||
|
||||
InventoryOpenChest = true;
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void noFallDamage(CustomDamageEvent event)
|
||||
{
|
||||
if (event.IsCancelled())
|
||||
return;
|
||||
|
||||
if (event.GetCause() == DamageCause.FALL)
|
||||
event.SetCancelled("No Fall Damage");
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void customKnockback(CustomDamageEvent event)
|
||||
{
|
||||
if (event.IsCancelled())
|
||||
return;
|
||||
|
||||
if (event.GetDamageePlayer() != null)
|
||||
event.AddKnockback("Smash Knockback", 1 + 0.1 * (20 - event.GetDamageePlayer().getHealth()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String GetMode()
|
||||
{
|
||||
return "Smash Dominate";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,109 @@
|
||||
package nautilus.game.arcade.game.games.gladiators.modes;
|
||||
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.game.games.gladiators.ArenaType;
|
||||
import nautilus.game.arcade.game.games.gladiators.Gladiators;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitBlaze;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitChicken;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitCow;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitCreeper;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitEnderman;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitGolem;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitMagmaCube;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitPig;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSheep;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSkeletalHorse;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSkeleton;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSkySquid;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSlime;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSnowman;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSpider;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitWitch;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitWitherSkeleton;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitWolf;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitZombie;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
|
||||
/**
|
||||
* SmashGladiators
|
||||
*
|
||||
* @author xXVevzZXx
|
||||
*/
|
||||
public class SmashGladiators extends Gladiators
|
||||
{
|
||||
public SmashGladiators(ArcadeManager manager)
|
||||
{
|
||||
super(manager, new Kit[]
|
||||
{
|
||||
new KitSkeleton(manager),
|
||||
new KitGolem(manager),
|
||||
new KitSpider(manager),
|
||||
new KitSlime(manager),
|
||||
|
||||
new KitCreeper(manager),
|
||||
new KitEnderman(manager),
|
||||
new KitSnowman(manager),
|
||||
new KitWolf(manager),
|
||||
|
||||
|
||||
new KitBlaze(manager),
|
||||
new KitWitch(manager),
|
||||
new KitChicken(manager),
|
||||
new KitSkeletalHorse(manager),
|
||||
new KitPig(manager),
|
||||
new KitSkySquid(manager),
|
||||
new KitWitherSkeleton(manager),
|
||||
new KitMagmaCube(manager),
|
||||
new KitZombie(manager),
|
||||
new KitCow(manager),
|
||||
|
||||
new KitSheep(manager)
|
||||
}, GameType.Brawl);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void noFallDamage(CustomDamageEvent event)
|
||||
{
|
||||
if (event.IsCancelled())
|
||||
return;
|
||||
|
||||
if (event.GetCause() == DamageCause.FALL)
|
||||
event.SetCancelled("No Fall Damage");
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void customKnockback(CustomDamageEvent event)
|
||||
{
|
||||
if (event.IsCancelled())
|
||||
return;
|
||||
|
||||
if (event.GetDamageePlayer() != null)
|
||||
event.AddKnockback("Smash Knockback", 1 + 0.1 * (20 - event.GetDamageePlayer().getHealth()));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void giveLoadout(Player p, ArenaType type)
|
||||
{
|
||||
if (!GetPlayers(true).contains(p))
|
||||
return;
|
||||
|
||||
GetKit(p).ApplyKit(p);
|
||||
|
||||
p.playSound(p.getLocation(), Sound.LEVEL_UP, 1f, 1f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String GetMode()
|
||||
{
|
||||
return "Smash Gladiators";
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package nautilus.game.arcade.game.games.micro.modes;
|
||||
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.game.games.micro.Micro;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitBlaze;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitChicken;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitCow;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitCreeper;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitEnderman;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitGolem;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitMagmaCube;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitPig;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSheep;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSkeletalHorse;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSkeleton;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSkySquid;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSlime;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSnowman;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSpider;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitWitch;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitWitherSkeleton;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitWolf;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitZombie;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
|
||||
/**
|
||||
* TinySmash
|
||||
*
|
||||
* @author xXVevzZXx
|
||||
*/
|
||||
public class TinySmash extends Micro
|
||||
{
|
||||
|
||||
public TinySmash(ArcadeManager manager)
|
||||
{
|
||||
super(manager, new Kit[]
|
||||
{
|
||||
new KitSkeleton(manager),
|
||||
new KitGolem(manager),
|
||||
new KitSpider(manager),
|
||||
new KitSlime(manager),
|
||||
|
||||
new KitCreeper(manager),
|
||||
new KitEnderman(manager),
|
||||
new KitSnowman(manager),
|
||||
new KitWolf(manager),
|
||||
|
||||
|
||||
new KitBlaze(manager),
|
||||
new KitWitch(manager),
|
||||
new KitChicken(manager),
|
||||
new KitSkeletalHorse(manager),
|
||||
new KitPig(manager),
|
||||
new KitSkySquid(manager),
|
||||
new KitWitherSkeleton(manager),
|
||||
new KitMagmaCube(manager),
|
||||
new KitZombie(manager),
|
||||
new KitCow(manager),
|
||||
|
||||
new KitSheep(manager)
|
||||
}, GameType.Brawl);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void noFallDamage(CustomDamageEvent event)
|
||||
{
|
||||
if (event.IsCancelled())
|
||||
return;
|
||||
|
||||
if (event.GetCause() == DamageCause.FALL)
|
||||
event.SetCancelled("No Fall Damage");
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void customKnockback(CustomDamageEvent event)
|
||||
{
|
||||
if (event.IsCancelled())
|
||||
return;
|
||||
|
||||
if (event.GetDamageePlayer() != null)
|
||||
event.AddKnockback("Smash Knockback", 1 + 0.1 * (20 - event.GetDamageePlayer().getHealth()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String GetMode()
|
||||
{
|
||||
return "Tiny Smash";
|
||||
}
|
||||
|
||||
}
|
@ -59,6 +59,9 @@ public class EweHeroes extends SheepGame
|
||||
{
|
||||
if (event.getType() != UpdateType.FASTER)
|
||||
return;
|
||||
|
||||
if (!IsLive())
|
||||
return;
|
||||
|
||||
for (Player player : GetPlayers(true))
|
||||
{
|
||||
|
@ -0,0 +1,36 @@
|
||||
package nautilus.game.arcade.game.games.sheep.modes;
|
||||
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.game.games.AbsorptionFix;
|
||||
import nautilus.game.arcade.game.games.sheep.SheepGame;
|
||||
import nautilus.game.arcade.game.games.sheep.modes.kits.KitShepherd;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
|
||||
/**
|
||||
* OverpoweredSheepQuest
|
||||
*
|
||||
* @author xXVevzZXx
|
||||
*/
|
||||
public class OverpoweredSheepQuest extends SheepGame
|
||||
{
|
||||
|
||||
public OverpoweredSheepQuest(ArcadeManager manager)
|
||||
{
|
||||
super(manager, new Kit[]
|
||||
{
|
||||
new KitShepherd(manager)
|
||||
}, GameType.Brawl);
|
||||
|
||||
TeamArmor = false;
|
||||
|
||||
new AbsorptionFix(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String GetMode()
|
||||
{
|
||||
return "OP Sheep Quest";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,116 @@
|
||||
package nautilus.game.arcade.game.games.sheep.modes;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.game.games.sheep.SheepGame;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitBlaze;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitChicken;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitCow;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitCreeper;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitEnderman;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitGolem;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitMagmaCube;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitPig;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSheep;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSkeletalHorse;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSkeleton;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSkySquid;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSlime;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSnowman;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSpider;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitWitch;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitWitherSkeleton;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitWolf;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitZombie;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
|
||||
/**
|
||||
* SheepSmash
|
||||
*
|
||||
* @author xXVevzZXx
|
||||
*/
|
||||
public class SmashSheep extends SheepGame
|
||||
{
|
||||
|
||||
public SmashSheep(ArcadeManager manager)
|
||||
{
|
||||
super(manager, new Kit[]
|
||||
{
|
||||
new KitSkeleton(manager),
|
||||
new KitGolem(manager),
|
||||
new KitSpider(manager),
|
||||
new KitSlime(manager),
|
||||
|
||||
new KitCreeper(manager),
|
||||
new KitEnderman(manager),
|
||||
new KitSnowman(manager),
|
||||
new KitWolf(manager),
|
||||
|
||||
|
||||
new KitBlaze(manager),
|
||||
new KitWitch(manager),
|
||||
new KitChicken(manager),
|
||||
new KitSkeletalHorse(manager),
|
||||
new KitPig(manager),
|
||||
new KitSkySquid(manager),
|
||||
new KitWitherSkeleton(manager),
|
||||
new KitMagmaCube(manager),
|
||||
new KitZombie(manager),
|
||||
new KitCow(manager),
|
||||
|
||||
new KitSheep(manager)
|
||||
}, GameType.Brawl);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void saddle(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.FASTER)
|
||||
return;
|
||||
|
||||
if (!IsLive())
|
||||
return;
|
||||
|
||||
for (Player player : GetPlayers(true))
|
||||
{
|
||||
player.getInventory().setItem(7, new ItemStack(Material.SADDLE));
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void noFallDamage(CustomDamageEvent event)
|
||||
{
|
||||
if (event.IsCancelled())
|
||||
return;
|
||||
|
||||
if (event.GetCause() == DamageCause.FALL)
|
||||
event.SetCancelled("No Fall Damage");
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void customKnockback(CustomDamageEvent event)
|
||||
{
|
||||
if (event.IsCancelled())
|
||||
return;
|
||||
|
||||
if (event.GetDamageePlayer() != null)
|
||||
event.AddKnockback("Smash Knockback", 1 + 0.1 * (20 - event.GetDamageePlayer().getHealth()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String GetMode()
|
||||
{
|
||||
return "Smash Sheep";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package nautilus.game.arcade.game.games.sheep.modes.kits;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.kit.KitAvailability;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
import nautilus.game.arcade.kit.ProgressingKit;
|
||||
import nautilus.game.arcade.kit.perks.PerkDoubleJump;
|
||||
import nautilus.game.arcade.kit.perks.PerkFletcher;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class KitShepherd extends ProgressingKit
|
||||
{
|
||||
private static final String[] DESCRIPTION = {
|
||||
"Most skilled Shepherd from all over the World",
|
||||
"",
|
||||
C.cYellow + "Double tap " + C.cWhite + "your jump key to " + C.cGreen + "Double Jump"
|
||||
};
|
||||
|
||||
private static final Perk[] PERKS = {
|
||||
new PerkDoubleJump("Double Jump", 1.2, 1.2, true, 8000, true),
|
||||
new PerkFletcher(4, 10, true)
|
||||
};
|
||||
|
||||
private static final ItemStack IN_HAND = new ItemStack(Material.IRON_AXE);
|
||||
|
||||
private static final ItemStack[] PLAYER_ITEMS = {
|
||||
ItemStackFactory.Instance.CreateStack(Material.DIAMOND_SWORD),
|
||||
ItemStackFactory.Instance.CreateStack(Material.GOLDEN_APPLE, 2),
|
||||
ItemStackFactory.Instance.CreateStack(Material.BOW),
|
||||
ItemStackFactory.Instance.CreateStack(Material.SADDLE, (byte) 0, 1,
|
||||
C.cYellow + C.Bold + "Hold This" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Grab/Hold Sheep")
|
||||
};
|
||||
|
||||
public KitShepherd(ArcadeManager manager)
|
||||
{
|
||||
super(manager, "Shepherd of the gods", "sheepsheperd", KitAvailability.Free, DESCRIPTION, PERKS, EntityType.ZOMBIE, IN_HAND);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void GiveItems(Player player)
|
||||
{
|
||||
player.getInventory().addItem(PLAYER_ITEMS);
|
||||
|
||||
player.getInventory().setHelmet(new ItemStack(Material.DIAMOND_HELMET));
|
||||
player.getInventory().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));
|
||||
player.getInventory().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));
|
||||
player.getInventory().setBoots(new ItemStack(Material.DIAMOND_BOOTS));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void SpawnCustom(LivingEntity ent)
|
||||
{
|
||||
ent.getEquipment().setHelmet(new ItemStack(Material.DIAMOND_HELMET));
|
||||
ent.getEquipment().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));
|
||||
ent.getEquipment().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));
|
||||
ent.getEquipment().setBoots(new ItemStack(Material.DIAMOND_BOOTS));
|
||||
}
|
||||
}
|
@ -133,17 +133,22 @@ public abstract class Skywars extends Game
|
||||
private ChestLoot _middleProjectile = new ChestLoot();
|
||||
private ChestLoot _middleBlock = new ChestLoot();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Skywars(ArcadeManager manager, GameType type, String[] description)
|
||||
{
|
||||
super(manager, type, new Kit[]
|
||||
this(manager, new Kit[]
|
||||
{
|
||||
new KitChicken(manager),
|
||||
new KitMiner(manager),
|
||||
new KitMadScientist(manager),
|
||||
new KitDestructor(manager),
|
||||
|
||||
}, description);
|
||||
}, type, description);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Skywars(ArcadeManager manager, Kit[] kits, GameType type, String[] description)
|
||||
{
|
||||
super(manager, type, kits, description);
|
||||
|
||||
PrepareFreeze = true;
|
||||
|
||||
|
@ -17,7 +17,7 @@ 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.Game.GameState;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import nautilus.game.arcade.stats.DeathBomberStatTracker;
|
||||
import nautilus.game.arcade.stats.SkywarsKillZombieStatTracker;
|
||||
import nautilus.game.arcade.stats.SkywarsTNTStatTracker;
|
||||
@ -61,25 +61,20 @@ public class SoloSkywars extends Skywars
|
||||
"Last player alive wins!"
|
||||
});
|
||||
|
||||
this.DamageTeamSelf = true;
|
||||
|
||||
registerStatTrackers(
|
||||
new SkywarsTNTStatTracker(this),
|
||||
new DeathBomberStatTracker(this, 3), //TNT Kills
|
||||
new SkywarsKillZombieStatTracker(this),
|
||||
new WinWithoutOpeningChestStatTracker(this),
|
||||
new WinWithoutWearingArmorStatTracker(this));
|
||||
|
||||
registerChatStats(
|
||||
Kills,
|
||||
Deaths,
|
||||
KDRatio,
|
||||
BlankLine,
|
||||
Assists,
|
||||
DamageTaken,
|
||||
DamageDealt
|
||||
);
|
||||
this.DamageTeamSelf = true;
|
||||
}
|
||||
|
||||
public SoloSkywars(ArcadeManager manager, Kit[] kits, GameType type)
|
||||
{
|
||||
super(manager, kits, type,
|
||||
new String[]
|
||||
{
|
||||
"Free for all battle in the sky!",
|
||||
"Craft or loot gear for combat",
|
||||
"Last player alive wins!"
|
||||
});
|
||||
|
||||
this.DamageTeamSelf = true;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -0,0 +1,95 @@
|
||||
package nautilus.game.arcade.game.games.skywars.modes;
|
||||
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.game.games.skywars.SoloSkywars;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitBlaze;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitChicken;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitCow;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitCreeper;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitEnderman;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitGolem;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitMagmaCube;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitPig;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSheep;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSkeletalHorse;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSkeleton;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSkySquid;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSlime;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSnowman;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitSpider;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitWitch;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitWitherSkeleton;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitWolf;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitZombie;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
|
||||
/**
|
||||
* SkySmash
|
||||
*
|
||||
* @author xXVevzZXx
|
||||
*/
|
||||
public class SkySmash extends SoloSkywars
|
||||
{
|
||||
|
||||
public SkySmash(ArcadeManager manager)
|
||||
{
|
||||
super(manager, new Kit[]
|
||||
{
|
||||
new KitSkeleton(manager),
|
||||
new KitGolem(manager),
|
||||
new KitSpider(manager),
|
||||
new KitSlime(manager),
|
||||
|
||||
new KitCreeper(manager),
|
||||
new KitEnderman(manager),
|
||||
new KitSnowman(manager),
|
||||
new KitWolf(manager),
|
||||
|
||||
|
||||
new KitBlaze(manager),
|
||||
new KitWitch(manager),
|
||||
new KitChicken(manager),
|
||||
new KitSkeletalHorse(manager),
|
||||
new KitPig(manager),
|
||||
new KitSkySquid(manager),
|
||||
new KitWitherSkeleton(manager),
|
||||
new KitMagmaCube(manager),
|
||||
new KitZombie(manager),
|
||||
new KitCow(manager),
|
||||
|
||||
new KitSheep(manager)
|
||||
}, GameType.Brawl);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void noFallDamage(CustomDamageEvent event)
|
||||
{
|
||||
if (event.IsCancelled())
|
||||
return;
|
||||
|
||||
if (event.GetCause() == DamageCause.FALL)
|
||||
event.SetCancelled("No Fall Damage");
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void customKnockback(CustomDamageEvent event)
|
||||
{
|
||||
if (event.IsCancelled())
|
||||
return;
|
||||
|
||||
if (event.GetDamageePlayer() != null)
|
||||
event.AddKnockback("Smash Knockback", 1 + 0.1 * (20 - event.GetDamageePlayer().getHealth()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String GetMode()
|
||||
{
|
||||
return "Sky Smash";
|
||||
}
|
||||
}
|
@ -31,7 +31,7 @@ import nautilus.game.arcade.game.games.smash.kits.KitWitch;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitWitherSkeleton;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitWolf;
|
||||
import nautilus.game.arcade.game.games.smash.kits.KitZombie;
|
||||
import nautilus.game.arcade.game.games.smash.modes.kits.KitPlayer;
|
||||
import nautilus.game.arcade.game.games.smash.modes.kits.KitHipster;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
|
||||
@ -49,7 +49,7 @@ public class RandomKitSSM extends SoloSuperSmash
|
||||
|
||||
public RandomKitSSM(ArcadeManager manager)
|
||||
{
|
||||
super(manager, new Kit[]{new KitPlayer(manager)}, GameType.Brawl);
|
||||
super(manager, new Kit[]{new KitHipster(manager)}, GameType.Brawl);
|
||||
|
||||
_maxLives = 5;
|
||||
|
||||
|
@ -16,10 +16,10 @@ import nautilus.game.arcade.kit.SmashKit;
|
||||
*
|
||||
* @author xXVevzZXx
|
||||
*/
|
||||
public class KitPlayer extends SmashKit
|
||||
public class KitHipster extends SmashKit
|
||||
{
|
||||
|
||||
public KitPlayer(ArcadeManager manager)
|
||||
public KitHipster(ArcadeManager manager)
|
||||
{
|
||||
super(manager, "Hipster", KitAvailability.Free, 0,
|
||||
new String[]{"Always get another kit!"}, new Perk[]{}, EntityType.ZOMBIE, new ItemStack(Material.RECORD_10), "Super",
|
@ -4,6 +4,10 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilTime.TimeUnit;
|
||||
@ -13,17 +17,13 @@ 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.Game.GameState;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import nautilus.game.arcade.managers.chat.ChatStatData;
|
||||
import nautilus.game.arcade.stats.FirstSupplyDropOpenStatTracker;
|
||||
import nautilus.game.arcade.stats.KillsWithinTimeLimitStatTracker;
|
||||
import nautilus.game.arcade.stats.SimultaneousSkeletonStatTracker;
|
||||
import nautilus.game.arcade.stats.WinWithoutWearingArmorStatTracker;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
public class SoloSurvivalGames extends SurvivalGames
|
||||
{
|
||||
|
||||
@ -66,6 +66,23 @@ public class SoloSurvivalGames extends SurvivalGames
|
||||
this.DamageTeamSelf = true;
|
||||
}
|
||||
|
||||
public SoloSurvivalGames(ArcadeManager manager, Kit[] kits, GameType type)
|
||||
{
|
||||
super(manager, kits, type,
|
||||
new String[]
|
||||
{
|
||||
"Search for chests to find loot",
|
||||
|
||||
"Slaughter your opponents",
|
||||
|
||||
"Stay away from the borders!",
|
||||
|
||||
"Last tribute alive wins!"
|
||||
});
|
||||
|
||||
this.DamageTeamSelf = true;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void CustomTeamGeneration(GameStateChangeEvent event)
|
||||
{
|
||||
|
@ -144,35 +144,38 @@ public abstract class SurvivalGames extends Game
|
||||
|
||||
private int _chestRefillTime = 60 * 7;
|
||||
|
||||
public SurvivalGames(ArcadeManager manager, GameType type,
|
||||
public SurvivalGames(ArcadeManager manager, GameType type, String[] description)
|
||||
{
|
||||
this(manager, new Kit[]
|
||||
{
|
||||
new KitAxeman(manager),
|
||||
|
||||
// new KitLooter(manager),
|
||||
|
||||
new KitKnight(manager),
|
||||
|
||||
new KitArcher(manager),
|
||||
|
||||
new KitBrawler(manager),
|
||||
|
||||
new KitAssassin(manager),
|
||||
|
||||
new KitBeastmaster(manager),
|
||||
|
||||
new KitBomber(manager),
|
||||
|
||||
new KitNecromancer(manager),
|
||||
|
||||
new KitBarbarian(manager),
|
||||
|
||||
new KitHorseman(manager),
|
||||
}, type, description);
|
||||
}
|
||||
|
||||
public SurvivalGames(ArcadeManager manager, Kit[] kits, GameType type,
|
||||
String[] description)
|
||||
{
|
||||
super(manager, type,
|
||||
|
||||
new Kit[]
|
||||
{
|
||||
new KitAxeman(manager),
|
||||
|
||||
// new KitLooter(manager),
|
||||
|
||||
new KitKnight(manager),
|
||||
|
||||
new KitArcher(manager),
|
||||
|
||||
new KitBrawler(manager),
|
||||
|
||||
new KitAssassin(manager),
|
||||
|
||||
new KitBeastmaster(manager),
|
||||
|
||||
new KitBomber(manager),
|
||||
|
||||
new KitNecromancer(manager),
|
||||
|
||||
new KitBarbarian(manager),
|
||||
|
||||
new KitHorseman(manager),
|
||||
}, description);
|
||||
super(manager, type, kits, description);
|
||||
|
||||
_help = new String[]
|
||||
{
|
||||
|
@ -0,0 +1,140 @@
|
||||
package nautilus.game.arcade.game.games.survivalgames.modes;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.entity.EntityDeathEvent;
|
||||
|
||||
import mineplex.core.common.util.UtilItem;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.game.games.smash.modes.kits.KitHipster;
|
||||
import nautilus.game.arcade.game.games.survivalgames.SoloSurvivalGames;
|
||||
import nautilus.game.arcade.game.games.survivalgames.kit.KitArcher;
|
||||
import nautilus.game.arcade.game.games.survivalgames.kit.KitAssassin;
|
||||
import nautilus.game.arcade.game.games.survivalgames.kit.KitAxeman;
|
||||
import nautilus.game.arcade.game.games.survivalgames.kit.KitBarbarian;
|
||||
import nautilus.game.arcade.game.games.survivalgames.kit.KitBeastmaster;
|
||||
import nautilus.game.arcade.game.games.survivalgames.kit.KitBomber;
|
||||
import nautilus.game.arcade.game.games.survivalgames.kit.KitBrawler;
|
||||
import nautilus.game.arcade.game.games.survivalgames.kit.KitHorseman;
|
||||
import nautilus.game.arcade.game.games.survivalgames.kit.KitKnight;
|
||||
import nautilus.game.arcade.game.games.survivalgames.kit.KitNecromancer;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
|
||||
/**
|
||||
* ChangingKits
|
||||
*
|
||||
* @author xXVevzZXx
|
||||
*/
|
||||
public class ChangingKits extends SoloSurvivalGames
|
||||
{
|
||||
private Kit[] _kits;
|
||||
|
||||
private long _lastChanged;
|
||||
|
||||
public ChangingKits(ArcadeManager manager)
|
||||
{
|
||||
super(manager, new Kit[]
|
||||
{
|
||||
new KitHipster(manager)
|
||||
}, GameType.Brawl);
|
||||
|
||||
_kits = new Kit[]
|
||||
{
|
||||
new KitAxeman(manager),
|
||||
|
||||
// new KitLooter(manager),
|
||||
|
||||
new KitKnight(manager),
|
||||
|
||||
new KitArcher(manager),
|
||||
|
||||
new KitBrawler(manager),
|
||||
|
||||
new KitAssassin(manager),
|
||||
|
||||
new KitBeastmaster(manager),
|
||||
|
||||
new KitBomber(manager),
|
||||
|
||||
new KitNecromancer(manager),
|
||||
|
||||
new KitBarbarian(manager),
|
||||
};
|
||||
|
||||
_lastChanged = 0;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void KitRegister(GameStateChangeEvent event)
|
||||
{
|
||||
if (event.GetState() != event.GetGame().KitRegisterState)
|
||||
return;
|
||||
|
||||
for (Kit kit : _kits)
|
||||
{
|
||||
UtilServer.getServer().getPluginManager().registerEvents(kit, Manager.getPlugin());
|
||||
|
||||
for (Perk perk : kit.GetPerks())
|
||||
{
|
||||
UtilServer.getServer().getPluginManager().registerEvents(perk, Manager.getPlugin());
|
||||
perk.registeredEvents();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void end(GameStateChangeEvent event)
|
||||
{
|
||||
if (event.GetState() != GameState.Dead)
|
||||
return;
|
||||
|
||||
for (Kit kit : _kits)
|
||||
{
|
||||
HandlerList.unregisterAll(kit);
|
||||
|
||||
for (Perk perk : kit.GetPerks())
|
||||
{
|
||||
HandlerList.unregisterAll(perk);
|
||||
perk.unregisteredEvents();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void kitSwitch(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.SEC)
|
||||
return;
|
||||
|
||||
if (!IsLive())
|
||||
return;
|
||||
|
||||
if (!UtilTime.elapsed(_lastChanged, 60000))
|
||||
return;
|
||||
|
||||
_lastChanged = System.currentTimeMillis();
|
||||
|
||||
for (Player player : GetPlayers(true))
|
||||
{
|
||||
Kit kit = _kits[UtilMath.r(_kits.length)];
|
||||
SetKit((Player) player, kit, true, false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String GetMode()
|
||||
{
|
||||
return "Changing Kits";
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user