diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/CastleAssault.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/CastleAssault.java index f4ed36446..d06c8f042 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/CastleAssault.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/CastleAssault.java @@ -131,6 +131,7 @@ public class CastleAssault extends TeamGame private ChestLoot _miscGear = new ChestLoot(); private ObjectiveTNTSpawner _tntSpawner; + private Map _teamKills = new HashMap<>(); private boolean _writeScoreboard = true; @@ -186,6 +187,7 @@ public class CastleAssault extends TeamGame this.CrownsEnabled = true; this.FirstKillReward = 20; this.GemKillDeathRespawn = 1; + this.GameTimeout = -1; new CompassModule() .setGiveCompass(true) @@ -862,6 +864,55 @@ public class CastleAssault extends TeamGame } AddStat(player, GetKit(player).GetName() + "KitKills", 1, false, false); + _teamKills.merge(GetTeam(player), 1, Integer::sum); + if (GetTeam(player).GetColor() == ChatColor.RED) + { + GameTeam enemy = GetTeam(ChatColor.AQUA); + TeamCrystal[] crystals = _crystals.get(enemy).stream().filter(TeamCrystal::isActive).toArray(size -> new TeamCrystal[size]); + if (crystals.length > 0) + { + if (_teamKills.getOrDefault(GetTeam(player), 0) % 20 == 0) + { + crystals[UtilMath.r(crystals.length)].destroy(); + if (crystals.length > 1) + { + Bukkit.broadcastMessage(F.main("Game", "One of " + F.elem(enemy.GetFormattedName() + "'s Crystals") + " has been destroyed!")); + } + else + { + Bukkit.broadcastMessage(F.main("Game", "All of " + F.elem(enemy.GetFormattedName() + "'s Crystals") + " have been destroyed and " + F.elem(_kings.get(enemy).getName(false)) + " is now vulnerable!")); + } + } + } + else + { + _kings.get(enemy).handleDamage(player.getName(), 10, true); + } + } + else + { + GameTeam enemy = GetTeam(ChatColor.RED); + TeamCrystal[] crystals = _crystals.get(enemy).stream().filter(TeamCrystal::isActive).toArray(size -> new TeamCrystal[size]); + if (crystals.length > 0) + { + if (_teamKills.getOrDefault(GetTeam(player), 0) % 20 == 0) + { + crystals[UtilMath.r(crystals.length)].destroy(); + if (crystals.length > 1) + { + Bukkit.broadcastMessage(F.main("Game", "One of " + F.elem(enemy.GetFormattedName() + "'s Crystals") + " has been destroyed!")); + } + else + { + Bukkit.broadcastMessage(F.main("Game", "All of " + F.elem(enemy.GetFormattedName() + "'s Crystals") + " have been destroyed and " + F.elem(_kings.get(enemy).getName(false)) + " is now vulnerable!")); + } + } + } + else + { + _kings.get(enemy).handleDamage(player.getName(), 10, true); + } + } if (UtilPlayer.isSpectator(player)) { @@ -970,7 +1021,7 @@ public class CastleAssault extends TeamGame } else { - Bukkit.broadcastMessage(F.main("Game", "All of " + F.elem(crystal.getOwner().GetFormattedName() + "'s Crystals") + " has been destroyed and " + F.elem(_kings.get(crystal.getOwner()).getName(false)) + " is now vulnerable!")); + Bukkit.broadcastMessage(F.main("Game", "All of " + F.elem(crystal.getOwner().GetFormattedName() + "'s Crystals") + " have been destroyed and " + F.elem(_kings.get(crystal.getOwner()).getName(false)) + " is now vulnerable!")); } } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/CastleAssaultTDM.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/CastleAssaultTDM.java index e83f12804..71ead5cc4 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/CastleAssaultTDM.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/CastleAssaultTDM.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Map.Entry; import java.util.WeakHashMap; import org.bukkit.Bukkit; @@ -48,6 +49,7 @@ import org.bukkit.material.MaterialData; import org.bukkit.metadata.MetadataValue; import mineplex.core.Managers; +import mineplex.core.common.Pair; import mineplex.core.common.util.C; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilAction; @@ -60,7 +62,9 @@ import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilTime; import mineplex.core.itemstack.ItemBuilder; +import mineplex.core.leaderboard.Leaderboard; import mineplex.core.leaderboard.LeaderboardManager; +import mineplex.core.leaderboard.LeaderboardRepository.LeaderboardSQLType; import mineplex.core.loot.ChestLoot; import mineplex.core.recharge.Recharge; import mineplex.core.updater.UpdateType; @@ -83,12 +87,14 @@ import nautilus.game.arcade.game.games.castleassault.kits.KitPlayer; import nautilus.game.arcade.game.games.castleassault.kits.KitTank; import nautilus.game.arcade.game.modules.compass.CompassModule; import nautilus.game.arcade.kit.Kit; +import nautilus.game.arcade.managers.lobby.current.NewGameLobbyManager; public class CastleAssaultTDM extends TeamGame { private static final int MAX_FLINT_AND_STEEL_USES = 4; private static final int ITEMS_PER_CHEST = 5; private static final long TIME_TILL_REFILL = 2 * 60 * 1000; + private static final int KILLS_TO_WIN = 50; private long _lastRefill; @@ -122,7 +128,22 @@ public class CastleAssaultTDM extends TeamGame //new KitNinja(manager), new KitTank(manager) }, - new String[] {"AlexTheCoder is awesome!"}); + new String[] + { + "Work with your team", + "To slay the enemy.", + "First team to 50 kills", + "Wins the game and glory!" + } + ); + + _help = new String[] + { + "Purchase kit upgrades by earning and spending crowns from games", + "Each kit has special starter items, be sure to use them to your advantage in fights", + "Go on Kill Streaks to earn Kill Streak Rewards to obtain better armor & weapons!", + "Chests refill every 2 minutes with potions, golden applegates, fishing rods, and other useful PvP items!" + }; this.StrictAntiHack = true; this.HungerSet = 20; @@ -143,6 +164,7 @@ public class CastleAssaultTDM extends TeamGame this.CrownsEnabled = true; this.FirstKillReward = 20; this.GemKillDeathRespawn = 1; + this.GameTimeout = -1; new CompassModule() .setGiveCompass(true) @@ -153,33 +175,33 @@ public class CastleAssaultTDM extends TeamGame _flintAndSteel = new ItemBuilder(Material.FLINT_AND_STEEL).setData((short) (Material.FLINT_AND_STEEL.getMaxDurability() - MAX_FLINT_AND_STEEL_USES)); generateLoot(); -// if (manager.IsRewardStats()) -// { -// if (manager.GetLobby() instanceof NewGameLobbyManager) -// { -// Map> lobbyCustomLocs = ((NewGameLobbyManager)manager.GetLobby()).getCustomLocs(); -// if (lobbyCustomLocs.containsKey("TOP_DAILY_WINS")) -// { -// Location loc = lobbyCustomLocs.get("TOP_DAILY_WINS").get(0); -// Managers.get(LeaderboardManager.class).registerLeaderboard("TOP_CASTLEASSAULT_DAILY_WINS", new Leaderboard("Top Daily Wins", Pair.create("Win", "Wins"), new String[] {"Castle Assault TDM.Wins"}, LeaderboardSQLType.DAILY_SEASON, loc, 10)); -// } -// if (lobbyCustomLocs.containsKey("TOP_DAILY_KILLS")) -// { -// Location loc = lobbyCustomLocs.get("TOP_DAILY_KILLS").get(0); -// Managers.get(LeaderboardManager.class).registerLeaderboard("TOP_CASTLEASSAULT_DAILY_KILLS", new Leaderboard("Top Daily Kills", Pair.create("Kill", "Kills"), new String[] {"Castle Assault TDM.Kills"}, LeaderboardSQLType.DAILY_SEASON, loc, 10)); -// } -// if (lobbyCustomLocs.containsKey("TOP_WINS")) -// { -// Location loc = lobbyCustomLocs.get("TOP_WINS").get(0); -// Managers.get(LeaderboardManager.class).registerLeaderboard("TOP_CASTLEASSAULT_WINS", new Leaderboard("Top Wins", Pair.create("Win", "Wins"), new String[] {"Castle Assault TDM.Wins"}, LeaderboardSQLType.ALL_SEASON, loc, 10)); -// } -// if (lobbyCustomLocs.containsKey("TOP_KILLS")) -// { -// Location loc = lobbyCustomLocs.get("TOP_KILLS").get(0); -// Managers.get(LeaderboardManager.class).registerLeaderboard("TOP_CASTLEASSAULT_KILLS", new Leaderboard("Top Kills", Pair.create("Kill", "Kills"), new String[] {"Castle Assault TDM.Kills"}, LeaderboardSQLType.ALL_SEASON, loc, 10)); -// } -// } -// } + if (manager.IsRewardStats()) + { + if (manager.GetLobby() instanceof NewGameLobbyManager) + { + Map> lobbyCustomLocs = ((NewGameLobbyManager)manager.GetLobby()).getCustomLocs(); + if (lobbyCustomLocs.containsKey("TOP_DAILY_WINS")) + { + Location loc = lobbyCustomLocs.get("TOP_DAILY_WINS").get(0); + Managers.get(LeaderboardManager.class).registerLeaderboard("TOP_CASTLEASSAULTTDM_DAILY_WINS", new Leaderboard("Top Daily Wins", Pair.create("Win", "Wins"), new String[] {"Castle Assault TDM.Wins"}, LeaderboardSQLType.DAILY, loc, 10)); + } + if (lobbyCustomLocs.containsKey("TOP_DAILY_KILLS")) + { + Location loc = lobbyCustomLocs.get("TOP_DAILY_KILLS").get(0); + Managers.get(LeaderboardManager.class).registerLeaderboard("TOP_CASTLEASSAULTTDM_DAILY_KILLS", new Leaderboard("Top Daily Kills", Pair.create("Kill", "Kills"), new String[] {"Castle Assault TDM.Kills"}, LeaderboardSQLType.DAILY, loc, 10)); + } + if (lobbyCustomLocs.containsKey("TOP_WINS")) + { + Location loc = lobbyCustomLocs.get("TOP_WINS").get(0); + Managers.get(LeaderboardManager.class).registerLeaderboard("TOP_CASTLEASSAULTTDM_WINS", new Leaderboard("Top Wins", Pair.create("Win", "Wins"), new String[] {"Castle Assault TDM.Wins"}, LeaderboardSQLType.ALL_SEASON, loc, 10)); + } + if (lobbyCustomLocs.containsKey("TOP_KILLS")) + { + Location loc = lobbyCustomLocs.get("TOP_KILLS").get(0); + Managers.get(LeaderboardManager.class).registerLeaderboard("TOP_CASTLEASSAULTTDM_KILLS", new Leaderboard("Top Kills", Pair.create("Kill", "Kills"), new String[] {"Castle Assault TDM.Kills"}, LeaderboardSQLType.ALL_SEASON, loc, 10)); + } + } + } } private void generateLoot() @@ -274,10 +296,10 @@ public class CastleAssaultTDM extends TeamGame GameTeam red = GetTeam(ChatColor.RED); GameTeam blue = GetTeam(ChatColor.AQUA); Scoreboard.write(red.GetFormattedName() + " Team Kills"); - Scoreboard.write(_teamKills.get(red) + "/50"); + Scoreboard.write(_teamKills.get(red) + "/" + KILLS_TO_WIN); Scoreboard.writeNewLine(); Scoreboard.write(blue.GetFormattedName() + " Team Kills"); - Scoreboard.write(_teamKills.get(blue) + "/50"); + Scoreboard.write(_teamKills.get(blue) + "/" + KILLS_TO_WIN); Scoreboard.draw(); } @@ -363,12 +385,16 @@ public class CastleAssaultTDM extends TeamGame AddGems(player, 10, "Participation", false, false); } + int crowns = 0; + for (Entry data : GetGems(player).entrySet()) { - int crowns = 0; - for (GemData data : GetGems(player).values()) + if (data.getKey().equals("Kills")) { - crowns += data.Gems; + crowns += data.getValue().Gems; } + } + + { int streak = _streakData.getOrDefault(player, new KillStreakData()).getBestStreak(); if (streak >= 2 && streak < 4) { @@ -376,7 +402,7 @@ public class CastleAssaultTDM extends TeamGame } else if (streak >= 4 && streak < 6) { - AddGems(player, crowns, streak + " Player Kill Streak", false, false); + AddGems(player, 1 * crowns, streak + " Player Kill Streak", false, false); } else if (streak >= 6 && streak < 8) { @@ -387,22 +413,6 @@ public class CastleAssaultTDM extends TeamGame AddGems(player, 2 * crowns, streak + " Player Kill Streak", false, false); } } - - if (GetKit(player) != null) - { - KitPlayer kit = (KitPlayer) GetKit(player); - int kitLevel = kit.getUpgradeLevel(player.getUniqueId()); - if (kitLevel > 0) - { - int crowns = 0; - for (GemData data : GetGems(player).values()) - { - crowns += data.Gems; - } - - AddGems(player, (0.5 * kitLevel) * crowns, kit.GetName() + " Kit Level Bonus", false, false); - } - } } } SetState(GameState.End); @@ -433,7 +443,7 @@ public class CastleAssaultTDM extends TeamGame GameTeam red = GetTeam(ChatColor.RED); GameTeam blue = GetTeam(ChatColor.AQUA); - if (_teamKills.get(blue).intValue() >= 50) + if (_teamKills.get(blue).intValue() >= KILLS_TO_WIN) { AnnounceEnd(blue); writeFinalScoreboard(blue.GetColor() + blue.GetName(), _teamKills.get(blue)); @@ -454,12 +464,16 @@ public class CastleAssaultTDM extends TeamGame AddGems(player, 10, "Participation", false, false); } + int crowns = 0; + for (Entry data : GetGems(player).entrySet()) { - int crowns = 0; - for (GemData data : GetGems(player).values()) + if (data.getKey().equals("Kills")) { - crowns += data.Gems; + crowns += data.getValue().Gems; } + } + + { int streak = _streakData.getOrDefault(player, new KillStreakData()).getBestStreak(); if (streak >= 2 && streak < 4) { @@ -467,7 +481,7 @@ public class CastleAssaultTDM extends TeamGame } else if (streak >= 4 && streak < 6) { - AddGems(player, crowns, streak + " Player Kill Streak", false, false); + AddGems(player, 1 * crowns, streak + " Player Kill Streak", false, false); } else if (streak >= 6 && streak < 8) { @@ -478,25 +492,12 @@ public class CastleAssaultTDM extends TeamGame AddGems(player, 2 * crowns, streak + " Player Kill Streak", false, false); } } - - KitPlayer kit = (KitPlayer) GetKit(player); - int kitLevel = kit.getUpgradeLevel(player.getUniqueId()); - if (kitLevel > 0) - { - int crowns = 0; - for (GemData data : GetGems(player).values()) - { - crowns += data.Gems; - } - - AddGems(player, (0.5 * kitLevel) * crowns, kit.GetName() + " Kit Level Bonus", false, false); - } } } SetState(GameState.End); return; } - if (_teamKills.get(red).intValue() >= 50) + if (_teamKills.get(red).intValue() >= KILLS_TO_WIN) { AnnounceEnd(red); writeFinalScoreboard(red.GetColor() + red.GetName(), _teamKills.get(red)); @@ -517,12 +518,16 @@ public class CastleAssaultTDM extends TeamGame AddGems(player, 10, "Participation", false, false); } + int crowns = 0; + for (Entry data : GetGems(player).entrySet()) { - int crowns = 0; - for (GemData data : GetGems(player).values()) + if (data.getKey().equals("Kills")) { - crowns += data.Gems; + crowns += data.getValue().Gems; } + } + + { int streak = _streakData.getOrDefault(player, new KillStreakData()).getBestStreak(); if (streak >= 2 && streak < 4) { @@ -530,7 +535,7 @@ public class CastleAssaultTDM extends TeamGame } else if (streak >= 4 && streak < 6) { - AddGems(player, crowns, streak + " Player Kill Streak", false, false); + AddGems(player, 1 * crowns, streak + " Player Kill Streak", false, false); } else if (streak >= 6 && streak < 8) { @@ -541,19 +546,6 @@ public class CastleAssaultTDM extends TeamGame AddGems(player, 2 * crowns, streak + " Player Kill Streak", false, false); } } - - KitPlayer kit = (KitPlayer) GetKit(player); - int kitLevel = kit.getUpgradeLevel(player.getUniqueId()); - if (kitLevel > 0) - { - int crowns = 0; - for (GemData data : GetGems(player).values()) - { - crowns += data.Gems; - } - - AddGems(player, (0.5 * kitLevel) * crowns, kit.GetName() + " Kit Level Bonus", false, false); - } } } SetState(GameState.End); @@ -587,10 +579,10 @@ public class CastleAssaultTDM extends TeamGame Manager.GetDamage().SetEnabled(true); Manager.GetExplosion().setEnabled(true); Manager.GetCreature().SetDisableCustomDrops(false); - Managers.get(LeaderboardManager.class).unregisterLeaderboard("TOP_CASTLEASSAULT_DAILY_WINS"); - Managers.get(LeaderboardManager.class).unregisterLeaderboard("TOP_CASTLEASSAULT_DAILY_KILLS"); - Managers.get(LeaderboardManager.class).unregisterLeaderboard("TOP_CASTLEASSAULT_WINS"); - Managers.get(LeaderboardManager.class).unregisterLeaderboard("TOP_CASTLEASSAULT_KILLS"); + Managers.get(LeaderboardManager.class).unregisterLeaderboard("TOP_CASTLEASSAULTTDM_DAILY_WINS"); + Managers.get(LeaderboardManager.class).unregisterLeaderboard("TOP_CASTLEASSAULTTDM_DAILY_KILLS"); + Managers.get(LeaderboardManager.class).unregisterLeaderboard("TOP_CASTLEASSAULTTDM_WINS"); + Managers.get(LeaderboardManager.class).unregisterLeaderboard("TOP_CASTLEASSAULTTDM_KILLS"); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/data/TeamKing.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/data/TeamKing.java index 0cc108f8d..02f17267f 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/data/TeamKing.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/data/TeamKing.java @@ -104,10 +104,16 @@ public class TeamKing public boolean handleDamage(String player, double damage) { - if (!UtilTime.elapsed(_lastDamage, 400)) + return handleDamage(player, damage, false); + } + + public boolean handleDamage(String player, double damage, boolean force) + { + if (!UtilTime.elapsed(_lastDamage, 400) && !force) { return false; } + _lastDamager = player; _lastDamage = System.currentTimeMillis(); @@ -119,4 +125,4 @@ public class TeamKing return true; } -} \ No newline at end of file +} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/kits/KitFighter.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/kits/KitFighter.java index d5b49974d..986bfb915 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/kits/KitFighter.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/kits/KitFighter.java @@ -65,36 +65,36 @@ public class KitFighter extends KitPlayer if (level == 0) { player.getInventory().setItem(0, new ItemBuilder(Material.DIAMOND_SWORD).setLore(C.cGold + "Kit Item").setUnbreakable(true).build()); - player.getInventory().setItem(1, new ItemBuilder(Material.GOLDEN_APPLE).setAmount(1).setTitle(C.cPurple + "Golden Applegate").setLore(C.cGold + "Kit Item").build()); + player.getInventory().setItem(1, new ItemBuilder(Material.GOLDEN_APPLE).setAmount(1).setTitle(C.cPurple + "Golden Applegate").build()); } else if (level == 1) { player.getInventory().setItem(0, new ItemBuilder(Material.DIAMOND_SWORD).setLore(C.cGold + "Kit Item").setUnbreakable(true).build()); - player.getInventory().setItem(1, new ItemBuilder(Material.GOLDEN_APPLE).setAmount(2).setTitle(C.cPurple + "Golden Applegate").setLore(C.cGold + "Kit Item").build()); + player.getInventory().setItem(1, new ItemBuilder(Material.GOLDEN_APPLE).setAmount(2).setTitle(C.cPurple + "Golden Applegate").build()); } else if (level == 2) { player.getInventory().setItem(0, new ItemBuilder(Material.DIAMOND_SWORD).setLore(C.cGold + "Kit Item").setUnbreakable(true).build()); player.getInventory().setItem(1, new ItemBuilder(Material.FISHING_ROD).setLore(C.cGold + "Kit Item").setUnbreakable(true).build()); - player.getInventory().setItem(2, new ItemBuilder(Material.GOLDEN_APPLE).setAmount(2).setTitle(C.cPurple + "Golden Applegate").setLore(C.cGold + "Kit Item").build()); + player.getInventory().setItem(2, new ItemBuilder(Material.GOLDEN_APPLE).setAmount(2).setTitle(C.cPurple + "Golden Applegate").build()); } else if (level == 3) { player.getInventory().setItem(0, new ItemBuilder(Material.DIAMOND_SWORD).addEnchantment(Enchantment.DAMAGE_ALL, 1).setLore(C.cGold + "Kit Item").setUnbreakable(true).build()); player.getInventory().setItem(1, new ItemBuilder(Material.FISHING_ROD).setLore(C.cGold + "Kit Item").setUnbreakable(true).build()); - player.getInventory().setItem(2, new ItemBuilder(Material.GOLDEN_APPLE).setAmount(2).setTitle(C.cPurple + "Golden Applegate").setLore(C.cGold + "Kit Item").build()); + player.getInventory().setItem(2, new ItemBuilder(Material.GOLDEN_APPLE).setAmount(2).setTitle(C.cPurple + "Golden Applegate").build()); } else if (level == 4) { player.getInventory().setItem(0, new ItemBuilder(Material.DIAMOND_SWORD).addEnchantment(Enchantment.DAMAGE_ALL, 1).setLore(C.cGold + "Kit Item").setUnbreakable(true).build()); player.getInventory().setItem(1, new ItemBuilder(Material.FISHING_ROD).addEnchantment(Enchantment.KNOCKBACK, 2).setLore(C.cGold + "Kit Item").setUnbreakable(true).build()); - player.getInventory().setItem(2, new ItemBuilder(Material.GOLDEN_APPLE).setAmount(3).setTitle(C.cPurple + "Golden Applegate").setLore(C.cGold + "Kit Item").build()); + player.getInventory().setItem(2, new ItemBuilder(Material.GOLDEN_APPLE).setAmount(3).setTitle(C.cPurple + "Golden Applegate").build()); } else if (level == 5) { player.getInventory().setItem(0, new ItemBuilder(Material.DIAMOND_SWORD).addEnchantment(Enchantment.DAMAGE_ALL, 2).setLore(C.cGold + "Kit Item").setUnbreakable(true).build()); player.getInventory().setItem(1, new ItemBuilder(Material.FISHING_ROD).addEnchantment(Enchantment.KNOCKBACK, 2).setLore(C.cGold + "Kit Item").setUnbreakable(true).build()); - player.getInventory().setItem(2, new ItemBuilder(Material.GOLDEN_APPLE).setAmount(3).setTitle(C.cPurple + "Golden Applegate").setLore(C.cGold + "Kit Item").build()); + player.getInventory().setItem(2, new ItemBuilder(Material.GOLDEN_APPLE).setAmount(3).setTitle(C.cPurple + "Golden Applegate").build()); } player.getInventory().setHelmet(new ItemBuilder(Material.DIAMOND_HELMET).setLore(C.cGold + "Kit Item").setUnbreakable(true).build()); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/kits/KitPlayer.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/kits/KitPlayer.java index 1b90a1793..ac445dd49 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/kits/KitPlayer.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castleassault/kits/KitPlayer.java @@ -39,7 +39,7 @@ public abstract class KitPlayer extends ProgressingKit protected void giveRegeneration(Player player) { - player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 20 * 3, 3)); + player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 20 * 5, 3)); } @Override